@@ -9,16 +9,14 @@ import { getSpanDescendants, removeChildSpanFromSpan, spanTimeInputToSeconds, sp
9
9
import { SentryNonRecordingSpan } from './sentryNonRecordingSpan' ;
10
10
import { SPAN_STATUS_ERROR } from './spanstatus' ;
11
11
import { startInactiveSpan } from './trace' ;
12
- import { getActiveSpan , getCapturedScopesOnSpan } from './utils' ;
12
+ import { getActiveSpan } from './utils' ;
13
13
14
14
export const TRACING_DEFAULTS = {
15
15
idleTimeout : 1_000 ,
16
16
finalTimeout : 30_000 ,
17
17
childSpanTimeout : 15_000 ,
18
18
} ;
19
19
20
- const FINISH_REASON_TAG = 'finishReason' ;
21
-
22
20
const FINISH_REASON_HEARTBEAT_FAILED = 'heartbeatFailed' ;
23
21
const FINISH_REASON_IDLE_TIMEOUT = 'idleTimeout' ;
24
22
const FINISH_REASON_FINAL_TIMEOUT = 'finalTimeout' ;
@@ -245,22 +243,6 @@ export function startIdleSpan(startSpanOptions: StartSpanOptions, options: Parti
245
243
span . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON , _finishReason ) ;
246
244
}
247
245
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
-
264
246
DEBUG_BUILD &&
265
247
logger . log ( '[Tracing] finishing idle span' , new Date ( endTimestamp * 1000 ) . toISOString ( ) , spanJSON . op ) ;
266
248
0 commit comments