Skip to content

App start duration is over a minute long, not adding app start span #4438

Closed
@asnaseer

Description

@asnaseer

What React Native libraries do you use?

Expo (mobile only), Expo Application Services (EAS), React Navigation

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

5.36.0

How does your development environment look like?

info Fetching system and libraries information...
System:
OS: macOS 13.7.2
CPU: (8) x64 Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz
Memory: 1.17 GB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 18.20.2
path: ~/.nvm/versions/node/v18.20.2/bin/node
Yarn:
version: 1.22.10
path: /usr/local/bin/yarn
npm:
version: 10.5.0
path: ~/.nvm/versions/node/v18.20.2/bin/npm
Watchman: Not Found
Managers:
CocoaPods:
version: 1.15.2
path: /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.2
- iOS 17.2
- macOS 14.2
- tvOS 17.2
- visionOS 1.0
- watchOS 10.2
Android SDK:
API Levels:
- "31"
- "34"
Build Tools:
- 31.0.0
- 33.0.1
- 34.0.0
System Images:
- android-31 | Intel x86_64 Atom
Android NDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10811636
Xcode:
version: 15.2/15C500b
path: /usr/bin/xcodebuild
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.1.3
wanted: latest
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.5
wanted: 0.74.5
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false

Sentry.init()

import * as Sentry from "@sentry/react-native";

export const sentryReactNavigationInstrumentation =
  new Sentry.ReactNavigationInstrumentation({
    enableTimeToInitialDisplay: true,
  });

const reactNativeTracingIntegration = new Sentry.ReactNativeTracing({
  routingInstrumentation: sentryReactNavigationInstrumentation,
});

export const initSentry = (): void => {
  Sentry.init({
    dsn: "https://...",
    enableAutoSessionTracking: true,
    enableAutoPerformanceTracing: true,
    enableUserInteractionTracing: true,
    environment: __DEV__ ? "development" : "production",
    debug: __DEV__,
    enableNative: true,
    integrations: (integrations) => {
      return [
        ...integrations.filter(
          (integration) => integration.name !== "ReactNativeTracing"
        ),
        reactNativeTracingIntegration,
        Sentry.hermesProfilingIntegration({
          platformProfilers: false,
        }),
      ];
    },
    tracePropagationTargets: [API_URL],
    tracesSampleRate: __DEV__ ? 1 : 0.1,
    profilesSampleRate: __DEV__ ? 1 : 0.1,
    maxValueLength: 2048,
  });
};

In a separate file:

    ...
    return <NavigationContainer
      ...
      onReady={() => {
        sentryReactNavigationInstrumentation.registerNavigationContainer(navigationRef);
      }}
    >...</NavigationContainer>;
    ...

