You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JS-side integration: attach TurboModule stats to active spans #6165
Native gives us the data; the JS layer is where it has to land on the right span. Today, idle navigation spans (reactnavigation.ts, expoRouter.ts) and the user's own Sentry.startSpan(...) calls have no visibility into native module work that happened during them.
Goal
New integration: turboModulesIntegration() exported from packages/core/src/js/integrations/exports.ts.
On install, the integration:
Calls into the native sink (Issue 1) to start a logical "JS observation window" tied to the active span (using getActiveSpan()).
On span end, pulls a delta of aggregate stats since the window started and attaches them as attributes (turbo_module.<name>.<method>.call_count, ..._duration_ms, ..._error_count) — capped to top-N modules by duration to keep payload size sane.
Adds a breadcrumb (category: 'native.turbo_module', level: 'info') for any async call that exceeded a configurable threshold (slowCallThresholdMs, default 500ms) including module + method + duration.
Surface a tiny JS API for users who want explicit attribution:
Sentry.startSpan({name: 'load profile'},async()=>{// any TurboModule activity inside this callback is automatically attached});
Auto-enabled when enableTurboModuleTracking (Issue 1) is on; no-op otherwise.
Activity
linear-code commentedon May 18, 2026
RN-641
feat(core): Attach TurboModule breakdown to active spans on spanEnd
feat(core): Attach TurboModule breakdown to active spans on spanEnd
feat(core): Attach TurboModule breakdown to active spans on spanEnd (#…
github-actions commentedon Jul 30, 2026
A PR closing this issue has just been released 🚀
This issue was referenced by PR #6478, which was included in the 8.21.0 release.