Skip to content

Commit

Permalink
ref: Change native frames from traceId to spanId (#4030)
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Sep 2, 2024
1 parent 74daa39 commit 5aa6aff
Show file tree
Hide file tree
Showing 8 changed files with 572 additions and 269 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Changes

- Native Frames uses `spanId` to attach frames replacing `traceId` ([#4030](https://github.com/getsentry/sentry-react-native/pull/4030))

### Dependencies

- Bump JavaScript SDK from v8.11.0 to v8.26.0 ([#3851](https://github.com/getsentry/sentry-react-native/pull/3851))
Expand Down
11 changes: 7 additions & 4 deletions src/js/integrations/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import {
browserGlobalHandlersIntegration,
browserLinkedErrorsIntegration,
browserReplayIntegration,
createNativeFramesIntegrations,
createReactNativeRewriteFrames,
debugSymbolicatorIntegration,
dedupeIntegration,
deviceContextIntegration,
Expand All @@ -24,7 +26,6 @@ import {
inboundFiltersIntegration,
mobileReplayIntegration,
modulesLoaderIntegration,
nativeFramesIntegration,
nativeLinkedErrorsIntegration,
nativeReleaseIntegration,
reactNativeErrorHandlersIntegration,
Expand All @@ -36,7 +37,6 @@ import {
userInteractionIntegration,
viewHierarchyIntegration,
} from './exports';
import { createReactNativeRewriteFrames } from './rewriteframes';

/**
* Returns the default ReactNative integrations based on the current environment.
Expand Down Expand Up @@ -104,8 +104,11 @@ export function getDefaultIntegrations(options: ReactNativeClientOptions): Integ
if (hasTracingEnabled && options.enableAppStartTracking) {
integrations.push(appStartIntegration());
}
if (hasTracingEnabled && options.enableNativeFramesTracking) {
integrations.push(nativeFramesIntegration());
const nativeFramesIntegrationInstance = createNativeFramesIntegrations(
hasTracingEnabled && options.enableNativeFramesTracking,
);
if (nativeFramesIntegrationInstance) {
integrations.push(nativeFramesIntegrationInstance);
}
if (hasTracingEnabled && options.enableStallTracking) {
integrations.push(stallTrackingIntegration());
Expand Down
3 changes: 2 additions & 1 deletion src/js/integrations/exports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ export { expoContextIntegration } from './expocontext';
export { spotlightIntegration } from './spotlight';
export { mobileReplayIntegration } from '../replay/mobilereplay';
export { appStartIntegration } from '../tracing/integrations/appStart';
export { nativeFramesIntegration } from '../tracing/integrations/nativeFrames';
export { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';
export { stallTrackingIntegration } from '../tracing/integrations/stalltracking';
export { userInteractionIntegration } from '../tracing/integrations/userInteraction';
export { createReactNativeRewriteFrames } from './rewriteframes';

export {
breadcrumbsIntegration,
Expand Down
Loading

0 comments on commit 5aa6aff

Please sign in to comment.