Skip to content

Conversation

@louiszawadzki
Copy link
Contributor

What does this PR do?

For Core Testing to work on iOS it needs to be enabled before the SDK is initialized.
With the introduction of the native initialization, we could not perform this step with the current version of the Core Testing.

This PR adds a static method that can be called before the DD SDK is initialized so we can still collect events.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@louiszawadzki louiszawadzki requested a review from a team as a code owner March 26, 2024 16:13
self.coreProxy?.waitAndDeleteEvents(ofFeature: "logging")
self.coreProxy?.waitAndDeleteEvents(ofFeature: "tracing")
self.coreProxy?.waitAndDeleteEvents(ofFeature: "session-replay")
let coreProxy = (DatadogSDKWrapper.shared.getCoreInstance() as! DatadogCoreProxy)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I saw another potential solution to create a singleton to hold the proxied core instance, but I felt there was no point in adding another singleton to the one we already had that will return the proxied core given enable was called before.

@louiszawadzki louiszawadzki merged commit de33f74 into develop Mar 27, 2024
@louiszawadzki louiszawadzki deleted the louiszawadzki/rum-750/enable-core-testing-on-ios-for-native-init branch March 27, 2024 15:31
@marco-saia-datadog marco-saia-datadog mentioned this pull request Apr 12, 2024
4 tasks
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.

3 participants