@@ -9,16 +9,14 @@ import { getSpanDescendants, removeChildSpanFromSpan, spanTimeInputToSeconds, sp
99import { SentryNonRecordingSpan } from './sentryNonRecordingSpan' ;
1010import { SPAN_STATUS_ERROR } from './spanstatus' ;
1111import { startInactiveSpan } from './trace' ;
12- import { getActiveSpan , getCapturedScopesOnSpan } from './utils' ;
12+ import { getActiveSpan } from './utils' ;
1313
1414export const TRACING_DEFAULTS = {
1515 idleTimeout : 1_000 ,
1616 finalTimeout : 30_000 ,
1717 childSpanTimeout : 15_000 ,
1818} ;
1919
20- const FINISH_REASON_TAG = 'finishReason' ;
21-
2220const FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed' ;
2321const FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout' ;
2422const FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout' ;
@@ -245,22 +243,6 @@ export function startIdleSpan(startSpanOptions: StartSpanOptions, options: Parti
245243 span . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON , _finishReason ) ;
246244 }
247245
248- // Save finish reason as tag, in addition to attribute, to maintain backwards compatibility
249- const scopes = getCapturedScopesOnSpan ( span ) ;
250-
251- // Make sure to fetch up-to-date data here, as it may have been updated above
252- const finalAttributes : SpanAttributes = spanToJSON ( span ) . data || { } ;
253- const finalFinishReason = finalAttributes [ SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON ] ;
254- if ( scopes . scope && typeof finalFinishReason === 'string' ) {
255- // We only want to add the tag to the transaction event itself
256- scopes . scope . addEventProcessor ( event => {
257- if ( event . type === 'transaction' ) {
258- event . tags = { ...event . tags , [ FINISH_REASON_TAG ] : finalFinishReason } ;
259- }
260- return event ;
261- } ) ;
262- }
263-
264246 DEBUG_BUILD &&
265247 logger . log ( '[Tracing] finishing idle span' , new Date ( endTimestamp * 1000 ) . toISOString ( ) , spanJSON . op ) ;
266248
0 commit comments