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

RUMM-1911 Prepare WebView tracking for dogfooding #727

Conversation

ncreated
Copy link
Member

What and why?

📦 This PR adds last changes to hybrid-application branch to prepare it for dogfooding.

How?

  • Adjusted public API naming, added docs string comments;
  • Resolved obsolete TODOs;

Additionally, it hides the entry code to WebView tracking behind DD_SDK_ENABLE_EXPERIMENTAL_APIS compiler flag. We used this feature flag successfully to disable Crash Reporting in #487. This will let us safely merge hybrid-application to master and further to dogfooding. This flag is defined in dogfooding/Package.swift so the feature will be visible in dogfood projects.

⚠️ This will require adding DD_SDK_ENABLE_EXPERIMENTAL_APIS to Base.local.xcconfig for local development. This is automated as part of make dependencies for CI.

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

@ncreated ncreated requested a review from a team as a code owner January 19, 2022 10:20
@ncreated ncreated self-assigned this Jan 19, 2022
}
XCTAssertGreaterThan(browserView.resourceEvents.count, 0, "It should track some Webview resources")
browserView.resourceEvents.forEach { browserResourceEvent in
XCTAssertEqual(browserResourceEvent.application.id, expectedBrowserRUMApplicationID, "Webview events should use iOS SDK application ID")
XCTAssertEqual(browserResourceEvent.session.id, expectedBrowserSessionID, "Webview events should use iOS SDK session ID")
XCTAssertEqual(browserResourceEvent.service, expectedBrowserServiceName, "Webview events should use Browser SDK `service`")
XCTAssertNotEqual(browserResourceEvent.source, .ios, "Webview events should use Browser SDK `source`")
XCTAssertEqual(browserResourceEvent.source, .browser, "Webview events should use Browser SDK `source`")
Copy link
Member Author

Choose a reason for hiding this comment

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

This is now possible after DataDog/browser-sdk#1271 - it was nil before.

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.

🚀

@ncreated ncreated merged commit b0e30f9 into feature/hybrid-application Jan 19, 2022
@ncreated ncreated deleted the ncreated/RUMM-1911-prepare-webview-tracking-for-dogfooding branch January 19, 2022 13:32
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.

2 participants