Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-4313 feat: Add WebViewTracking for Obj-c #1854

Merged
merged 6 commits into from
May 21, 2024

Conversation

ncreated
Copy link
Member

@ncreated ncreated commented May 20, 2024

What and why?

📦 This PR adds Objective-C API for DatadogWebViewTracking module.

[DDWebViewTracking enableWithWebView:webView
                               hosts:[NSSet<NSString*> setWithArray:@[@"host1.com", @"host2.com"]]
                      logsSampleRate:100.0
                                with:[[DDWebViewTrackingSessionReplayConfiguration alloc] init]];
[DDWebViewTracking disableWithWebView:webView];

How?

Following the convention from RFC - Modular Objective-C Interface.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests for Core, RUM, Trace, Logs, CR and WVT
  • Run unit tests for Session Replay
  • Run integration tests
  • Run smoke tests
  • Run tests for tools/

@ncreated ncreated self-assigned this May 20, 2024
@ncreated ncreated marked this pull request as ready for review May 20, 2024 15:43
@ncreated ncreated requested review from a team as code owners May 20, 2024 15:43
maciejburda
maciejburda previously approved these changes May 20, 2024
Copy link
Member

@maciejburda maciejburda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💪

@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented May 20, 2024

Datadog Report

Branch report: ncreated/RUM-4313/add-webview-tracking-for-obj-c
Commit report: bf86391
Test service: dd-sdk-ios

✅ 0 Failed, 3160 Passed, 0 Skipped, 2m 44.22s Total Time
🔻 Test Sessions change in coverage: 4 decreased, 4 increased, 5 no change

🔻 Code Coverage Decreases vs Default Branch (4)

  • test DatadogCrashReportingTests tvOS 27.62% (-0.09%) - Details
  • test DatadogCoreTests tvOS 78.68% (-0.09%) - Details
  • test DatadogWebViewTrackingTests iOS 18.44% (-0.07%) - Details
  • test DatadogCrashReportingTests iOS 27.59% (-0.07%) - Details

0xnm
0xnm previously approved these changes May 21, 2024
Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍 Just a minor request to align with the convention we agreed on the RFC

import WebKit
#endif

@objc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/change-request We aim to hide these interfaces from Swift autocompletion. As stated in the RFC, the interfaces should read:

@objc(DDWebViewTracking) @_spi(objc)
public final class objc_WebViewTracking: NSObject

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for flagging this 💪! I forgotten that we established this convention. Now everything should be up-to-date, including the PR comment and +objc file location ✅.

@ncreated ncreated dismissed stale reviews from 0xnm and maciejburda via a02c34d May 21, 2024 12:38
maxep
maxep previously approved these changes May 21, 2024
Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thank you :)

@ncreated ncreated merged commit 9246b61 into develop May 21, 2024
8 checks passed
@ncreated ncreated deleted the ncreated/RUM-4313/add-webview-tracking-for-obj-c branch May 21, 2024 16:53
This was referenced May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants