@@ -19,8 +19,6 @@ import {
19
19
InstrumentationLibrary ,
20
20
sanitizeAttributes ,
21
21
isTracingSuppressed ,
22
- AnchoredClock ,
23
- otperformance ,
24
22
} from '@opentelemetry/core' ;
25
23
import { Resource } from '@opentelemetry/resources' ;
26
24
import { BasicTracerProvider } from './BasicTracerProvider' ;
@@ -74,22 +72,10 @@ export class Tracer implements api.Tracer {
74
72
context = api . trace . deleteSpan ( context ) ;
75
73
}
76
74
const parentSpan = api . trace . getSpan ( context ) ;
77
- let clock : AnchoredClock | undefined ;
78
- if ( parentSpan ) {
79
- clock = ( parentSpan as any ) [ '_clock' ] ;
80
- }
81
-
82
- if ( ! clock ) {
83
- clock = new AnchoredClock ( Date , otperformance ) ;
84
- if ( parentSpan ) {
85
- ( parentSpan as any ) [ '_clock' ] = clock ;
86
- }
87
- }
88
75
89
76
if ( isTracingSuppressed ( context ) ) {
90
77
api . diag . debug ( 'Instrumentation suppressed, returning Noop Span' ) ;
91
78
const nonRecordingSpan = api . trace . wrapSpanContext ( api . INVALID_SPAN_CONTEXT ) ;
92
- ( nonRecordingSpan as any ) [ '_clock' ] = clock ;
93
79
return nonRecordingSpan ;
94
80
}
95
81
@@ -134,7 +120,6 @@ export class Tracer implements api.Tracer {
134
120
if ( samplingResult . decision === api . SamplingDecision . NOT_RECORD ) {
135
121
api . diag . debug ( 'Recording is off, propagating context in a non-recording span' ) ;
136
122
const nonRecordingSpan = api . trace . wrapSpanContext ( spanContext ) ;
137
- ( nonRecordingSpan as any ) [ '_clock' ] = clock ;
138
123
return nonRecordingSpan ;
139
124
}
140
125
@@ -147,7 +132,6 @@ export class Tracer implements api.Tracer {
147
132
parentSpanId ,
148
133
links ,
149
134
options . startTime ,
150
- clock ,
151
135
) ;
152
136
// Set initial span attributes. The attributes object may have been mutated
153
137
// by the sampler, so we sanitize the merged attributes before setting them.
0 commit comments