@@ -196,8 +196,6 @@ export function startIdleSpan(startSpanOptions: StartSpanOptions, options: Parti
196196 function _pushActivity ( spanId : string ) : void {
197197 _cancelIdleTimeout ( ) ;
198198 activities . set ( spanId , true ) ;
199- DEBUG_BUILD && logger . log ( `[Tracing] pushActivity: ${ spanId } ` ) ;
200- DEBUG_BUILD && logger . log ( '[Tracing] new activities count' , activities . size ) ;
201199
202200 const endTimestamp = timestampInSeconds ( ) ;
203201 // We need to add the timeout here to have the real endtimestamp of the idle span
@@ -211,9 +209,7 @@ export function startIdleSpan(startSpanOptions: StartSpanOptions, options: Parti
211209 */
212210 function _popActivity ( spanId : string ) : void {
213211 if ( activities . has ( spanId ) ) {
214- DEBUG_BUILD && logger . log ( `[Tracing] popActivity ${ spanId } ` ) ;
215212 activities . delete ( spanId ) ;
216- DEBUG_BUILD && logger . log ( '[Tracing] new activities count' , activities . size ) ;
217213 }
218214
219215 if ( activities . size === 0 ) {
@@ -248,8 +244,7 @@ export function startIdleSpan(startSpanOptions: StartSpanOptions, options: Parti
248244 span . setAttribute ( SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON , _finishReason ) ;
249245 }
250246
251- DEBUG_BUILD &&
252- logger . log ( '[Tracing] finishing idle span' , new Date ( endTimestamp * 1000 ) . toISOString ( ) , spanJSON . op ) ;
247+ logger . log ( `[Tracing] Idle span "${ spanJSON . op } " finished` ) ;
253248
254249 const childSpans = getSpanDescendants ( span ) . filter ( child => child !== span ) ;
255250
@@ -259,7 +254,7 @@ export function startIdleSpan(startSpanOptions: StartSpanOptions, options: Parti
259254 childSpan . setStatus ( { code : SPAN_STATUS_ERROR , message : 'cancelled' } ) ;
260255 childSpan . end ( endTimestamp ) ;
261256 DEBUG_BUILD &&
262- logger . log ( '[Tracing] cancelling span since span ended early' , JSON . stringify ( childSpan , undefined , 2 ) ) ;
257+ logger . log ( '[Tracing] Cancelling span since span ended early' , JSON . stringify ( childSpan , undefined , 2 ) ) ;
263258 }
264259
265260 const childSpanJSON = spanToJSON ( childSpan ) ;
@@ -274,18 +269,16 @@ export function startIdleSpan(startSpanOptions: StartSpanOptions, options: Parti
274269 if ( DEBUG_BUILD ) {
275270 const stringifiedSpan = JSON . stringify ( childSpan , undefined , 2 ) ;
276271 if ( ! spanStartedBeforeIdleSpanEnd ) {
277- logger . log ( '[Tracing] discarding Span since it happened after idle span was finished' , stringifiedSpan ) ;
272+ logger . log ( '[Tracing] Discarding span since it happened after idle span was finished' , stringifiedSpan ) ;
278273 } else if ( ! spanEndedBeforeFinalTimeout ) {
279- logger . log ( '[Tracing] discarding Span since it finished after idle span final timeout' , stringifiedSpan ) ;
274+ logger . log ( '[Tracing] Discarding span since it finished after idle span final timeout' , stringifiedSpan ) ;
280275 }
281276 }
282277
283278 if ( ! spanEndedBeforeFinalTimeout || ! spanStartedBeforeIdleSpanEnd ) {
284279 removeChildSpanFromSpan ( span , childSpan ) ;
285280 }
286281 } ) ;
287-
288- DEBUG_BUILD && logger . log ( '[Tracing] flushing idle span' ) ;
289282 }
290283
291284 client . on ( 'spanStart' , startedSpan => {
@@ -349,7 +342,7 @@ function _startIdleSpan(options: StartSpanOptions): Span {
349342
350343 _setSpanForScope ( getCurrentScope ( ) , span ) ;
351344
352- DEBUG_BUILD && logger . log ( `Setting idle span on scope. Span ID: ${ span . spanContext ( ) . spanId } ` ) ;
345+ DEBUG_BUILD && logger . log ( '[Tracing] Started span is an idle span' ) ;
353346
354347 return span ;
355348}
0 commit comments