-
-
Notifications
You must be signed in to change notification settings - Fork 359
Description
What React Native libraries do you use?
React Navigation
Are you using sentry.io or on-premise?
sentry.io (SaS)
Are you using any other error monitoring solution alongside Sentry?
No
Other Error Monitoring Solution Name
No response
@sentry/react-native SDK Version
7.12.1
How does your development environment look like?
JS Engine: Hermes
Architecture: The logs reference RN New Architecture indicators (TurboModules/Fabric are not explicitly confirmed but Hermes is present)
Build environment: uat (as seen in the session data: "environment": "uat")
Platform: Android (confirmed via the Android-specific logs, NDK paths, and sentry-android references). iOS was also mentioned as affected.
@sentry/react-native: 7.12.1
Sentry.init()
Configs
In App.tsx:
if (!__DEV__) {
Sentry.init({
// Core Configuration
dsn: Config.SENTRY_DSN,
environment: Config.BUILD_ENV,
release: getVersion(),
// Enable tracing for 100% of transactions
tracesSampleRate: 1.0,
// Watchdog termination tracking
enableWatchdogTerminationTracking: true,
enableAppStartTracking: true,
enableNativeFramesTracking: true,
enableStallTracking: true,
enableUserInteractionTracing: true,
// Integrations (includes routing + app start tracking)
integrations: getSentryIntegrations(),
// For app start tracking (cold/warm start)
enableAutoPerformanceTracing: true,
// CPU profiling for performance analysis
profilesSampleRate: 1.0,
// Track user sessions for release health
enableAutoSessionTracking: true,
// Capture native crashes
enableNativeCrashHandling: true,
// Add sentry-trace header to requests
tracePropagationTargets: ['localhost', /^\//],
});
}
Sentry/index.tsx:
———————————
const routingInstrumentation = reactNavigationIntegration({
// TTID: Time to first frame
enableTimeToInitialDisplay: true,
});
const injectNavigation = (
_navigation: NavigationContainerRef<RouteList> | null,
) => {
routingInstrumentation.registerNavigationContainer(_navigation);
};
const getSentryIntegrations = () => {
return [
reactNativeTracingIntegration({
// End transaction after idle period (9s for mobile networks)
idleTimeoutMs: 9000,
}),
routingInstrumentation,
];
};
Steps to Reproduce
- Configure @sentry/react-native v7.12.1 with
tracesSampleRate: 1.0andenableAppStartTracking: true. - Launch the app from a cold start.
- Observe that app.start.cold / app.start.warm spans are missing from the transaction in the Sentry dashboard.
Expected Result
Cold and warm start spans should be consistently attached to the first navigation transaction.
Actual Result
The following logs appear, but no app.start.cold or app.start.warm span is logged or sent:
[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call. [AppStart] Captured end frames for app start. { frozenFrames: 0, slowFrames: 0, totalFrames: 0 } [AppStart] App start tracking is enabled. App start will be added to the first transaction as a child span.
No [Tracing] Starting 'app.start.cold' span on transaction... log appears. The warning [ReactNativeTracing] Not instrumenting App Start because native returned null. does not appear either.
Metadata
Metadata
Assignees
Labels
Fields
Give feedbackProjects
Status