Skip to content

Commit f3f0ba3

Browse files
authored
1 parent 9bd421b commit f3f0ba3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/core/src/logs/exports.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { _getTraceInfoFromScope } from '../client';
44
import { getClient, getCurrentScope, getGlobalScope, getIsolationScope } from '../currentScopes';
55
import { DEBUG_BUILD } from '../debug-build';
66
import type { Scope, ScopeData } from '../scope';
7+
import type { Integration } from '../types-hoist/integration';
78
import type { Log, SerializedLog, SerializedLogAttributeValue } from '../types-hoist/log';
89
import { mergeScopeData } from '../utils/applyScopeDataToEvent';
910
import { consoleSandbox, debug } from '../utils/debug-logger';
@@ -150,6 +151,9 @@ export function _INTERNAL_captureLog(
150151
setLogAttribute(processedLogAttributes, 'sentry.sdk.name', name);
151152
setLogAttribute(processedLogAttributes, 'sentry.sdk.version', version);
152153

154+
const replay = client.getIntegrationByName<Integration & { getReplayId: () => string }>('Replay');
155+
setLogAttribute(processedLogAttributes, 'sentry.replay_id', replay?.getReplayId());
156+
153157
const beforeLogMessage = beforeLog.message;
154158
if (isParameterizedString(beforeLogMessage)) {
155159
const { __sentry_template_string__, __sentry_template_values__ = [] } = beforeLogMessage;

0 commit comments

Comments
 (0)