@sentry/react-native 6.9.1 → 6.11.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +43 -21
- package/android/src/main/java/io/sentry/react/RNSentryOnDrawReporterManager.java +82 -51
- package/android/src/main/java/io/sentry/react/RNSentryTimeToDisplay.java +37 -0
- package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +10 -0
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +5 -0
- package/dist/js/NativeRNSentry.d.ts +2 -0
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/feedback/FeedbackWidget.js +3 -3
- package/dist/js/feedback/FeedbackWidget.js.map +1 -1
- package/dist/js/index.d.ts +2 -1
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js +2 -1
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/appRegistry.d.ts +8 -0
- package/dist/js/integrations/appRegistry.d.ts.map +1 -0
- package/dist/js/integrations/appRegistry.js +43 -0
- package/dist/js/integrations/appRegistry.js.map +1 -0
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +5 -1
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +2 -0
- package/dist/js/integrations/exports.d.ts.map +1 -1
- package/dist/js/integrations/exports.js +2 -0
- package/dist/js/integrations/exports.js.map +1 -1
- package/dist/js/replay/CustomMask.d.ts.map +1 -1
- package/dist/js/replay/CustomMask.js +3 -2
- package/dist/js/replay/CustomMask.js.map +1 -1
- package/dist/js/replay/mobilereplay.d.ts +23 -0
- package/dist/js/replay/mobilereplay.d.ts.map +1 -1
- package/dist/js/replay/mobilereplay.js +2 -0
- package/dist/js/replay/mobilereplay.js.map +1 -1
- package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
- package/dist/js/tracing/integrations/appStart.js +41 -9
- package/dist/js/tracing/integrations/appStart.js.map +1 -1
- package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts +4 -0
- package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts.map +1 -0
- package/dist/js/tracing/integrations/timeToDisplayIntegration.js +193 -0
- package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -0
- package/dist/js/tracing/ops.d.ts +2 -0
- package/dist/js/tracing/ops.d.ts.map +1 -1
- package/dist/js/tracing/ops.js +2 -0
- package/dist/js/tracing/ops.js.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
- package/dist/js/tracing/reactnativeprofiler.js +5 -0
- package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
- package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
- package/dist/js/tracing/reactnativetracing.js +2 -1
- package/dist/js/tracing/reactnativetracing.js.map +1 -1
- package/dist/js/tracing/reactnavigation.d.ts +20 -2
- package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
- package/dist/js/tracing/reactnavigation.js +69 -41
- package/dist/js/tracing/reactnavigation.js.map +1 -1
- package/dist/js/tracing/semanticAttributes.d.ts +2 -0
- package/dist/js/tracing/semanticAttributes.d.ts.map +1 -1
- package/dist/js/tracing/semanticAttributes.js +2 -0
- package/dist/js/tracing/semanticAttributes.js.map +1 -1
- package/dist/js/tracing/span.d.ts +13 -1
- package/dist/js/tracing/span.d.ts.map +1 -1
- package/dist/js/tracing/span.js +23 -0
- package/dist/js/tracing/span.js.map +1 -1
- package/dist/js/tracing/timeToDisplayFallback.d.ts +3 -0
- package/dist/js/tracing/timeToDisplayFallback.d.ts.map +1 -0
- package/dist/js/tracing/timeToDisplayFallback.js +21 -0
- package/dist/js/tracing/timeToDisplayFallback.js.map +1 -0
- package/dist/js/tracing/timetodisplay.d.ts +29 -0
- package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
- package/dist/js/tracing/timetodisplay.js +43 -20
- package/dist/js/tracing/timetodisplay.js.map +1 -1
- package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
- package/dist/js/tracing/timetodisplaynative.js +2 -1
- package/dist/js/tracing/timetodisplaynative.js.map +1 -1
- package/dist/js/tracing/timetodisplaynative.types.d.ts +1 -3
- package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -1
- package/dist/js/tracing/timetodisplaynative.types.js.map +1 -1
- package/dist/js/utils/rnlibraries.d.ts +1 -1
- package/dist/js/utils/rnlibraries.d.ts.map +1 -1
- package/dist/js/utils/rnlibraries.js +5 -3
- package/dist/js/utils/rnlibraries.js.map +1 -1
- package/dist/js/utils/rnlibrariesinterface.d.ts +1 -0
- package/dist/js/utils/rnlibrariesinterface.d.ts.map +1 -1
- package/dist/js/utils/rnlibrariesinterface.js.map +1 -1
- package/dist/js/vendor/react-native/index.d.ts +3 -0
- package/dist/js/vendor/react-native/index.d.ts.map +1 -1
- package/dist/js/vendor/react-native/index.js.map +1 -1
- package/dist/js/vendor/react-navigation/types.d.ts +27 -0
- package/dist/js/vendor/react-navigation/types.d.ts.map +1 -0
- package/dist/js/vendor/react-navigation/types.js +3 -0
- package/dist/js/vendor/react-navigation/types.js.map +1 -0
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.d.ts.map +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +8 -0
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +34 -0
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +15 -6
- package/ios/RNSentryBreadcrumb.m +2 -1
- package/ios/RNSentryFramesTrackerListener.h +7 -3
- package/ios/RNSentryOnDrawReporter.h +6 -2
- package/ios/RNSentryOnDrawReporter.m +47 -20
- package/ios/RNSentryReplay.mm +3 -0
- package/ios/RNSentryTimeToDisplay.h +7 -0
- package/ios/RNSentryTimeToDisplay.m +69 -2
- package/ios/RNSentryVersion.m +1 -1
- package/package.json +4 -4
- package/plugin/build/withSentryAndroidGradlePlugin.js +4 -4
- package/scripts/sentry-xcode-debug-files.sh +1 -4
- package/scripts/sentry-xcode.sh +1 -4
- package/sentry.gradle +4 -2
- package/src/js/NativeRNSentry.ts +2 -0
- package/ts3.8/dist/js/NativeRNSentry.d.ts +2 -0
- package/ts3.8/dist/js/index.d.ts +2 -1
- package/ts3.8/dist/js/integrations/appRegistry.d.ts +8 -0
- package/ts3.8/dist/js/integrations/exports.d.ts +2 -0
- package/ts3.8/dist/js/replay/mobilereplay.d.ts +23 -0
- package/ts3.8/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts +4 -0
- package/ts3.8/dist/js/tracing/ops.d.ts +2 -0
- package/ts3.8/dist/js/tracing/reactnavigation.d.ts +20 -2
- package/ts3.8/dist/js/tracing/semanticAttributes.d.ts +2 -0
- package/ts3.8/dist/js/tracing/span.d.ts +13 -1
- package/ts3.8/dist/js/tracing/timeToDisplayFallback.d.ts +3 -0
- package/ts3.8/dist/js/tracing/timetodisplay.d.ts +29 -0
- package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +1 -3
- package/ts3.8/dist/js/utils/rnlibraries.d.ts +1 -1
- package/ts3.8/dist/js/utils/rnlibrariesinterface.d.ts +1 -0
- package/ts3.8/dist/js/vendor/react-native/index.d.ts +3 -0
- package/ts3.8/dist/js/vendor/react-navigation/types.d.ts +27 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
- package/ts3.8/dist/js/wrapper.d.ts +8 -0
- package/dist/js/utils/sentryeventemitter.d.ts +0 -24
- package/dist/js/utils/sentryeventemitter.d.ts.map +0 -1
- package/dist/js/utils/sentryeventemitter.js +0 -82
- package/dist/js/utils/sentryeventemitter.js.map +0 -1
- package/dist/js/utils/sentryeventemitterfallback.d.ts +0 -19
- package/dist/js/utils/sentryeventemitterfallback.d.ts.map +0 -1
- package/dist/js/utils/sentryeventemitterfallback.js +0 -78
- package/dist/js/utils/sentryeventemitterfallback.js.map +0 -1
- package/ts3.8/dist/js/utils/sentryeventemitter.d.ts +0 -24
- package/ts3.8/dist/js/utils/sentryeventemitterfallback.d.ts +0 -19
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appStart.js","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/appStart.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,eAAe,EACf,MAAM,EACN,gCAAgC,EAChC,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,cAAc,IAAI,0BAA0B,EAC5C,cAAc,IAAI,0BAA0B,GAC7C,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACL,cAAc,IAAI,iBAAiB,EACnC,cAAc,IAAI,iBAAiB,EACnC,OAAO,IAAI,UAAU,GACtB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE1F,MAAM,gBAAgB,GAAG,UAAU,CAAC;AAMpC;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,KAAM,CAAC;AAEzC,4FAA4F;AAC5F,MAAM,oBAAoB,GAAG,KAAM,CAAC;AAEpC,iCAAiC;AACjC,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC,IAAI,8BAA8B,GAAuB,SAAS,CAAC;AACnE,IAAI,sCAAsC,GAAG,KAAK,CAAC;AA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YACvC,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,UAAoB,EAAE,eAAwD;IACrG,MAAM,WAAW,GAAG,yBAAyB,EAAE,CAAC;IAEhD,iFAAiF;IACjF,yCAAyC;IACzC,6DAA6D;IAC7D,IAAI,WAAW,IAAI,WAAW,GAAG,eAAe,CAAC,gBAAgB,EAAE;QACjE,OAAO,mBAAmB,CAAC,UAAU,EAAE;YACrC,WAAW,EAAE,6BAA6B;YAC1C,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,WAAW,GAAG,IAAI;YAC7B,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,mBAAmB,CAAC,UAAU,EAAE;YACrC,WAAW,EAAE,YAAY;YACzB,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,eAAe,CAAC,gBAAgB,GAAG,IAAI;YAClD,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;KACJ;AACH,CAAC","sourcesContent":["/* eslint-disable complexity, max-lines */\nimport type { Client, Event, Integration, Span, SpanJSON, TransactionEvent } from '@sentry/core';\nimport {\n getCapturedScopesOnSpan,\n getClient,\n getCurrentScope,\n logger,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SentryNonRecordingSpan,\n startInactiveSpan,\n timestampInSeconds,\n} from '@sentry/core';\n\nimport {\n APP_START_COLD as APP_START_COLD_MEASUREMENT,\n APP_START_WARM as APP_START_WARM_MEASUREMENT,\n} from '../../measurements';\nimport type { NativeAppStartResponse } from '../../NativeRNSentry';\nimport type { ReactNativeClientOptions } from '../../options';\nimport { convertSpanToTransaction, isRootSpan, setEndTimeValue } from '../../utils/span';\nimport { NATIVE } from '../../wrapper';\nimport {\n APP_START_COLD as APP_START_COLD_OP,\n APP_START_WARM as APP_START_WARM_OP,\n UI_LOAD as UI_LOAD_OP,\n} from '../ops';\nimport { SPAN_ORIGIN_AUTO_APP_START, SPAN_ORIGIN_MANUAL_APP_START } from '../origin';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '../semanticAttributes';\nimport { createChildSpanJSON, createSpanJSON, getBundleStartTimestampMs } from '../utils';\n\nconst INTEGRATION_NAME = 'AppStart';\n\nexport type AppStartIntegration = Integration & {\n captureStandaloneAppStart: () => Promise<void>;\n};\n\n/**\n * We filter out app start more than 60s.\n * This could be due to many different reasons.\n * We've seen app starts with hours, days and even months.\n */\nconst MAX_APP_START_DURATION_MS = 60_000;\n\n/** We filter out App starts which timestamp is 60s and more before the transaction start */\nconst MAX_APP_START_AGE_MS = 60_000;\n\n/** App Start transaction name */\nconst APP_START_TX_NAME = 'App Start';\n\nlet recordedAppStartEndTimestampMs: number | undefined = undefined;\nlet isRecordedAppStartEndTimestampMsManual = false;\n\nlet rootComponentCreationTimestampMs: number | undefined = undefined;\nlet isRootComponentCreationTimestampMsManual = false;\n\n/**\n * Records the application start end.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n */\nexport function captureAppStart(): Promise<void> {\n return _captureAppStart({ isManual: true });\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport async function _captureAppStart({ isManual }: { isManual: boolean }): Promise<void> {\n const client = getClient();\n if (!client) {\n logger.warn('[AppStart] Could not capture App Start, missing client.');\n return;\n }\n\n isRecordedAppStartEndTimestampMsManual = isManual;\n _setAppStartEndTimestampMs(timestampInSeconds() * 1000);\n await client.getIntegrationByName<AppStartIntegration>(INTEGRATION_NAME)?.captureStandaloneAppStart();\n}\n\n/**\n * Sets the root component first constructor call timestamp.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n */\nexport function setRootComponentCreationTimestampMs(timestampMs: number): void {\n recordedAppStartEndTimestampMs &&\n logger.warn('Setting Root component creation timestamp after app start end is set.');\n rootComponentCreationTimestampMs && logger.warn('Overwriting already set root component creation timestamp.');\n rootComponentCreationTimestampMs = timestampMs;\n isRootComponentCreationTimestampMsManual = true;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport function _setRootComponentCreationTimestampMs(timestampMs: number): void {\n setRootComponentCreationTimestampMs(timestampMs);\n isRootComponentCreationTimestampMsManual = false;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport const _setAppStartEndTimestampMs = (timestampMs: number): void => {\n recordedAppStartEndTimestampMs && logger.warn('Overwriting already set app start.');\n recordedAppStartEndTimestampMs = timestampMs;\n};\n\n/**\n * For testing purposes only.\n *\n * @private\n */\nexport function _clearRootComponentCreationTimestampMs(): void {\n rootComponentCreationTimestampMs = undefined;\n}\n\n/**\n * Adds AppStart spans from the native layer to the transaction event.\n */\nexport const appStartIntegration = ({\n standalone = false,\n}: {\n /**\n * Should the integration send App Start as a standalone root span (transaction)?\n * If false, App Start will be added as a child span to the first transaction.\n *\n * @default false\n */\n standalone?: boolean;\n} = {}): AppStartIntegration => {\n let _client: Client | undefined = undefined;\n let isEnabled = true;\n let appStartDataFlushed = false;\n let firstStartedActiveRootSpanId: string | undefined = undefined;\n\n const setup = (client: Client): void => {\n _client = client;\n const { enableAppStartTracking } = client.getOptions() as ReactNativeClientOptions;\n\n if (!enableAppStartTracking) {\n isEnabled = false;\n logger.warn('[AppStart] App start tracking is disabled.');\n }\n\n client.on('spanStart', recordFirstStartedActiveRootSpanId);\n };\n\n const afterAllSetup = (_client: Client): void => {\n // TODO: automatically set standalone based on the presence of the native layer navigation integration\n };\n\n const processEvent = async (event: Event): Promise<Event> => {\n if (!isEnabled || standalone) {\n return event;\n }\n\n if (event.type !== 'transaction') {\n // App start data is only relevant for transactions\n return event;\n }\n\n await attachAppStartToTransactionEvent(event as TransactionEvent);\n\n return event;\n };\n\n const recordFirstStartedActiveRootSpanId = (rootSpan: Span): void => {\n if (firstStartedActiveRootSpanId) {\n return;\n }\n\n if (!isRootSpan(rootSpan)) {\n return;\n }\n\n setFirstStartedActiveRootSpanId(rootSpan.spanContext().spanId);\n };\n\n /**\n * For testing purposes only.\n * @private\n */\n const setFirstStartedActiveRootSpanId = (spanId: string | undefined): void => {\n firstStartedActiveRootSpanId = spanId;\n logger.debug('[AppStart] First started active root span id recorded.', firstStartedActiveRootSpanId);\n };\n\n async function captureStandaloneAppStart(): Promise<void> {\n if (!standalone) {\n logger.debug(\n '[AppStart] App start tracking is enabled. App start will be added to the first transaction as a child span.',\n );\n return;\n }\n\n logger.debug('[AppStart] App start tracking standalone root span (transaction).');\n\n const span = startInactiveSpan({\n forceTransaction: true,\n name: APP_START_TX_NAME,\n op: UI_LOAD_OP,\n });\n if (span instanceof SentryNonRecordingSpan) {\n // Tracing is disabled or the transaction was sampled\n return;\n }\n\n setEndTimeValue(span, timestampInSeconds());\n _client.emit('spanEnd', span);\n\n const event = convertSpanToTransaction(span);\n if (!event) {\n logger.warn('[AppStart] Failed to convert App Start span to transaction.');\n return;\n }\n\n await attachAppStartToTransactionEvent(event);\n if (!event.spans || event.spans.length === 0) {\n // No spans were added to the transaction, so we don't need to send it\n return;\n }\n\n const scope = getCapturedScopesOnSpan(span).scope || getCurrentScope();\n scope.captureEvent(event);\n }\n\n async function attachAppStartToTransactionEvent(event: TransactionEvent): Promise<void> {\n if (appStartDataFlushed) {\n // App start data is only relevant for the first transaction\n return;\n }\n\n if (!firstStartedActiveRootSpanId) {\n logger.warn('[AppStart] No first started active root span id recorded. Can not attach app start.');\n return;\n }\n\n if (!event.contexts || !event.contexts.trace) {\n logger.warn('[AppStart] Transaction event is missing trace context. Can not attach app start.');\n return;\n }\n\n if (firstStartedActiveRootSpanId !== event.contexts.trace.span_id) {\n logger.warn(\n '[AppStart] First started active root span id does not match the transaction event span id. Can not attached app start.',\n );\n return;\n }\n\n const appStart = await NATIVE.fetchNativeAppStart();\n if (!appStart) {\n logger.warn('[AppStart] Failed to retrieve the app start metrics from the native layer.');\n return;\n }\n if (appStart.has_fetched) {\n logger.warn('[AppStart] Measured app start metrics were already reported from the native layer.');\n return;\n }\n\n const appStartTimestampMs = appStart.app_start_timestamp_ms;\n if (!appStartTimestampMs) {\n logger.warn('[AppStart] App start timestamp could not be loaded from the native layer.');\n return;\n }\n\n const appStartEndTimestampMs = recordedAppStartEndTimestampMs || getBundleStartTimestampMs();\n if (!appStartEndTimestampMs) {\n logger.warn(\n '[AppStart] Javascript failed to record app start end. `setAppStartEndTimestampMs` was not called nor could the bundle start be found.',\n );\n return;\n }\n\n const isAppStartWithinBounds =\n !!event.start_timestamp && appStartTimestampMs >= event.start_timestamp - MAX_APP_START_AGE_MS;\n if (!__DEV__ && !isAppStartWithinBounds) {\n logger.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');\n return;\n }\n\n const appStartDurationMs = appStartEndTimestampMs - appStartTimestampMs;\n if (!__DEV__ && appStartDurationMs >= MAX_APP_START_DURATION_MS) {\n // Dev builds can have long app start waiting over minute for the first bundle to be produced\n logger.warn('[AppStart] App start duration is over a minute long, not adding app start span.');\n return;\n }\n\n appStartDataFlushed = true;\n\n event.contexts.trace.data = event.contexts.trace.data || {};\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_OP] = UI_LOAD_OP;\n event.contexts.trace.op = UI_LOAD_OP;\n\n const origin = isRecordedAppStartEndTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START;\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = origin;\n event.contexts.trace.origin = origin;\n\n const appStartTimestampSeconds = appStartTimestampMs / 1000;\n event.start_timestamp = appStartTimestampSeconds;\n\n event.spans = event.spans || [];\n /** event.spans reference */\n const children: SpanJSON[] = event.spans;\n\n const maybeTtidSpan = children.find(({ op }) => op === 'ui.load.initial_display');\n if (maybeTtidSpan) {\n maybeTtidSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_initial_display', maybeTtidSpan);\n }\n\n const maybeTtfdSpan = children.find(({ op }) => op === 'ui.load.full_display');\n if (maybeTtfdSpan) {\n maybeTtfdSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_full_display', maybeTtfdSpan);\n }\n\n const appStartEndTimestampSeconds = appStartEndTimestampMs / 1000;\n if (event.timestamp && event.timestamp < appStartEndTimestampSeconds) {\n logger.debug(\n '[AppStart] Transaction event timestamp is before app start end. Adjusting transaction event timestamp.',\n );\n event.timestamp = appStartEndTimestampSeconds;\n }\n\n const op = appStart.type === 'cold' ? APP_START_COLD_OP : APP_START_WARM_OP;\n const appStartSpanJSON: SpanJSON = createSpanJSON({\n op,\n description: appStart.type === 'cold' ? 'Cold App Start' : 'Warm App Start',\n start_timestamp: appStartTimestampSeconds,\n timestamp: appStartEndTimestampSeconds,\n trace_id: event.contexts.trace.trace_id,\n parent_span_id: event.contexts.trace.span_id,\n origin,\n });\n const jsExecutionSpanJSON = createJSExecutionStartSpan(appStartSpanJSON, rootComponentCreationTimestampMs);\n\n const appStartSpans = [\n appStartSpanJSON,\n ...(jsExecutionSpanJSON ? [jsExecutionSpanJSON] : []),\n ...convertNativeSpansToSpanJSON(appStartSpanJSON, appStart.spans),\n ];\n\n children.push(...appStartSpans);\n logger.debug('[AppStart] Added app start spans to transaction event.', JSON.stringify(appStartSpans, undefined, 2));\n\n const measurementKey = appStart.type === 'cold' ? APP_START_COLD_MEASUREMENT : APP_START_WARM_MEASUREMENT;\n const measurementValue = {\n value: appStartDurationMs,\n unit: 'millisecond',\n };\n event.measurements = event.measurements || {};\n event.measurements[measurementKey] = measurementValue;\n logger.debug(\n `[AppStart] Added app start measurement to transaction event.`,\n JSON.stringify(measurementValue, undefined, 2),\n );\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n afterAllSetup,\n processEvent,\n captureStandaloneAppStart,\n setFirstStartedActiveRootSpanId,\n } as AppStartIntegration;\n};\n\nfunction setSpanDurationAsMeasurementOnTransactionEvent(event: TransactionEvent, label: string, span: SpanJSON): void {\n if (!span.timestamp || !span.start_timestamp) {\n logger.warn('Span is missing start or end timestamp. Cam not set measurement on transaction event.');\n return;\n }\n\n event.measurements = event.measurements || {};\n event.measurements[label] = {\n value: (span.timestamp - span.start_timestamp) * 1000,\n unit: 'millisecond',\n };\n}\n\n/**\n * Adds JS Execution before React Root. If `Sentry.wrap` is not used, create a span for the start of JS Bundle execution.\n */\nfunction createJSExecutionStartSpan(\n parentSpan: SpanJSON,\n rootComponentCreationTimestampMs: number | undefined,\n): SpanJSON | undefined {\n const bundleStartTimestampMs = getBundleStartTimestampMs();\n if (!bundleStartTimestampMs) {\n return undefined;\n }\n\n if (!rootComponentCreationTimestampMs) {\n logger.warn('Missing the root component first constructor call timestamp.');\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Start',\n start_timestamp: bundleStartTimestampMs / 1000,\n timestamp: bundleStartTimestampMs / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Before React Root',\n start_timestamp: bundleStartTimestampMs / 1000,\n timestamp: rootComponentCreationTimestampMs / 1000,\n origin: isRootComponentCreationTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START,\n });\n}\n\n/**\n * Adds native spans to the app start span.\n */\nfunction convertNativeSpansToSpanJSON(parentSpan: SpanJSON, nativeSpans: NativeAppStartResponse['spans']): SpanJSON[] {\n return nativeSpans.map(span => {\n if (span.description === 'UIKit init') {\n return createUIKitSpan(parentSpan, span);\n }\n\n return createChildSpanJSON(parentSpan, {\n description: span.description,\n start_timestamp: span.start_timestamp_ms / 1000,\n timestamp: span.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n });\n}\n\n/**\n * UIKit init is measured by the native layers till the native SDK start\n * RN initializes the native SDK later, the end timestamp would be wrong\n */\nfunction createUIKitSpan(parentSpan: SpanJSON, nativeUIKitSpan: NativeAppStartResponse['spans'][number]): SpanJSON {\n const bundleStart = getBundleStartTimestampMs();\n\n // If UIKit init ends after the bundle start, the native SDK was auto-initialized\n // and so the end timestamp is incorrect.\n // The timestamps can't equal, as RN initializes after UIKit.\n if (bundleStart && bundleStart < nativeUIKitSpan.end_timestamp_ms) {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init to JS Exec Start',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: bundleStart / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n } else {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: nativeUIKitSpan.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"appStart.js","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/appStart.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EACL,uBAAuB,EACvB,SAAS,EACT,eAAe,EACf,MAAM,EACN,gCAAgC,EAChC,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EACL,cAAc,IAAI,0BAA0B,EAC5C,cAAc,IAAI,0BAA0B,GAC7C,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,wBAAwB,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EACL,cAAc,IAAI,iBAAiB,EACnC,cAAc,IAAI,iBAAiB,EACnC,OAAO,IAAI,UAAU,GACtB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,WAAW,CA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IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,IAAI,CAAC,kBAAkB,GAAG,IAAI;YAC/C,SAAS,EAAE,IAAI,CAAC,gBAAgB,GAAG,IAAI;YACvC,MAAM,EAAE,0BAA0B;SACnC,CAAC,CACH,CAAC;IACJ,CAAC,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,UAAoB,EAAE,eAAwD;IACrG,MAAM,WAAW,GAAG,yBAAyB,EAAE,CAAC;IAEhD,iFAAiF;IACjF,yCAAyC;IACzC,6DAA6D;IAC7D,IAAI,WAAW,IAAI,WAAW,GAAG,eAAe,CAAC,gBAAgB,EAAE;QACjE,OAAO,mBAAmB,CAAC,UAAU,EAAE;YACrC,WAAW,EAAE,6BAA6B;YAC1C,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,WAAW,GAAG,IAAI;YAC7B,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;KACJ;SAAM;QACL,OAAO,mBAAmB,CAAC,UAAU,EAAE;YACrC,WAAW,EAAE,YAAY;YACzB,eAAe,EAAE,eAAe,CAAC,kBAAkB,GAAG,IAAI;YAC1D,SAAS,EAAE,eAAe,CAAC,gBAAgB,GAAG,IAAI;YAClD,MAAM,EAAE,0BAA0B;SACnC,CAAC,CAAC;KACJ;AACH,CAAC","sourcesContent":["/* eslint-disable complexity, max-lines */\nimport type { Client, Event, Integration, Span, SpanJSON, TransactionEvent } from '@sentry/core';\nimport {\n getCapturedScopesOnSpan,\n getClient,\n getCurrentScope,\n logger,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SentryNonRecordingSpan,\n startInactiveSpan,\n timestampInSeconds,\n} from '@sentry/core';\n\nimport { getAppRegistryIntegration } from '../../integrations/appRegistry';\nimport {\n APP_START_COLD as APP_START_COLD_MEASUREMENT,\n APP_START_WARM as APP_START_WARM_MEASUREMENT,\n} from '../../measurements';\nimport type { NativeAppStartResponse } from '../../NativeRNSentry';\nimport type { ReactNativeClientOptions } from '../../options';\nimport { convertSpanToTransaction, isRootSpan, setEndTimeValue } from '../../utils/span';\nimport { NATIVE } from '../../wrapper';\nimport {\n APP_START_COLD as APP_START_COLD_OP,\n APP_START_WARM as APP_START_WARM_OP,\n UI_LOAD as UI_LOAD_OP,\n} from '../ops';\nimport { SPAN_ORIGIN_AUTO_APP_START, SPAN_ORIGIN_MANUAL_APP_START } from '../origin';\nimport { SEMANTIC_ATTRIBUTE_SENTRY_OP } from '../semanticAttributes';\nimport { setMainThreadInfo } from '../span';\nimport { createChildSpanJSON, createSpanJSON, getBundleStartTimestampMs } from '../utils';\n\nconst INTEGRATION_NAME = 'AppStart';\n\nexport type AppStartIntegration = Integration & {\n captureStandaloneAppStart: () => Promise<void>;\n};\n\n/**\n * We filter out app start more than 60s.\n * This could be due to many different reasons.\n * We've seen app starts with hours, days and even months.\n */\nconst MAX_APP_START_DURATION_MS = 60_000;\n\n/** We filter out App starts which timestamp is 60s and more before the transaction start */\nconst MAX_APP_START_AGE_MS = 60_000;\n\n/** App Start transaction name */\nconst APP_START_TX_NAME = 'App Start';\n\nlet recordedAppStartEndTimestampMs: number | undefined = undefined;\nlet isRecordedAppStartEndTimestampMsManual = false;\n\nlet rootComponentCreationTimestampMs: number | undefined = undefined;\nlet isRootComponentCreationTimestampMsManual = false;\n\n/**\n * Records the application start end.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n */\nexport function captureAppStart(): Promise<void> {\n return _captureAppStart({ isManual: true });\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport async function _captureAppStart({ isManual }: { isManual: boolean }): Promise<void> {\n const client = getClient();\n if (!client) {\n logger.warn('[AppStart] Could not capture App Start, missing client.');\n return;\n }\n\n isRecordedAppStartEndTimestampMsManual = isManual;\n _setAppStartEndTimestampMs(timestampInSeconds() * 1000);\n await client.getIntegrationByName<AppStartIntegration>(INTEGRATION_NAME)?.captureStandaloneAppStart();\n}\n\n/**\n * Sets the root component first constructor call timestamp.\n * Used automatically by `Sentry.wrap` and `Sentry.ReactNativeProfiler`.\n */\nexport function setRootComponentCreationTimestampMs(timestampMs: number): void {\n recordedAppStartEndTimestampMs &&\n logger.warn('Setting Root component creation timestamp after app start end is set.');\n rootComponentCreationTimestampMs && logger.warn('Overwriting already set root component creation timestamp.');\n rootComponentCreationTimestampMs = timestampMs;\n isRootComponentCreationTimestampMsManual = true;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport function _setRootComponentCreationTimestampMs(timestampMs: number): void {\n setRootComponentCreationTimestampMs(timestampMs);\n isRootComponentCreationTimestampMsManual = false;\n}\n\n/**\n * For internal use only.\n *\n * @private\n */\nexport const _setAppStartEndTimestampMs = (timestampMs: number): void => {\n recordedAppStartEndTimestampMs && logger.warn('Overwriting already set app start.');\n recordedAppStartEndTimestampMs = timestampMs;\n};\n\n/**\n * For testing purposes only.\n *\n * @private\n */\nexport function _clearRootComponentCreationTimestampMs(): void {\n rootComponentCreationTimestampMs = undefined;\n}\n\n/**\n * Adds AppStart spans from the native layer to the transaction event.\n */\nexport const appStartIntegration = ({\n standalone = false,\n}: {\n /**\n * Should the integration send App Start as a standalone root span (transaction)?\n * If false, App Start will be added as a child span to the first transaction.\n *\n * @default false\n */\n standalone?: boolean;\n} = {}): AppStartIntegration => {\n let _client: Client | undefined = undefined;\n let isEnabled = true;\n let appStartDataFlushed = false;\n let afterAllSetupCalled = false;\n let firstStartedActiveRootSpanId: string | undefined = undefined;\n\n const setup = (client: Client): void => {\n _client = client;\n const { enableAppStartTracking } = client.getOptions() as ReactNativeClientOptions;\n\n if (!enableAppStartTracking) {\n isEnabled = false;\n logger.warn('[AppStart] App start tracking is disabled.');\n }\n\n client.on('spanStart', recordFirstStartedActiveRootSpanId);\n };\n\n const afterAllSetup = (client: Client): void => {\n if (afterAllSetupCalled) {\n return;\n }\n afterAllSetupCalled = true;\n\n // TODO: automatically set standalone based on the presence of the native layer navigation integration\n\n getAppRegistryIntegration(client)?.onRunApplication(() => {\n if (appStartDataFlushed) {\n logger.log('[AppStartIntegration] Resetting app start data flushed flag based on runApplication call.');\n appStartDataFlushed = false;\n firstStartedActiveRootSpanId = undefined;\n } else {\n logger.log(\n '[AppStartIntegration] Waiting for initial app start was flush, before updating based on runApplication call.',\n );\n }\n });\n };\n\n const processEvent = async (event: Event): Promise<Event> => {\n if (!isEnabled || standalone) {\n return event;\n }\n\n if (event.type !== 'transaction') {\n // App start data is only relevant for transactions\n return event;\n }\n\n await attachAppStartToTransactionEvent(event as TransactionEvent);\n\n return event;\n };\n\n const recordFirstStartedActiveRootSpanId = (rootSpan: Span): void => {\n if (firstStartedActiveRootSpanId) {\n return;\n }\n\n if (!isRootSpan(rootSpan)) {\n return;\n }\n\n setFirstStartedActiveRootSpanId(rootSpan.spanContext().spanId);\n };\n\n /**\n * For testing purposes only.\n * @private\n */\n const setFirstStartedActiveRootSpanId = (spanId: string | undefined): void => {\n firstStartedActiveRootSpanId = spanId;\n logger.debug('[AppStart] First started active root span id recorded.', firstStartedActiveRootSpanId);\n };\n\n async function captureStandaloneAppStart(): Promise<void> {\n if (!standalone) {\n logger.debug(\n '[AppStart] App start tracking is enabled. App start will be added to the first transaction as a child span.',\n );\n return;\n }\n\n logger.debug('[AppStart] App start tracking standalone root span (transaction).');\n\n const span = startInactiveSpan({\n forceTransaction: true,\n name: APP_START_TX_NAME,\n op: UI_LOAD_OP,\n });\n if (span instanceof SentryNonRecordingSpan) {\n // Tracing is disabled or the transaction was sampled\n return;\n }\n\n setEndTimeValue(span, timestampInSeconds());\n _client.emit('spanEnd', span);\n\n const event = convertSpanToTransaction(span);\n if (!event) {\n logger.warn('[AppStart] Failed to convert App Start span to transaction.');\n return;\n }\n\n await attachAppStartToTransactionEvent(event);\n if (!event.spans || event.spans.length === 0) {\n // No spans were added to the transaction, so we don't need to send it\n return;\n }\n\n const scope = getCapturedScopesOnSpan(span).scope || getCurrentScope();\n scope.captureEvent(event);\n }\n\n async function attachAppStartToTransactionEvent(event: TransactionEvent): Promise<void> {\n if (appStartDataFlushed) {\n // App start data is only relevant for the first transaction of the app run\n return;\n }\n\n if (!firstStartedActiveRootSpanId) {\n logger.warn('[AppStart] No first started active root span id recorded. Can not attach app start.');\n return;\n }\n\n if (!event.contexts || !event.contexts.trace) {\n logger.warn('[AppStart] Transaction event is missing trace context. Can not attach app start.');\n return;\n }\n\n if (firstStartedActiveRootSpanId !== event.contexts.trace.span_id) {\n logger.warn(\n '[AppStart] First started active root span id does not match the transaction event span id. Can not attached app start.',\n );\n return;\n }\n\n const appStart = await NATIVE.fetchNativeAppStart();\n if (!appStart) {\n logger.warn('[AppStart] Failed to retrieve the app start metrics from the native layer.');\n return;\n }\n if (appStart.has_fetched) {\n logger.warn('[AppStart] Measured app start metrics were already reported from the native layer.');\n return;\n }\n\n const appStartTimestampMs = appStart.app_start_timestamp_ms;\n if (!appStartTimestampMs) {\n logger.warn('[AppStart] App start timestamp could not be loaded from the native layer.');\n return;\n }\n\n const appStartEndTimestampMs = recordedAppStartEndTimestampMs || getBundleStartTimestampMs();\n if (!appStartEndTimestampMs) {\n logger.warn(\n '[AppStart] Javascript failed to record app start end. `setAppStartEndTimestampMs` was not called nor could the bundle start be found.',\n );\n return;\n }\n\n const isAppStartWithinBounds =\n !!event.start_timestamp && appStartTimestampMs >= event.start_timestamp - MAX_APP_START_AGE_MS;\n if (!__DEV__ && !isAppStartWithinBounds) {\n logger.warn('[AppStart] App start timestamp is too far in the past to be used for app start span.');\n return;\n }\n\n const appStartDurationMs = appStartEndTimestampMs - appStartTimestampMs;\n if (!__DEV__ && appStartDurationMs >= MAX_APP_START_DURATION_MS) {\n // Dev builds can have long app start waiting over minute for the first bundle to be produced\n logger.warn('[AppStart] App start duration is over a minute long, not adding app start span.');\n return;\n }\n\n if (appStartDurationMs < 0) {\n // This can happen when MainActivity on Android is recreated,\n // and the app start end timestamp is not updated, for example\n // due to missing `Sentry.wrap(RootComponent)` call.\n logger.warn(\n '[AppStart] Last recorded app start end timestamp is before the app start timestamp.',\n 'This is usually caused by missing `Sentry.wrap(RootComponent)` call.',\n );\n return;\n }\n\n appStartDataFlushed = true;\n\n event.contexts.trace.data = event.contexts.trace.data || {};\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_OP] = UI_LOAD_OP;\n event.contexts.trace.op = UI_LOAD_OP;\n\n const origin = isRecordedAppStartEndTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START;\n event.contexts.trace.data[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] = origin;\n event.contexts.trace.origin = origin;\n\n const appStartTimestampSeconds = appStartTimestampMs / 1000;\n event.start_timestamp = appStartTimestampSeconds;\n\n event.spans = event.spans || [];\n /** event.spans reference */\n const children: SpanJSON[] = event.spans;\n\n const maybeTtidSpan = children.find(({ op }) => op === 'ui.load.initial_display');\n if (maybeTtidSpan) {\n maybeTtidSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_initial_display', maybeTtidSpan);\n }\n\n const maybeTtfdSpan = children.find(({ op }) => op === 'ui.load.full_display');\n if (maybeTtfdSpan) {\n maybeTtfdSpan.start_timestamp = appStartTimestampSeconds;\n setSpanDurationAsMeasurementOnTransactionEvent(event, 'time_to_full_display', maybeTtfdSpan);\n }\n\n const appStartEndTimestampSeconds = appStartEndTimestampMs / 1000;\n if (event.timestamp && event.timestamp < appStartEndTimestampSeconds) {\n logger.debug(\n '[AppStart] Transaction event timestamp is before app start end. Adjusting transaction event timestamp.',\n );\n event.timestamp = appStartEndTimestampSeconds;\n }\n\n const op = appStart.type === 'cold' ? APP_START_COLD_OP : APP_START_WARM_OP;\n const appStartSpanJSON: SpanJSON = createSpanJSON({\n op,\n description: appStart.type === 'cold' ? 'Cold App Start' : 'Warm App Start',\n start_timestamp: appStartTimestampSeconds,\n timestamp: appStartEndTimestampSeconds,\n trace_id: event.contexts.trace.trace_id,\n parent_span_id: event.contexts.trace.span_id,\n origin,\n });\n const jsExecutionSpanJSON = createJSExecutionStartSpan(appStartSpanJSON, rootComponentCreationTimestampMs);\n\n const appStartSpans = [\n appStartSpanJSON,\n ...(jsExecutionSpanJSON ? [jsExecutionSpanJSON] : []),\n ...convertNativeSpansToSpanJSON(appStartSpanJSON, appStart.spans),\n ];\n\n children.push(...appStartSpans);\n logger.debug('[AppStart] Added app start spans to transaction event.', JSON.stringify(appStartSpans, undefined, 2));\n\n const measurementKey = appStart.type === 'cold' ? APP_START_COLD_MEASUREMENT : APP_START_WARM_MEASUREMENT;\n const measurementValue = {\n value: appStartDurationMs,\n unit: 'millisecond',\n };\n event.measurements = event.measurements || {};\n event.measurements[measurementKey] = measurementValue;\n logger.debug(\n `[AppStart] Added app start measurement to transaction event.`,\n JSON.stringify(measurementValue, undefined, 2),\n );\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n afterAllSetup,\n processEvent,\n captureStandaloneAppStart,\n setFirstStartedActiveRootSpanId,\n } as AppStartIntegration;\n};\n\nfunction setSpanDurationAsMeasurementOnTransactionEvent(event: TransactionEvent, label: string, span: SpanJSON): void {\n if (!span.timestamp || !span.start_timestamp) {\n logger.warn('Span is missing start or end timestamp. Cam not set measurement on transaction event.');\n return;\n }\n\n event.measurements = event.measurements || {};\n event.measurements[label] = {\n value: (span.timestamp - span.start_timestamp) * 1000,\n unit: 'millisecond',\n };\n}\n\n/**\n * Adds JS Execution before React Root. If `Sentry.wrap` is not used, create a span for the start of JS Bundle execution.\n */\nfunction createJSExecutionStartSpan(\n parentSpan: SpanJSON,\n rootComponentCreationTimestampMs: number | undefined,\n): SpanJSON | undefined {\n const bundleStartTimestampMs = getBundleStartTimestampMs();\n if (!bundleStartTimestampMs) {\n return undefined;\n }\n\n const bundleStartTimestampSeconds = bundleStartTimestampMs / 1000;\n if (bundleStartTimestampSeconds < parentSpan.start_timestamp) {\n logger.warn('Bundle start timestamp is before the app start span start timestamp. Skipping JS execution span.');\n return undefined;\n }\n\n if (!rootComponentCreationTimestampMs) {\n logger.warn('Missing the root component first constructor call timestamp.');\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Start',\n start_timestamp: bundleStartTimestampSeconds,\n timestamp: bundleStartTimestampSeconds,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n\n return createChildSpanJSON(parentSpan, {\n description: 'JS Bundle Execution Before React Root',\n start_timestamp: bundleStartTimestampSeconds,\n timestamp: rootComponentCreationTimestampMs / 1000,\n origin: isRootComponentCreationTimestampMsManual ? SPAN_ORIGIN_MANUAL_APP_START : SPAN_ORIGIN_AUTO_APP_START,\n });\n}\n\n/**\n * Adds native spans to the app start span.\n */\nfunction convertNativeSpansToSpanJSON(parentSpan: SpanJSON, nativeSpans: NativeAppStartResponse['spans']): SpanJSON[] {\n return nativeSpans\n .filter(span => span.start_timestamp_ms / 1000 >= parentSpan.start_timestamp)\n .map(span => {\n if (span.description === 'UIKit init') {\n return setMainThreadInfo(createUIKitSpan(parentSpan, span));\n }\n\n return setMainThreadInfo(\n createChildSpanJSON(parentSpan, {\n description: span.description,\n start_timestamp: span.start_timestamp_ms / 1000,\n timestamp: span.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n }),\n );\n });\n}\n\n/**\n * UIKit init is measured by the native layers till the native SDK start\n * RN initializes the native SDK later, the end timestamp would be wrong\n */\nfunction createUIKitSpan(parentSpan: SpanJSON, nativeUIKitSpan: NativeAppStartResponse['spans'][number]): SpanJSON {\n const bundleStart = getBundleStartTimestampMs();\n\n // If UIKit init ends after the bundle start, the native SDK was auto-initialized\n // and so the end timestamp is incorrect.\n // The timestamps can't equal, as RN initializes after UIKit.\n if (bundleStart && bundleStart < nativeUIKitSpan.end_timestamp_ms) {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init to JS Exec Start',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: bundleStart / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n } else {\n return createChildSpanJSON(parentSpan, {\n description: 'UIKit Init',\n start_timestamp: nativeUIKitSpan.start_timestamp_ms / 1000,\n timestamp: nativeUIKitSpan.end_timestamp_ms / 1000,\n origin: SPAN_ORIGIN_AUTO_APP_START,\n });\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeToDisplayIntegration.d.ts","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/timeToDisplayIntegration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,WAAW,EAAY,MAAM,cAAc,CAAC;AAYjE,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAKhD,eAAO,MAAM,wBAAwB,QAAO,WAsE3C,CAAC"}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { logger } from '@sentry/core';
|
|
11
|
+
import { NATIVE } from '../../wrapper';
|
|
12
|
+
import { UI_LOAD_FULL_DISPLAY, UI_LOAD_INITIAL_DISPLAY } from '../ops';
|
|
13
|
+
import { SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY } from '../origin';
|
|
14
|
+
import { getReactNavigationIntegration } from '../reactnavigation';
|
|
15
|
+
import { SEMANTIC_ATTRIBUTE_ROUTE_HAS_BEEN_SEEN } from '../semanticAttributes';
|
|
16
|
+
import { SPAN_THREAD_NAME, SPAN_THREAD_NAME_JAVASCRIPT } from '../span';
|
|
17
|
+
import { getTimeToInitialDisplayFallback } from '../timeToDisplayFallback';
|
|
18
|
+
import { createSpanJSON } from '../utils';
|
|
19
|
+
export const INTEGRATION_NAME = 'TimeToDisplay';
|
|
20
|
+
const TIME_TO_DISPLAY_TIMEOUT_MS = 30000;
|
|
21
|
+
const isDeadlineExceeded = (durationMs) => durationMs > TIME_TO_DISPLAY_TIMEOUT_MS;
|
|
22
|
+
export const timeToDisplayIntegration = () => {
|
|
23
|
+
let enableTimeToInitialDisplayForPreloadedRoutes = false;
|
|
24
|
+
return {
|
|
25
|
+
name: INTEGRATION_NAME,
|
|
26
|
+
afterAllSetup(client) {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
enableTimeToInitialDisplayForPreloadedRoutes =
|
|
29
|
+
(_b = (_a = getReactNavigationIntegration(client)) === null || _a === void 0 ? void 0 : _a.options.enableTimeToInitialDisplayForPreloadedRoutes) !== null && _b !== void 0 ? _b : false;
|
|
30
|
+
},
|
|
31
|
+
processEvent: (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
32
|
+
var _a, _b, _c;
|
|
33
|
+
if (event.type !== 'transaction') {
|
|
34
|
+
// TimeToDisplay data is only relevant for transactions
|
|
35
|
+
return event;
|
|
36
|
+
}
|
|
37
|
+
const rootSpanId = event.contexts.trace.span_id;
|
|
38
|
+
if (!rootSpanId) {
|
|
39
|
+
logger.warn(`[${INTEGRATION_NAME}] No root span id found in transaction.`);
|
|
40
|
+
return event;
|
|
41
|
+
}
|
|
42
|
+
const transactionStartTimestampSeconds = event.start_timestamp;
|
|
43
|
+
if (!transactionStartTimestampSeconds) {
|
|
44
|
+
// This should never happen
|
|
45
|
+
logger.warn(`[${INTEGRATION_NAME}] No transaction start timestamp found in transaction.`);
|
|
46
|
+
return event;
|
|
47
|
+
}
|
|
48
|
+
event.spans = event.spans || [];
|
|
49
|
+
event.measurements = event.measurements || {};
|
|
50
|
+
const ttidSpan = yield addTimeToInitialDisplay({
|
|
51
|
+
event,
|
|
52
|
+
rootSpanId,
|
|
53
|
+
transactionStartTimestampSeconds,
|
|
54
|
+
enableTimeToInitialDisplayForPreloadedRoutes,
|
|
55
|
+
});
|
|
56
|
+
const ttfdSpan = yield addTimeToFullDisplay({ event, rootSpanId, transactionStartTimestampSeconds, ttidSpan });
|
|
57
|
+
if (ttidSpan && ttidSpan.start_timestamp && ttidSpan.timestamp) {
|
|
58
|
+
event.measurements['time_to_initial_display'] = {
|
|
59
|
+
value: (ttidSpan.timestamp - ttidSpan.start_timestamp) * 1000,
|
|
60
|
+
unit: 'millisecond',
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
if (ttfdSpan && ttfdSpan.start_timestamp && ttfdSpan.timestamp) {
|
|
64
|
+
const durationMs = (ttfdSpan.timestamp - ttfdSpan.start_timestamp) * 1000;
|
|
65
|
+
if (isDeadlineExceeded(durationMs)) {
|
|
66
|
+
event.measurements['time_to_full_display'] = event.measurements['time_to_initial_display'];
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
event.measurements['time_to_full_display'] = {
|
|
70
|
+
value: durationMs,
|
|
71
|
+
unit: 'millisecond',
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const newTransactionEndTimestampSeconds = Math.max((_a = ttidSpan === null || ttidSpan === void 0 ? void 0 : ttidSpan.timestamp) !== null && _a !== void 0 ? _a : -1, (_b = ttfdSpan === null || ttfdSpan === void 0 ? void 0 : ttfdSpan.timestamp) !== null && _b !== void 0 ? _b : -1, (_c = event.timestamp) !== null && _c !== void 0 ? _c : -1);
|
|
76
|
+
if (newTransactionEndTimestampSeconds !== -1) {
|
|
77
|
+
event.timestamp = newTransactionEndTimestampSeconds;
|
|
78
|
+
}
|
|
79
|
+
return event;
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
function addTimeToInitialDisplay({ event, rootSpanId, transactionStartTimestampSeconds, enableTimeToInitialDisplayForPreloadedRoutes, }) {
|
|
84
|
+
var _a;
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
const ttidEndTimestampSeconds = yield NATIVE.popTimeToDisplayFor(`ttid-${rootSpanId}`);
|
|
87
|
+
let ttidSpan = (_a = event.spans) === null || _a === void 0 ? void 0 : _a.find(span => span.op === UI_LOAD_INITIAL_DISPLAY);
|
|
88
|
+
if (ttidSpan && (ttidSpan.status === undefined || ttidSpan.status === 'ok') && !ttidEndTimestampSeconds) {
|
|
89
|
+
logger.debug(`[${INTEGRATION_NAME}] Ttid span already exists and is ok.`, ttidSpan);
|
|
90
|
+
return ttidSpan;
|
|
91
|
+
}
|
|
92
|
+
if (!ttidEndTimestampSeconds) {
|
|
93
|
+
logger.debug(`[${INTEGRATION_NAME}] No manual ttid end timestamp found for span ${rootSpanId}.`);
|
|
94
|
+
return addAutomaticTimeToInitialDisplay({
|
|
95
|
+
event,
|
|
96
|
+
rootSpanId,
|
|
97
|
+
transactionStartTimestampSeconds,
|
|
98
|
+
enableTimeToInitialDisplayForPreloadedRoutes,
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
if (ttidSpan && ttidSpan.status && ttidSpan.status !== 'ok') {
|
|
102
|
+
ttidSpan.status = 'ok';
|
|
103
|
+
ttidSpan.timestamp = ttidEndTimestampSeconds;
|
|
104
|
+
logger.debug(`[${INTEGRATION_NAME}] Updated existing ttid span.`, ttidSpan);
|
|
105
|
+
return ttidSpan;
|
|
106
|
+
}
|
|
107
|
+
ttidSpan = createSpanJSON({
|
|
108
|
+
op: UI_LOAD_INITIAL_DISPLAY,
|
|
109
|
+
description: 'Time To Initial Display',
|
|
110
|
+
start_timestamp: transactionStartTimestampSeconds,
|
|
111
|
+
timestamp: ttidEndTimestampSeconds,
|
|
112
|
+
origin: SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY,
|
|
113
|
+
parent_span_id: rootSpanId,
|
|
114
|
+
data: {
|
|
115
|
+
[SPAN_THREAD_NAME]: SPAN_THREAD_NAME_JAVASCRIPT,
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
logger.debug(`[${INTEGRATION_NAME}] Added ttid span to transaction.`, ttidSpan);
|
|
119
|
+
event.spans.push(ttidSpan);
|
|
120
|
+
return ttidSpan;
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
function addAutomaticTimeToInitialDisplay({ event, rootSpanId, transactionStartTimestampSeconds, enableTimeToInitialDisplayForPreloadedRoutes, }) {
|
|
124
|
+
var _a, _b, _c, _d, _e, _f;
|
|
125
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
126
|
+
const ttidNativeTimestampSeconds = yield NATIVE.popTimeToDisplayFor(`ttid-navigation-${rootSpanId}`);
|
|
127
|
+
const ttidFallbackTimestampSeconds = yield getTimeToInitialDisplayFallback(rootSpanId);
|
|
128
|
+
const hasBeenSeen = (_c = (_b = (_a = event.contexts) === null || _a === void 0 ? void 0 : _a.trace) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c[SEMANTIC_ATTRIBUTE_ROUTE_HAS_BEEN_SEEN];
|
|
129
|
+
if (hasBeenSeen && !enableTimeToInitialDisplayForPreloadedRoutes) {
|
|
130
|
+
logger.debug(`[${INTEGRATION_NAME}] Route has been seen and time to initial display is disabled for preloaded routes.`);
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
const ttidTimestampSeconds = ttidNativeTimestampSeconds !== null && ttidNativeTimestampSeconds !== void 0 ? ttidNativeTimestampSeconds : ttidFallbackTimestampSeconds;
|
|
134
|
+
if (!ttidTimestampSeconds) {
|
|
135
|
+
logger.debug(`[${INTEGRATION_NAME}] No automatic ttid end timestamp found for span ${rootSpanId}.`);
|
|
136
|
+
return undefined;
|
|
137
|
+
}
|
|
138
|
+
const viewNames = (_e = (_d = event.contexts) === null || _d === void 0 ? void 0 : _d.app) === null || _e === void 0 ? void 0 : _e.view_names;
|
|
139
|
+
const screenName = Array.isArray(viewNames) ? viewNames[0] : viewNames;
|
|
140
|
+
const ttidSpan = createSpanJSON({
|
|
141
|
+
op: UI_LOAD_INITIAL_DISPLAY,
|
|
142
|
+
description: screenName ? `${screenName} initial display` : 'Time To Initial Display',
|
|
143
|
+
start_timestamp: transactionStartTimestampSeconds,
|
|
144
|
+
timestamp: ttidTimestampSeconds,
|
|
145
|
+
origin: SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY,
|
|
146
|
+
parent_span_id: rootSpanId,
|
|
147
|
+
data: {
|
|
148
|
+
[SPAN_THREAD_NAME]: SPAN_THREAD_NAME_JAVASCRIPT,
|
|
149
|
+
},
|
|
150
|
+
});
|
|
151
|
+
event.spans = (_f = event.spans) !== null && _f !== void 0 ? _f : [];
|
|
152
|
+
event.spans.push(ttidSpan);
|
|
153
|
+
return ttidSpan;
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
function addTimeToFullDisplay({ event, rootSpanId, transactionStartTimestampSeconds, ttidSpan, }) {
|
|
157
|
+
var _a;
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const ttfdEndTimestampSeconds = yield NATIVE.popTimeToDisplayFor(`ttfd-${rootSpanId}`);
|
|
160
|
+
if (!ttidSpan || !ttfdEndTimestampSeconds) {
|
|
161
|
+
return undefined;
|
|
162
|
+
}
|
|
163
|
+
let ttfdSpan = (_a = event.spans) === null || _a === void 0 ? void 0 : _a.find(span => span.op === UI_LOAD_FULL_DISPLAY);
|
|
164
|
+
let ttfdAdjustedEndTimestampSeconds = ttfdEndTimestampSeconds;
|
|
165
|
+
const ttfdIsBeforeTtid = (ttidSpan === null || ttidSpan === void 0 ? void 0 : ttidSpan.timestamp) && ttfdEndTimestampSeconds < ttidSpan.timestamp;
|
|
166
|
+
if (ttfdIsBeforeTtid) {
|
|
167
|
+
ttfdAdjustedEndTimestampSeconds = ttidSpan.timestamp;
|
|
168
|
+
}
|
|
169
|
+
const durationMs = (ttfdAdjustedEndTimestampSeconds - transactionStartTimestampSeconds) * 1000;
|
|
170
|
+
if (ttfdSpan && ttfdSpan.status && ttfdSpan.status !== 'ok') {
|
|
171
|
+
ttfdSpan.status = 'ok';
|
|
172
|
+
ttfdSpan.timestamp = ttfdAdjustedEndTimestampSeconds;
|
|
173
|
+
logger.debug(`[${INTEGRATION_NAME}] Updated existing ttfd span.`, ttfdSpan);
|
|
174
|
+
return ttfdSpan;
|
|
175
|
+
}
|
|
176
|
+
ttfdSpan = createSpanJSON({
|
|
177
|
+
status: isDeadlineExceeded(durationMs) ? 'deadline_exceeded' : 'ok',
|
|
178
|
+
op: UI_LOAD_FULL_DISPLAY,
|
|
179
|
+
description: 'Time To Full Display',
|
|
180
|
+
start_timestamp: transactionStartTimestampSeconds,
|
|
181
|
+
timestamp: ttfdAdjustedEndTimestampSeconds,
|
|
182
|
+
origin: SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY,
|
|
183
|
+
parent_span_id: rootSpanId,
|
|
184
|
+
data: {
|
|
185
|
+
[SPAN_THREAD_NAME]: SPAN_THREAD_NAME_JAVASCRIPT,
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
logger.debug(`[${INTEGRATION_NAME}] Added ttfd span to transaction.`, ttfdSpan);
|
|
189
|
+
event.spans.push(ttfdSpan);
|
|
190
|
+
return ttfdSpan;
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
//# sourceMappingURL=timeToDisplayIntegration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"timeToDisplayIntegration.js","sourceRoot":"","sources":["../../../../src/js/tracing/integrations/timeToDisplayIntegration.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAC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AO,QAAQ,CAAC;;CACjB","sourcesContent":["import type { Event, Integration, SpanJSON } from '@sentry/core';\nimport { logger } from '@sentry/core';\n\nimport { NATIVE } from '../../wrapper';\nimport { UI_LOAD_FULL_DISPLAY, UI_LOAD_INITIAL_DISPLAY } from '../ops';\nimport { SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY, SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY } from '../origin';\nimport { getReactNavigationIntegration } from '../reactnavigation';\nimport { SEMANTIC_ATTRIBUTE_ROUTE_HAS_BEEN_SEEN } from '../semanticAttributes';\nimport { SPAN_THREAD_NAME, SPAN_THREAD_NAME_JAVASCRIPT } from '../span';\nimport { getTimeToInitialDisplayFallback } from '../timeToDisplayFallback';\nimport { createSpanJSON } from '../utils';\n\nexport const INTEGRATION_NAME = 'TimeToDisplay';\n\nconst TIME_TO_DISPLAY_TIMEOUT_MS = 30_000;\nconst isDeadlineExceeded = (durationMs: number): boolean => durationMs > TIME_TO_DISPLAY_TIMEOUT_MS;\n\nexport const timeToDisplayIntegration = (): Integration => {\n let enableTimeToInitialDisplayForPreloadedRoutes = false;\n\n return {\n name: INTEGRATION_NAME,\n afterAllSetup(client) {\n enableTimeToInitialDisplayForPreloadedRoutes =\n getReactNavigationIntegration(client)?.options.enableTimeToInitialDisplayForPreloadedRoutes ?? false;\n },\n processEvent: async event => {\n if (event.type !== 'transaction') {\n // TimeToDisplay data is only relevant for transactions\n return event;\n }\n\n const rootSpanId = event.contexts.trace.span_id;\n if (!rootSpanId) {\n logger.warn(`[${INTEGRATION_NAME}] No root span id found in transaction.`);\n return event;\n }\n\n const transactionStartTimestampSeconds = event.start_timestamp;\n if (!transactionStartTimestampSeconds) {\n // This should never happen\n logger.warn(`[${INTEGRATION_NAME}] No transaction start timestamp found in transaction.`);\n return event;\n }\n\n event.spans = event.spans || [];\n event.measurements = event.measurements || {};\n\n const ttidSpan = await addTimeToInitialDisplay({\n event,\n rootSpanId,\n transactionStartTimestampSeconds,\n enableTimeToInitialDisplayForPreloadedRoutes,\n });\n const ttfdSpan = await addTimeToFullDisplay({ event, rootSpanId, transactionStartTimestampSeconds, ttidSpan });\n\n if (ttidSpan && ttidSpan.start_timestamp && ttidSpan.timestamp) {\n event.measurements['time_to_initial_display'] = {\n value: (ttidSpan.timestamp - ttidSpan.start_timestamp) * 1000,\n unit: 'millisecond',\n };\n }\n\n if (ttfdSpan && ttfdSpan.start_timestamp && ttfdSpan.timestamp) {\n const durationMs = (ttfdSpan.timestamp - ttfdSpan.start_timestamp) * 1000;\n if (isDeadlineExceeded(durationMs)) {\n event.measurements['time_to_full_display'] = event.measurements['time_to_initial_display'];\n } else {\n event.measurements['time_to_full_display'] = {\n value: durationMs,\n unit: 'millisecond',\n };\n }\n }\n\n const newTransactionEndTimestampSeconds = Math.max(\n ttidSpan?.timestamp ?? -1,\n ttfdSpan?.timestamp ?? -1,\n event.timestamp ?? -1,\n );\n if (newTransactionEndTimestampSeconds !== -1) {\n event.timestamp = newTransactionEndTimestampSeconds;\n }\n\n return event;\n },\n };\n};\n\nasync function addTimeToInitialDisplay({\n event,\n rootSpanId,\n transactionStartTimestampSeconds,\n enableTimeToInitialDisplayForPreloadedRoutes,\n}: {\n event: Event;\n rootSpanId: string;\n transactionStartTimestampSeconds: number;\n enableTimeToInitialDisplayForPreloadedRoutes: boolean;\n}): Promise<SpanJSON | undefined> {\n const ttidEndTimestampSeconds = await NATIVE.popTimeToDisplayFor(`ttid-${rootSpanId}`);\n\n let ttidSpan: SpanJSON | undefined = event.spans?.find(span => span.op === UI_LOAD_INITIAL_DISPLAY);\n\n if (ttidSpan && (ttidSpan.status === undefined || ttidSpan.status === 'ok') && !ttidEndTimestampSeconds) {\n logger.debug(`[${INTEGRATION_NAME}] Ttid span already exists and is ok.`, ttidSpan);\n return ttidSpan;\n }\n\n if (!ttidEndTimestampSeconds) {\n logger.debug(`[${INTEGRATION_NAME}] No manual ttid end timestamp found for span ${rootSpanId}.`);\n return addAutomaticTimeToInitialDisplay({\n event,\n rootSpanId,\n transactionStartTimestampSeconds,\n enableTimeToInitialDisplayForPreloadedRoutes,\n });\n }\n\n if (ttidSpan && ttidSpan.status && ttidSpan.status !== 'ok') {\n ttidSpan.status = 'ok';\n ttidSpan.timestamp = ttidEndTimestampSeconds;\n logger.debug(`[${INTEGRATION_NAME}] Updated existing ttid span.`, ttidSpan);\n return ttidSpan;\n }\n\n ttidSpan = createSpanJSON({\n op: UI_LOAD_INITIAL_DISPLAY,\n description: 'Time To Initial Display',\n start_timestamp: transactionStartTimestampSeconds,\n timestamp: ttidEndTimestampSeconds,\n origin: SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY,\n parent_span_id: rootSpanId,\n data: {\n [SPAN_THREAD_NAME]: SPAN_THREAD_NAME_JAVASCRIPT,\n },\n });\n logger.debug(`[${INTEGRATION_NAME}] Added ttid span to transaction.`, ttidSpan);\n event.spans.push(ttidSpan);\n return ttidSpan;\n}\n\nasync function addAutomaticTimeToInitialDisplay({\n event,\n rootSpanId,\n transactionStartTimestampSeconds,\n enableTimeToInitialDisplayForPreloadedRoutes,\n}: {\n event: Event;\n rootSpanId: string;\n transactionStartTimestampSeconds: number;\n enableTimeToInitialDisplayForPreloadedRoutes: boolean;\n}): Promise<SpanJSON | undefined> {\n const ttidNativeTimestampSeconds = await NATIVE.popTimeToDisplayFor(`ttid-navigation-${rootSpanId}`);\n const ttidFallbackTimestampSeconds = await getTimeToInitialDisplayFallback(rootSpanId);\n\n const hasBeenSeen = event.contexts?.trace?.data?.[SEMANTIC_ATTRIBUTE_ROUTE_HAS_BEEN_SEEN];\n if (hasBeenSeen && !enableTimeToInitialDisplayForPreloadedRoutes) {\n logger.debug(\n `[${INTEGRATION_NAME}] Route has been seen and time to initial display is disabled for preloaded routes.`,\n );\n return undefined;\n }\n\n const ttidTimestampSeconds = ttidNativeTimestampSeconds ?? ttidFallbackTimestampSeconds;\n if (!ttidTimestampSeconds) {\n logger.debug(`[${INTEGRATION_NAME}] No automatic ttid end timestamp found for span ${rootSpanId}.`);\n return undefined;\n }\n\n const viewNames = event.contexts?.app?.view_names;\n const screenName = Array.isArray(viewNames) ? viewNames[0] : viewNames;\n\n const ttidSpan = createSpanJSON({\n op: UI_LOAD_INITIAL_DISPLAY,\n description: screenName ? `${screenName} initial display` : 'Time To Initial Display',\n start_timestamp: transactionStartTimestampSeconds,\n timestamp: ttidTimestampSeconds,\n origin: SPAN_ORIGIN_AUTO_UI_TIME_TO_DISPLAY,\n parent_span_id: rootSpanId,\n data: {\n [SPAN_THREAD_NAME]: SPAN_THREAD_NAME_JAVASCRIPT,\n },\n });\n event.spans = event.spans ?? [];\n event.spans.push(ttidSpan);\n return ttidSpan;\n}\n\nasync function addTimeToFullDisplay({\n event,\n rootSpanId,\n transactionStartTimestampSeconds,\n ttidSpan,\n}: {\n event: Event;\n rootSpanId: string;\n transactionStartTimestampSeconds: number;\n ttidSpan: SpanJSON | undefined;\n}): Promise<SpanJSON | undefined> {\n const ttfdEndTimestampSeconds = await NATIVE.popTimeToDisplayFor(`ttfd-${rootSpanId}`);\n\n if (!ttidSpan || !ttfdEndTimestampSeconds) {\n return undefined;\n }\n\n let ttfdSpan = event.spans?.find(span => span.op === UI_LOAD_FULL_DISPLAY);\n\n let ttfdAdjustedEndTimestampSeconds = ttfdEndTimestampSeconds;\n const ttfdIsBeforeTtid = ttidSpan?.timestamp && ttfdEndTimestampSeconds < ttidSpan.timestamp;\n if (ttfdIsBeforeTtid) {\n ttfdAdjustedEndTimestampSeconds = ttidSpan.timestamp;\n }\n\n const durationMs = (ttfdAdjustedEndTimestampSeconds - transactionStartTimestampSeconds) * 1000;\n\n if (ttfdSpan && ttfdSpan.status && ttfdSpan.status !== 'ok') {\n ttfdSpan.status = 'ok';\n ttfdSpan.timestamp = ttfdAdjustedEndTimestampSeconds;\n logger.debug(`[${INTEGRATION_NAME}] Updated existing ttfd span.`, ttfdSpan);\n return ttfdSpan;\n }\n\n ttfdSpan = createSpanJSON({\n status: isDeadlineExceeded(durationMs) ? 'deadline_exceeded' : 'ok',\n op: UI_LOAD_FULL_DISPLAY,\n description: 'Time To Full Display',\n start_timestamp: transactionStartTimestampSeconds,\n timestamp: ttfdAdjustedEndTimestampSeconds,\n origin: SPAN_ORIGIN_MANUAL_UI_TIME_TO_DISPLAY,\n parent_span_id: rootSpanId,\n data: {\n [SPAN_THREAD_NAME]: SPAN_THREAD_NAME_JAVASCRIPT,\n },\n });\n logger.debug(`[${INTEGRATION_NAME}] Added ttfd span to transaction.`, ttfdSpan);\n event.spans.push(ttfdSpan);\n return ttfdSpan;\n}\n"]}
|
package/dist/js/tracing/ops.d.ts
CHANGED
|
@@ -5,4 +5,6 @@ export declare const UI_ACTION = "ui.action";
|
|
|
5
5
|
export declare const UI_ACTION_TOUCH = "ui.action.touch";
|
|
6
6
|
export declare const APP_START_COLD = "app.start.cold";
|
|
7
7
|
export declare const APP_START_WARM = "app.start.warm";
|
|
8
|
+
export declare const UI_LOAD_INITIAL_DISPLAY = "ui.load.initial_display";
|
|
9
|
+
export declare const UI_LOAD_FULL_DISPLAY = "ui.load.full_display";
|
|
8
10
|
//# sourceMappingURL=ops.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/ops.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ops.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/ops.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC,eAAO,MAAM,OAAO,YAAY,CAAC;AACjC,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAC/C,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,eAAO,MAAM,oBAAoB,yBAAyB,CAAC"}
|
package/dist/js/tracing/ops.js
CHANGED
|
@@ -5,4 +5,6 @@ export const UI_ACTION = 'ui.action';
|
|
|
5
5
|
export const UI_ACTION_TOUCH = 'ui.action.touch';
|
|
6
6
|
export const APP_START_COLD = 'app.start.cold';
|
|
7
7
|
export const APP_START_WARM = 'app.start.warm';
|
|
8
|
+
export const UI_LOAD_INITIAL_DISPLAY = 'ui.load.initial_display';
|
|
9
|
+
export const UI_LOAD_FULL_DISPLAY = 'ui.load.full_display';
|
|
8
10
|
//# sourceMappingURL=ops.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ops.js","sourceRoot":"","sources":["../../../src/js/tracing/ops.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC","sourcesContent":["export const DEFAULT = 'default';\nexport const NAVIGATION = 'navigation';\n\nexport const UI_LOAD = 'ui.load';\nexport const UI_ACTION = 'ui.action';\nexport const UI_ACTION_TOUCH = 'ui.action.touch';\n\nexport const APP_START_COLD = 'app.start.cold';\nexport const APP_START_WARM = 'app.start.warm';\n"]}
|
|
1
|
+
{"version":3,"file":"ops.js","sourceRoot":"","sources":["../../../src/js/tracing/ops.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEvC,MAAM,CAAC,MAAM,OAAO,GAAG,SAAS,CAAC;AACjC,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAAC;AACrC,MAAM,CAAC,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEjD,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAC/C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AACjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,sBAAsB,CAAC","sourcesContent":["export const DEFAULT = 'default';\nexport const NAVIGATION = 'navigation';\n\nexport const UI_LOAD = 'ui.load';\nexport const UI_ACTION = 'ui.action';\nexport const UI_ACTION_TOUCH = 'ui.action.touch';\n\nexport const APP_START_COLD = 'app.start.cold';\nexport const APP_START_WARM = 'app.start.warm';\n\nexport const UI_LOAD_INITIAL_DISPLAY = 'ui.load.initial_display';\nexport const UI_LOAD_FULL_DISPLAY = 'ui.load.full_display';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnativeprofiler.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnativeprofiler.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"reactnativeprofiler.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnativeprofiler.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,QAAQ,EAAE,MAAM,eAAe,CAAC;AAapD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,QAAQ;IAC/C,SAAgB,IAAI,EAAE,MAAM,CAAyB;gBAElC,KAAK,EAAE,qBAAqB,CAAC,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;IAKnE;;OAEG;IACI,iBAAiB,IAAI,IAAI;IAQhC;;OAEG;IACH,OAAO,CAAC,eAAe;CAiBxB"}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { timestampInSeconds } from '@sentry/core';
|
|
2
2
|
import { getClient, Profiler } from '@sentry/react';
|
|
3
|
+
import { getAppRegistryIntegration } from '../integrations/appRegistry';
|
|
3
4
|
import { createIntegration } from '../integrations/factory';
|
|
4
5
|
import { _captureAppStart, _setRootComponentCreationTimestampMs } from '../tracing/integrations/appStart';
|
|
5
6
|
const ReactNativeProfilerGlobalState = {
|
|
6
7
|
appStartReported: false,
|
|
8
|
+
onRunApplicationHook: () => {
|
|
9
|
+
ReactNativeProfilerGlobalState.appStartReported = false;
|
|
10
|
+
},
|
|
7
11
|
};
|
|
8
12
|
/**
|
|
9
13
|
* Custom profiler for the React Native app root.
|
|
@@ -36,6 +40,7 @@ export class ReactNativeProfiler extends Profiler {
|
|
|
36
40
|
return;
|
|
37
41
|
}
|
|
38
42
|
client.addIntegration && client.addIntegration(createIntegration(this.name));
|
|
43
|
+
getAppRegistryIntegration(client).onRunApplication(ReactNativeProfilerGlobalState.onRunApplicationHook);
|
|
39
44
|
// eslint-disable-next-line @typescript-eslint/no-floating-promises
|
|
40
45
|
_captureAppStart({ isManual: false });
|
|
41
46
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnativeprofiler.js","sourceRoot":"","sources":["../../../src/js/tracing/reactnativeprofiler.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,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AAO,IAAI,OAAO,CAAC,IAAI,CAAC,sFAAsF,CAAC,CAAC;YAChH,OAAO;SACR;QAED,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,CAAC,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QAE7E,yBAAyB,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,8BAA8B,CAAC,oBAAoB,CAAC,CAAC;QAExG,mEAAmE;QACnE,gBAAgB,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;IACxC,CAAC;CACF","sourcesContent":["import { timestampInSeconds } from '@sentry/core';\nimport { getClient, Profiler } from '@sentry/react';\n\nimport { getAppRegistryIntegration } from '../integrations/appRegistry';\nimport { createIntegration } from '../integrations/factory';\nimport { _captureAppStart, _setRootComponentCreationTimestampMs } from '../tracing/integrations/appStart';\n\nconst ReactNativeProfilerGlobalState = {\n appStartReported: false,\n onRunApplicationHook: () => {\n ReactNativeProfilerGlobalState.appStartReported = false;\n },\n};\n\n/**\n * Custom profiler for the React Native app root.\n */\nexport class ReactNativeProfiler extends Profiler {\n public readonly name: string = 'ReactNativeProfiler';\n\n public constructor(props: ConstructorParameters<typeof Profiler>[0]) {\n _setRootComponentCreationTimestampMs(timestampInSeconds() * 1000);\n super(props);\n }\n\n /**\n * Get the app root mount time.\n */\n public componentDidMount(): void {\n super.componentDidMount();\n if (!ReactNativeProfilerGlobalState.appStartReported) {\n this._reportAppStart();\n ReactNativeProfilerGlobalState.appStartReported = true;\n }\n }\n\n /**\n * Notifies the Tracing integration that the app start has finished.\n */\n private _reportAppStart(): void {\n const client = getClient();\n\n if (!client) {\n // We can't use logger here because this will be logged before the `Sentry.init`.\n // eslint-disable-next-line no-console\n __DEV__ && console.warn('App Start Span could not be finished. `Sentry.wrap` was called before `Sentry.init`.');\n return;\n }\n\n client.addIntegration && client.addIntegration(createIntegration(this.name));\n\n getAppRegistryIntegration(client).onRunApplication(ReactNativeProfilerGlobalState.onRunApplicationHook);\n\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n _captureAppStart({ isManual: false });\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnativetracing.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnativetracing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAS,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOjF,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,gBAAgB,CAAC;IAElE;;;;;OAKG;IACH,0BAA0B,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/D;AASD,eAAO,MAAM,gCAAgC,EAAE,yBAI9C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,6BAA6B,aAC/B,QAAQ,yBAAyB,CAAC;aAElC,yBAAyB;WAC3B,uBAAuB;6BACL,MAAM,KAAK,IAAI;
|
|
1
|
+
{"version":3,"file":"reactnativetracing.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnativetracing.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAS,WAAW,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOjF,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD,MAAM,WAAW,yBAAyB;IACxC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,gBAAgB,CAAC;IAElE;;;;;OAKG;IACH,0BAA0B,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC/D;AASD,eAAO,MAAM,gCAAgC,EAAE,yBAI9C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,6BAA6B,aAC/B,QAAQ,yBAAyB,CAAC;aAElC,yBAAyB;WAC3B,uBAAuB;6BACL,MAAM,KAAK,IAAI;CA8DzC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AAE7F;;GAEG;AACH,wBAAgB,uCAAuC,IAAI,6BAA6B,GAAG,SAAS,CAOnG;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,GAAG,6BAA6B,GAAG,SAAS,CAE1G"}
|
|
@@ -3,7 +3,7 @@ import { instrumentOutgoingRequests } from '@sentry/browser';
|
|
|
3
3
|
import { getClient } from '@sentry/core';
|
|
4
4
|
import { isWeb } from '../utils/environment';
|
|
5
5
|
import { getDevServer } from './../integrations/debugsymbolicatorutils';
|
|
6
|
-
import { addDefaultOpForSpanFrom, defaultIdleOptions } from './span';
|
|
6
|
+
import { addDefaultOpForSpanFrom, addThreadInfoToSpan, defaultIdleOptions } from './span';
|
|
7
7
|
export const INTEGRATION_NAME = 'ReactNativeTracing';
|
|
8
8
|
function getDefaultTracePropagationTargets() {
|
|
9
9
|
if (isWeb()) {
|
|
@@ -39,6 +39,7 @@ export const reactNativeTracingIntegration = (options = {}) => {
|
|
|
39
39
|
finalOptions.shouldCreateSpanForRequest = finalShouldCreateSpanForRequest;
|
|
40
40
|
const setup = (client) => {
|
|
41
41
|
addDefaultOpForSpanFrom(client);
|
|
42
|
+
addThreadInfoToSpan(client);
|
|
42
43
|
instrumentOutgoingRequests(client, {
|
|
43
44
|
traceFetch: finalOptions.traceFetch,
|
|
44
45
|
traceXHR: finalOptions.traceXHR,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnativetracing.js","sourceRoot":"","sources":["../../../src/js/tracing/reactnativetracing.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"reactnativetracing.js","sourceRoot":"","sources":["../../../src/js/tracing/reactnativetracing.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE1F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able max-lines */\nimport { instrumentOutgoingRequests } from '@sentry/browser';\nimport type { Client, Event, Integration, StartSpanOptions } from '@sentry/core';\nimport { getClient } from '@sentry/core';\n\nimport { isWeb } from '../utils/environment';\nimport { getDevServer } from './../integrations/debugsymbolicatorutils';\nimport { addDefaultOpForSpanFrom, addThreadInfoToSpan, defaultIdleOptions } from './span';\n\nexport const INTEGRATION_NAME = 'ReactNativeTracing';\n\nexport interface ReactNativeTracingOptions {\n /**\n * The time that has to pass without any span being created.\n * If this time is exceeded, the idle span will finish.\n *\n * @default 1_000 (ms)\n */\n idleTimeoutMs?: number;\n\n /**\n * The max. time an idle span may run.\n * If this time is exceeded, the idle span will finish no matter what.\n *\n * @default 60_0000 (ms)\n */\n finalTimeoutMs?: number;\n\n /**\n * Flag to disable patching all together for fetch requests.\n *\n * @default true\n */\n traceFetch: boolean;\n\n /**\n * Flag to disable patching all together for xhr requests.\n *\n * @default true\n */\n traceXHR: boolean;\n\n /**\n * If true, Sentry will capture http timings and add them to the corresponding http spans.\n *\n * @default true\n */\n enableHTTPTimings: boolean;\n\n /**\n * A callback which is called before a span for a navigation is started.\n * It receives the options passed to `startSpan`, and expects to return an updated options object.\n */\n beforeStartSpan?: (options: StartSpanOptions) => StartSpanOptions;\n\n /**\n * This function will be called before creating a span for a request with the given url.\n * Return false if you don't want a span for the given url.\n *\n * @default (url: string) => true\n */\n shouldCreateSpanForRequest?(this: void, url: string): boolean;\n}\n\nfunction getDefaultTracePropagationTargets(): RegExp[] | undefined {\n if (isWeb()) {\n return undefined;\n }\n return [/.*/];\n}\n\nexport const defaultReactNativeTracingOptions: ReactNativeTracingOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n};\n\nexport type ReactNativeTracingState = {\n currentRoute: string | undefined;\n};\n\nexport const reactNativeTracingIntegration = (\n options: Partial<ReactNativeTracingOptions> = {},\n): Integration & {\n options: ReactNativeTracingOptions;\n state: ReactNativeTracingState;\n setCurrentRoute: (route: string) => void;\n} => {\n const state: ReactNativeTracingState = {\n currentRoute: undefined,\n };\n\n const finalOptions = {\n ...defaultReactNativeTracingOptions,\n ...options,\n beforeStartSpan: options.beforeStartSpan ?? ((options: StartSpanOptions) => options),\n finalTimeoutMs: options.finalTimeoutMs ?? defaultIdleOptions.finalTimeout,\n idleTimeoutMs: options.idleTimeoutMs ?? defaultIdleOptions.idleTimeout,\n };\n\n const userShouldCreateSpanForRequest = finalOptions.shouldCreateSpanForRequest;\n\n // Drop Dev Server Spans\n const devServerUrl = getDevServer()?.url;\n const finalShouldCreateSpanForRequest =\n devServerUrl === undefined\n ? userShouldCreateSpanForRequest\n : (url: string): boolean => {\n if (url.startsWith(devServerUrl)) {\n return false;\n }\n if (userShouldCreateSpanForRequest) {\n return userShouldCreateSpanForRequest(url);\n }\n return true;\n };\n\n finalOptions.shouldCreateSpanForRequest = finalShouldCreateSpanForRequest;\n\n const setup = (client: Client): void => {\n addDefaultOpForSpanFrom(client);\n addThreadInfoToSpan(client);\n\n instrumentOutgoingRequests(client, {\n traceFetch: finalOptions.traceFetch,\n traceXHR: finalOptions.traceXHR,\n shouldCreateSpanForRequest: finalOptions.shouldCreateSpanForRequest,\n tracePropagationTargets: client.getOptions().tracePropagationTargets || getDefaultTracePropagationTargets(),\n });\n };\n\n const processEvent = (event: Event): Event => {\n if (event.contexts && state.currentRoute) {\n event.contexts.app = { view_names: [state.currentRoute], ...event.contexts.app };\n }\n return event;\n };\n\n return {\n name: INTEGRATION_NAME,\n setup,\n processEvent,\n options: finalOptions,\n state,\n setCurrentRoute: (route: string) => {\n state.currentRoute = route;\n },\n };\n};\n\nexport type ReactNativeTracingIntegration = ReturnType<typeof reactNativeTracingIntegration>;\n\n/**\n * Returns the current React Native Tracing integration.\n */\nexport function getCurrentReactNativeTracingIntegration(): ReactNativeTracingIntegration | undefined {\n const client = getClient();\n if (!client) {\n return undefined;\n }\n\n return getReactNativeTracingIntegration(client);\n}\n\n/**\n * Returns React Native Tracing integration of given client.\n */\nexport function getReactNativeTracingIntegration(client: Client): ReactNativeTracingIntegration | undefined {\n return client.getIntegrationByName(INTEGRATION_NAME) as ReactNativeTracingIntegration | undefined;\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Integration } from '@sentry/core';
|
|
1
|
+
import type { Client, Integration } from '@sentry/core';
|
|
2
2
|
export declare const INTEGRATION_NAME = "ReactNavigation";
|
|
3
3
|
interface ReactNavigationIntegrationOptions {
|
|
4
4
|
/**
|
|
@@ -22,6 +22,19 @@ interface ReactNavigationIntegrationOptions {
|
|
|
22
22
|
* @default true
|
|
23
23
|
*/
|
|
24
24
|
ignoreEmptyBackNavigationTransactions: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Enabled measuring Time to Initial Display for routes that are already loaded in memory.
|
|
27
|
+
* (a.k.a., Routes that the navigation integration has already seen.)
|
|
28
|
+
*
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
enableTimeToInitialDisplayForPreloadedRoutes: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether to use the dispatched action data to populate the transaction metadata.
|
|
34
|
+
*
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
useDispatchedActionData: boolean;
|
|
25
38
|
}
|
|
26
39
|
/**
|
|
27
40
|
* Instrumentation for React-Navigation V5 and above. See docs or sample app for usage.
|
|
@@ -31,17 +44,22 @@ interface ReactNavigationIntegrationOptions {
|
|
|
31
44
|
* - `_onStateChange` is then called AFTER the state change happens due to a dispatch and sets the route context onto the active transaction.
|
|
32
45
|
* - If `_onStateChange` isn't called within `STATE_CHANGE_TIMEOUT_DURATION` of the dispatch, then the transaction is not sampled and finished.
|
|
33
46
|
*/
|
|
34
|
-
export declare const reactNavigationIntegration: ({ routeChangeTimeoutMs, enableTimeToInitialDisplay, ignoreEmptyBackNavigationTransactions, }?: Partial<ReactNavigationIntegrationOptions>) => Integration & {
|
|
47
|
+
export declare const reactNavigationIntegration: ({ routeChangeTimeoutMs, enableTimeToInitialDisplay, ignoreEmptyBackNavigationTransactions, enableTimeToInitialDisplayForPreloadedRoutes, useDispatchedActionData, }?: Partial<ReactNavigationIntegrationOptions>) => Integration & {
|
|
35
48
|
/**
|
|
36
49
|
* Pass the ref to the navigation container to register it to the instrumentation
|
|
37
50
|
* @param navigationContainerRef Ref to a `NavigationContainer`
|
|
38
51
|
*/
|
|
39
52
|
registerNavigationContainer: (navigationContainerRef: unknown) => void;
|
|
53
|
+
options: ReactNavigationIntegrationOptions;
|
|
40
54
|
};
|
|
41
55
|
export interface NavigationRoute {
|
|
42
56
|
name: string;
|
|
43
57
|
key: string;
|
|
44
58
|
params?: Record<string, any>;
|
|
45
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Returns React Navigation integration of the given client.
|
|
62
|
+
*/
|
|
63
|
+
export declare function getReactNavigationIntegration(client: Client): ReturnType<typeof reactNavigationIntegration> | undefined;
|
|
46
64
|
export {};
|
|
47
65
|
//# sourceMappingURL=reactnavigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactnavigation.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnavigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"reactnavigation.d.ts","sourceRoot":"","sources":["../../../src/js/tracing/reactnavigation.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,WAAW,EAAQ,MAAM,cAAc,CAAC;AA+B9D,eAAO,MAAM,gBAAgB,oBAAoB,CAAC;AAIlD,UAAU,iCAAiC;IACzC;;;;;OAKG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;;;;OAKG;IACH,0BAA0B,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,qCAAqC,EAAE,OAAO,CAAC;IAE/C;;;;;OAKG;IACH,4CAA4C,EAAE,OAAO,CAAC;IAEtD;;;;OAIG;IACH,uBAAuB,EAAE,OAAO,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,yKAMpC,QAAQ,iCAAiC,CAAC;IAC3C;;;OAGG;0DACmD,OAAO,KAAK,IAAI;aAC7D,iCAAiC;CA0S3C,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IAEZ,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAOD;;GAEG;AACH,wBAAgB,6BAA6B,CAC3C,MAAM,EAAE,MAAM,GACb,UAAU,CAAC,OAAO,0BAA0B,CAAC,GAAG,SAAS,CAE3D"}
|