test(e2e): Add TurboModule sample coverage and e2e validation - #6549
Draft
alwx wants to merge 1 commit into
Draft
Conversation
Extends the sample TurboModules with a synchronous `NativeSampleModule.add` and an asynchronous `NativePlatformSampleModule.getPlatform` so the whole instrumentation stack can be exercised end to end. - New "TurboModule Playground" screen on the Errors tab runs both calls inside a manual root span, renders the resulting `turbo_module.*` span attributes on device and offers throw-from-native buttons for the crash-context path. - The sample now configures `turboModuleContextIntegration` with its own modules instead of relying on the default (which only tracks `RNSentry`). - Maestro flow plus a Jest e2e test asserting the aggregated and per-method `turbo_module.*` attributes on the transaction envelope. - Micro-benchmark printing the per-call latency of the TurboModule wrapper with and without tracking into the CI output.
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Uses
samples/react-native/tm/as the canonical fixture for verifying the TurboModule instrumentation stack end to end.NativeSampleModule.add(a, b)(sync, C++) andNativePlatformSampleModule.getPlatform()(async, ObjC/Kotlin) added to the sample specs.turbo_module.*span attributes on device, and has throw-from-native buttons for the crash-context path.turboModuleContextIntegrationwith its own modules (the default only tracksRNSentry).turbo_module.*attributes on the transaction envelope.packages/coremicro-benchmark printing per-call wrapper latency with and without tracking into the CI output.The Maestro flow lives in
samples/react-native/e2e/tests/, which runs fromsample-application.ymland is already behind theready-to-mergegate. The benchmark lives inpackages/corerather thanperformance-tests/TestAppSentry/, which only measures app-start time and binary size on Sauce Labs and has no in-app latency harness.💡 Motivation and Context
Closes #6167
💚 How did you test it?
packages/core:yarn jest test/turbomodule(new benchmark prints ~1.1us/call sync, ~1.3us/call async overhead) and the full suite.samples/react-native:tsc --noEmit,oxlint,prettier --check,jest.clang-format,ktlint.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Run the e2e job with the
ready-to-mergelabel to validate the Maestro flow on iOS and Android.