Skip to content

Commit 3918e2a

Browse files
committed
add replayId
1 parent c7a3465 commit 3918e2a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/replay-internal/src/util/addGlobalListeners.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ export function addGlobalListeners(replay: ReplayContainer): void {
4747
});
4848

4949
client.on('spanStart', span => {
50+
const replayId = replay.getSessionId();
51+
if (replay.isEnabled() && replayId) {
52+
span.setAttribute('sentry.replay_id', replayId);
53+
}
5054
replay.lastActiveSpan = span;
5155
});
5256

0 commit comments

Comments
 (0)