Steps to Reproduce

  1. yarn start
  2. then scan QR code on Google Pixel 4a mobile
  3. I then see this logging from Sentry in the console:
 WARN  Sentry Logger [warn]: You appear to have multiple versions of the "promise" package installed. This may cause unexpected behavior like undefined `Promise.allSettled`. Please install the `promise` package manually using the exact version as the React Native package. See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.
 LOG  Sentry Logger [log]: Unhandled promise rejections will be caught by Sentry.
 LOG  Sentry Logger [log]: Integration installed: ReactNativeErrorHandlers
 LOG  Sentry Logger [log]: Integration installed: NativeLinkedErrors
 LOG  Sentry Logger [log]: Integration installed: InboundFilters
 LOG  Sentry Logger [log]: Integration installed: FunctionToString
 LOG  Sentry Logger [log]: Integration installed: Breadcrumbs
 LOG  Sentry Logger [log]: Integration installed: Dedupe
 LOG  Sentry Logger [log]: Integration installed: HttpContext
 LOG  Sentry Logger [log]: Integration installed: Release
 LOG  Sentry Logger [log]: Integration installed: EventOrigin
 LOG  Sentry Logger [log]: Integration installed: SdkInfo
 LOG  Sentry Logger [log]: Integration installed: ReactNativeInfo
 LOG  Sentry Logger [log]: Integration installed: DebugSymbolicator
 LOG  Sentry Logger [log]: Integration installed: RewriteFrames
 LOG  Sentry Logger [log]: Integration installed: DeviceContext
 LOG  Sentry Logger [log]: Integration installed: ModulesLoader
 LOG  Sentry Logger [log]: Integration installed: HermesProfiling
 LOG  Sentry Logger [log]: [ReactNativeTracing] Native frames instrumentation initialized.
 LOG  Sentry Logger [log]: Setting idle transaction on scope. Span ID: 9752cbdc0639aad7
 LOG  Sentry Logger [log]: [Tracing] starting navigation transaction - Route Change
 LOG  Sentry Logger [log]: Starting heartbeat
 LOG  Sentry Logger [log]: pinging Heartbeat -> current counter: 0
 LOG  Sentry Logger [log]: [NATIVE] Start Profiling
 LOG  Sentry Logger [log]: [Profiling] started profiling:  69506c4e73ae4af48a90ec17275c7f01
 WARN  Sentry Logger [warn]: [ReactNativeTracing] onTransactionStart called with delay (larger than margin of error) for transaction Route Change (9752cbdc0639aad7). Not fetching native frames or tracking stalls.
 LOG  Sentry Logger [log]: [ReactNativeTracing] Starting navigation transaction "Route Change" on scope
 LOG  Sentry Logger [log]: [Tracing] pushActivity: 87e327e289c1f318
 LOG  Sentry Logger [log]: [Tracing] new activities count 1
 LOG  Sentry Logger [log]: [Tracing] Starting 'navigation.processing' span on transaction 'Navigation processing' (9752cbdc0639aad7).
 LOG  Sentry Logger [log]: Integration installed: ReactNativeTracing
 LOG  Sentry Logger [log]: Integration installed: react-navigation-v5
 LOG  Sentry Logger [log]: Integration installed: ReactNativeUserInteractionTracing
 LOG  Sentry Logger [log]: [Tracing] pushActivity: b45e0b8e4ab358d9
 LOG  Sentry Logger [log]: [Tracing] new activities count 2
 LOG  Sentry Logger [log]: [Tracing] Starting 'ui.react.mount' span on transaction '<Root>' (9752cbdc0639aad7).
 LOG  Sentry Logger [log]: [Tracing] popActivity b45e0b8e4ab358d9
 LOG  Sentry Logger [log]: [Tracing] new activities count 1
 LOG  Sentry Logger [log]: Integration installed: ReactNativeProfiler
 LOG  Sentry Logger [log]: Integration installed: TouchEventBoundary
 LOG  Sentry Logger [log]: [Tracing] pushActivity: 9661e89d85c50e9d
 LOG  Sentry Logger [log]: [Tracing] new activities count 2
 LOG  Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'GET https://cdn-settings.segment.com/v1/projects/__DEV__/settings' (9752cbdc0639aad7).
 LOG  Sentry Logger [log]: [Tracing] pushActivity: b1f7a91299d4814b
 LOG  Sentry Logger [log]: [Tracing] new activities count 3
 LOG  Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'GET https://cdn.growthbook.io/api/features/sdk-sdxocdjfHOEz1bms' (9752cbdc0639aad7).
 LOG  Sentry Logger [log]: [Tracing] pushActivity: a59ae85bd9f584e2
 LOG  Sentry Logger [log]: [Tracing] new activities count 4
 LOG  Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'POST http://...:8081/symbolicate' (9752cbdc0639aad7).
 LOG  Sentry Logger [log]: [Tracing] pushActivity: 935a443ba55894af
 LOG  Sentry Logger [log]: [Tracing] new activities count 5
 LOG  Sentry Logger [log]: [Tracing] Starting 'http.client' span on transaction 'POST https://identitytoolkit.googleapis.com/v1/accounts:lookup?key=...' (9752cbdc0639aad7).
 LOG  Sentry Logger [log]: [Tracing] popActivity a59ae85bd9f584e2
 LOG  Sentry Logger [log]: [Tracing] new activities count 4
 LOG  Sentry Logger [log]: [Tracing] popActivity b1f7a91299d4814b
 LOG  Sentry Logger [log]: [Tracing] new activities count 3
 LOG  Sentry Logger [log]: [Tracing] finishing IdleTransaction 2025-01-13T09:25:48.300Z navigation
 DEBUG  Sentry Logger [debug]: Removing AppState listener for navigation transaction.
 LOG  Sentry Logger [log]: [StallTracking] Stall measurements were not added to transaction due to exceeding the max count.
 WARN  Sentry Logger [warn]: [ReactNativeTracing] App start duration is over a minute long, not adding app start span.
 LOG  Sentry Logger [log]: [Tracing] cancelling span since transaction ended early {
  "data": {
    "sentry.origin": "manual",
    "sentry.op": "navigation.processing"
  },
  "description": "Navigation processing",
  "op": "navigation.processing",
  "parent_span_id": "9752cbdc0639aad7",
  "span_id": "87e327e289c1f318",
  "start_timestamp": 1736760347.2149503,
  "status": "cancelled",
  "timestamp": 1736760348.3000896,
  "trace_id": "9994af8fd194415d852d39c398aa1302",
  "origin": "manual"
}
 LOG  Sentry Logger [log]: [Tracing] cancelling span since transaction ended early {
  "data": {
    "sentry.origin": "auto.http.browser",
    "sentry.op": "http.client",
    "type": "xhr",
    "http.method": "GET",
    "url": "https://cdn-settings.segment.com/v1/projects/__DEV__/settings"
  },
  "description": "GET https://cdn-settings.segment.com/v1/projects/__DEV__/settings",
  "op": "http.client",
  "parent_span_id": "9752cbdc0639aad7",
  "span_id": "9661e89d85c50e9d",
  "start_timestamp": 1736760347.8097413,
  "status": "cancelled",
  "timestamp": 1736760348.3000896,
  "trace_id": "9994af8fd194415d852d39c398aa1302",
  "origin": "auto.http.browser"
}
 LOG  Sentry Logger [log]: [Tracing] cancelling span since transaction ended early {
  "data": {
    "sentry.origin": "auto.http.browser",
    "sentry.op": "http.client",
    "type": "xhr",
    "http.method": "POST",
    "url": "https://identitytoolkit.googleapis.com/v1/accounts:lookup?key=..."
  },
  "description": "POST https://identitytoolkit.googleapis.com/v1/accounts:lookup?key=...",
  "op": "http.client",
  "parent_span_id": "9752cbdc0639aad7",
  "span_id": "935a443ba55894af",
  "start_timestamp": 1736760348.1031985,
  "status": "cancelled",
  "timestamp": 1736760348.3000896,
  "trace_id": "9994af8fd194415d852d39c398aa1302",
  "origin": "auto.http.browser"
}
 LOG  Sentry Logger [log]: [Tracing] flushing IdleTransaction
 WARN  Sentry Logger [warn]: [NATIVE] Stop Profiling Failed: No Android Profile
 LOG  Sentry Logger [log]: [Profiling] finished profiling:  69506c4e73ae4af48a90ec17275c7f01
 LOG  Sentry Logger [log]: [Tracing] Discarding transaction because its trace was not chosen to be sampled.
 LOG  Sentry Logger [log]: Recording outcome: "sample_rate:transaction"
 LOG  Sentry Logger [log]: [ReactNavigationInstrumentation] Navigation container registered, but integration has not been setup yet.
 LOG  Sentry Logger [log]: [NativeFrames] Native frames timed out for ui.load transaction Route Change. Not adding native frames measurements.

Expected Result

I did not expect to see these in the log above:

 ...
 LOG  Sentry Logger [log]: [StallTracking] Stall measurements were not added to transaction due to exceeding the max count.
 WARN  Sentry Logger [warn]: [ReactNativeTracing] App start duration is over a minute long, not adding app start span.
 ...
 WARN  Sentry Logger [warn]: [NATIVE] Stop Profiling Failed: No Android Profile
 ...
 LOG  Sentry Logger [log]: [ReactNavigationInstrumentation] Navigation container registered, but integration has not been setup yet.
 LOG  Sentry Logger [log]: [NativeFrames] Native frames timed out for ui.load transaction Route Change. Not adding native frames measurements.

In the Sentry web page, I am clicking on Mobile in the left-hand-panel and expecting to see results in the tabs: Overview, App Starts, Screen Loads, Screen Rendering, Network Requests.

However, I only see data in the Overview and Network Requests tabs.

Could you please advise on how to fix this?

Actual Result

In the Sentry web page, after I click on Mobile in the left-hand-panel, I only see data in the Overview and Network Requests tabs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions