11
11
import datadog .trace .api .scopemanager .ExtendedScopeListener ;
12
12
import datadog .trace .api .scopemanager .ScopeListener ;
13
13
import datadog .trace .bootstrap .instrumentation .api .AgentScope ;
14
- import datadog .trace .bootstrap .instrumentation .api .AgentScopeManager ;
15
14
import datadog .trace .bootstrap .instrumentation .api .AgentSpan ;
16
15
import datadog .trace .bootstrap .instrumentation .api .AgentTracer ;
17
16
import datadog .trace .bootstrap .instrumentation .api .ProfilerContext ;
18
17
import datadog .trace .bootstrap .instrumentation .api .ProfilingContextIntegration ;
19
18
import datadog .trace .bootstrap .instrumentation .api .ScopeSource ;
20
19
import datadog .trace .bootstrap .instrumentation .api .ScopeState ;
20
+ import datadog .trace .bootstrap .instrumentation .api .ScopeStateAware ;
21
21
import datadog .trace .core .monitor .HealthMetrics ;
22
22
import datadog .trace .relocate .api .RatelimitedLogger ;
23
23
import datadog .trace .util .AgentTaskScheduler ;
37
37
* from being reported even if all related spans are finished. It also delegates to other
38
38
* ScopeInterceptors to provide additional functionality.
39
39
*/
40
- public final class ContinuableScopeManager implements AgentScopeManager {
40
+ public final class ContinuableScopeManager implements ScopeStateAware {
41
41
static final Logger log = LoggerFactory .getLogger (ContinuableScopeManager .class );
42
42
static final RatelimitedLogger ratelimitedLog = new RatelimitedLogger (log , 1 , MINUTES );
43
43
static final long iterationKeepAlive =
@@ -81,18 +81,15 @@ public ContinuableScopeManager(
81
81
this .profilingContextIntegration = profilingContextIntegration ;
82
82
}
83
83
84
- @ Override
85
84
public AgentScope activate (final AgentSpan span , final ScopeSource source ) {
86
85
return activate (span , source .id (), false , /* ignored */ false );
87
86
}
88
87
89
- @ Override
90
88
public AgentScope activate (
91
89
final AgentSpan span , final ScopeSource source , boolean isAsyncPropagating ) {
92
90
return activate (span , source .id (), true , isAsyncPropagating );
93
91
}
94
92
95
- @ Override
96
93
public AgentScope .Continuation captureSpan (final AgentSpan span ) {
97
94
AbstractContinuation continuation =
98
95
new SingleContinuation (this , span , ScopeSource .INSTRUMENTATION .id ());
@@ -170,7 +167,6 @@ ContinuableScope continueSpan(
170
167
return scope ;
171
168
}
172
169
173
- @ Override
174
170
public void closePrevious (final boolean finishSpan ) {
175
171
ScopeStack scopeStack = scopeStack ();
176
172
@@ -189,7 +185,6 @@ public void closePrevious(final boolean finishSpan) {
189
185
}
190
186
}
191
187
192
- @ Override
193
188
public AgentScope activateNext (final AgentSpan span ) {
194
189
ScopeStack scopeStack = scopeStack ();
195
190
@@ -220,12 +215,10 @@ public AgentScope activateNext(final AgentSpan span) {
220
215
return scope ;
221
216
}
222
217
223
- @ Override
224
218
public AgentScope active () {
225
219
return scopeStack ().active ();
226
220
}
227
221
228
- @ Override
229
222
public AgentSpan activeSpan () {
230
223
final ContinuableScope active = scopeStack ().active ();
231
224
return active == null ? null : active .span ;
0 commit comments