File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import type { Log, SerializedLog } from '../types/log';
99import { consoleSandbox , debug } from '../utils/debug-logger' ;
1010import { isParameterizedString } from '../utils/is' ;
1111import { getCombinedScopeData } from '../utils/scopeData' ;
12- import { _getSpanForScope } from '../utils/spanOnScope ' ;
12+ import { getActiveSpan } from '../utils/spanUtils ' ;
1313import { timestampInSeconds } from '../utils/time' ;
1414import { getSequenceAttribute } from '../utils/timestampSequence' ;
1515import { _getTraceInfoFromScope } from '../utils/trace-info' ;
@@ -138,7 +138,7 @@ export function _INTERNAL_captureLog(
138138 } ) ;
139139 }
140140
141- const span = _getSpanForScope ( currentScope ) ;
141+ const span = getActiveSpan ( currentScope ) ;
142142 // Add the parent span ID to the log attributes for trace context
143143 setLogAttribute ( processedLogAttributes , 'sentry.trace.parent_span_id' , span ?. spanContext ( ) . spanId ) ;
144144
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import type { Metric, SerializedMetric } from '../types/metric';
99import type { User } from '../types/user' ;
1010import { debug } from '../utils/debug-logger' ;
1111import { getCombinedScopeData } from '../utils/scopeData' ;
12- import { _getSpanForScope } from '../utils/spanOnScope ' ;
12+ import { getActiveSpan } from '../utils/spanUtils ' ;
1313import { timestampInSeconds } from '../utils/time' ;
1414import { getSequenceAttribute } from '../utils/timestampSequence' ;
1515import { _getTraceInfoFromScope } from '../utils/trace-info' ;
@@ -132,7 +132,7 @@ function _buildSerializedMetric(
132132) : SerializedMetric {
133133 // Get trace context
134134 const [ , traceContext ] = _getTraceInfoFromScope ( client , currentScope ) ;
135- const span = _getSpanForScope ( currentScope ) ;
135+ const span = getActiveSpan ( currentScope ) ;
136136 const traceId = span ? span . spanContext ( ) . traceId : traceContext ?. trace_id ;
137137 const spanId = span ? span . spanContext ( ) . spanId : undefined ;
138138
You can’t perform that action at this time.
0 commit comments