Skip to content

Commit 5aa6aff

Browse files
ref: Change native frames from traceId to spanId (#4030)
1 parent 74daa39 commit 5aa6aff

File tree

8 files changed

+572
-269
lines changed

8 files changed

+572
-269
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Changes
6+
7+
- Native Frames uses `spanId` to attach frames replacing `traceId` ([#4030](https://github.com/getsentry/sentry-react-native/pull/4030))
8+
59
### Dependencies
610

711
- Bump JavaScript SDK from v8.11.0 to v8.26.0 ([#3851](https://github.com/getsentry/sentry-react-native/pull/3851))

src/js/integrations/default.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ import {
1212
browserGlobalHandlersIntegration,
1313
browserLinkedErrorsIntegration,
1414
browserReplayIntegration,
15+
createNativeFramesIntegrations,
16+
createReactNativeRewriteFrames,
1517
debugSymbolicatorIntegration,
1618
dedupeIntegration,
1719
deviceContextIntegration,
@@ -24,7 +26,6 @@ import {
2426
inboundFiltersIntegration,
2527
mobileReplayIntegration,
2628
modulesLoaderIntegration,
27-
nativeFramesIntegration,
2829
nativeLinkedErrorsIntegration,
2930
nativeReleaseIntegration,
3031
reactNativeErrorHandlersIntegration,
@@ -36,7 +37,6 @@ import {
3637
userInteractionIntegration,
3738
viewHierarchyIntegration,
3839
} from './exports';
39-
import { createReactNativeRewriteFrames } from './rewriteframes';
4040

4141
/**
4242
* Returns the default ReactNative integrations based on the current environment.
@@ -104,8 +104,11 @@ export function getDefaultIntegrations(options: ReactNativeClientOptions): Integ
104104
if (hasTracingEnabled && options.enableAppStartTracking) {
105105
integrations.push(appStartIntegration());
106106
}
107-
if (hasTracingEnabled && options.enableNativeFramesTracking) {
108-
integrations.push(nativeFramesIntegration());
107+
const nativeFramesIntegrationInstance = createNativeFramesIntegrations(
108+
hasTracingEnabled && options.enableNativeFramesTracking,
109+
);
110+
if (nativeFramesIntegrationInstance) {
111+
integrations.push(nativeFramesIntegrationInstance);
109112
}
110113
if (hasTracingEnabled && options.enableStallTracking) {
111114
integrations.push(stallTrackingIntegration());

src/js/integrations/exports.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ export { expoContextIntegration } from './expocontext';
1414
export { spotlightIntegration } from './spotlight';
1515
export { mobileReplayIntegration } from '../replay/mobilereplay';
1616
export { appStartIntegration } from '../tracing/integrations/appStart';
17-
export { nativeFramesIntegration } from '../tracing/integrations/nativeFrames';
17+
export { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';
1818
export { stallTrackingIntegration } from '../tracing/integrations/stalltracking';
1919
export { userInteractionIntegration } from '../tracing/integrations/userInteraction';
20+
export { createReactNativeRewriteFrames } from './rewriteframes';
2021

2122
export {
2223
breadcrumbsIntegration,

0 commit comments

Comments
 (0)