Skip to content

Commit 65bb1ac

Browse files
todo comment and update interactionIdtoRouteNameMapping replay to replayid
1 parent 8b929bc commit 65bb1ac

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

packages/browser/src/profiling/utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,9 @@ export function createProfilingEvent(
583583
return createProfilePayload(profile_id, start_timestamp, profile, event);
584584
}
585585

586+
// TODO (v8): We need to obtain profile ids in @sentry-internal/tracing,
587+
// but we don't have access to this map because importing this map would
588+
// cause a circular dependancy. We need to resolve this in v8.
586589
const PROFILE_MAP: Map<string, JSSelfProfile> = new Map();
587590
/**
588591
*

packages/tracing-internal/src/browser/browserTracingIntegration.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,6 +547,7 @@ function registerInpInteractionListener(
547547
client !== undefined && client.getIntegrationByName !== undefined
548548
? (client.getIntegrationByName('Replay') as Integration & { getReplayId: () => string })
549549
: undefined;
550+
const replayId = replay !== undefined ? replay.getReplayId() : undefined;
550551
// eslint-disable-next-line deprecation/deprecation
551552
const activeTransaction = getActiveTransaction();
552553
const currentScope = getCurrentScope();
@@ -578,7 +579,7 @@ function registerInpInteractionListener(
578579
parentContext,
579580
user,
580581
activeTransaction,
581-
replay,
582+
replayId,
582583
};
583584
}
584585
}

packages/tracing-internal/src/browser/metrics/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,20 +213,19 @@ function _trackINP(interactionIdtoRouteNameMapping: InteractionRouteNameMapping)
213213
/** Build the INP span, create an envelope from the span, and then send the envelope */
214214
const startTime = msToSec((browserPerformanceTimeOrigin as number) + entry.startTime);
215215
const duration = msToSec(metric.value);
216-
const { routeName, parentContext, activeTransaction, user, replay } =
216+
const { routeName, parentContext, activeTransaction, user, replayId } =
217217
entry.interactionId !== undefined
218218
? interactionIdtoRouteNameMapping[entry.interactionId]
219219
: {
220220
routeName: undefined,
221221
parentContext: undefined,
222222
activeTransaction: undefined,
223223
user: undefined,
224-
replay: undefined,
224+
replayId: undefined,
225225
};
226226
const userDisplay = user !== undefined ? user.email || user.id || user.ip_address : undefined;
227227
// eslint-disable-next-line deprecation/deprecation
228228
const profileId = activeTransaction !== undefined ? activeTransaction.getProfileId() : undefined;
229-
const replayId = replay !== undefined ? replay.getReplayId() : undefined;
230229
const span = new Span({
231230
startTimestamp: startTime,
232231
endTimestamp: startTime + duration,

packages/tracing-internal/src/browser/web-vitals/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,6 @@ export type InteractionRouteNameMapping = {
171171
parentContext: TransactionContext;
172172
user?: User;
173173
activeTransaction?: Transaction;
174-
replay?: Integration & { getReplayId: () => string };
174+
replayId?: string;
175175
};
176176
};

0 commit comments

Comments
 (0)