11package datadog .trace .instrumentation .java .concurrent .structuredconcurrency ;
22
33import static datadog .trace .bootstrap .instrumentation .java .concurrent .AdviceUtils .capture ;
4- import static datadog .trace .bootstrap .instrumentation .java .concurrent .ExcludeFilter .ExcludeType .FORK_JOIN_TASK ;
5- import static java .util .Collections .singleton ;
64import static java .util .Collections .singletonMap ;
75import static net .bytebuddy .matcher .ElementMatchers .isConstructor ;
86
97import com .google .auto .service .AutoService ;
10- import datadog .trace .agent .tooling .ExcludeFilterProvider ;
118import datadog .trace .agent .tooling .Instrumenter ;
129import datadog .trace .agent .tooling .InstrumenterModule ;
1310import datadog .trace .api .Platform ;
1411import datadog .trace .bootstrap .ContextStore ;
1512import datadog .trace .bootstrap .InstrumentationContext ;
16- import datadog .trace .bootstrap .instrumentation .java .concurrent .ExcludeFilter ;
1713import datadog .trace .bootstrap .instrumentation .java .concurrent .State ;
18- import java .util .Collection ;
1914import java .util .Map ;
2015import net .bytebuddy .asm .Advice ;
2116
2722@ SuppressWarnings ("unused" )
2823@ AutoService (InstrumenterModule .class )
2924public class StructuredTaskScopeInstrumentation extends InstrumenterModule .Tracing
30- implements Instrumenter .ForBootstrap ,
31- Instrumenter .ForSingleType ,
32- Instrumenter .HasMethodAdvice ,
33- ExcludeFilterProvider {
25+ implements Instrumenter .ForBootstrap , Instrumenter .ForSingleType , Instrumenter .HasMethodAdvice {
3426
3527 public StructuredTaskScopeInstrumentation () {
3628 super ("java_concurrent" , "structured_task_scope" );
@@ -57,14 +49,6 @@ public void methodAdvice(MethodTransformer transformer) {
5749 transformer .applyAdvice (isConstructor (), getClass ().getName () + "$ConstructorAdvice" );
5850 }
5951
60- @ Override
61- public Map <ExcludeFilter .ExcludeType , ? extends Collection <String >> excludedClasses () {
62- // Prevent the ForkJoinPool instrumentation to enable the task scope too early on the carrier
63- // thread rather than on the expected running thread, which is virtual by default.
64- return singletonMap (
65- FORK_JOIN_TASK , singleton ("java.util.concurrent.ForkJoinTask$RunnableExecuteAction" ));
66- }
67-
6852 public static final class ConstructorAdvice {
6953 @ Advice .OnMethodExit
7054 public static <T > void captureScope (
0 commit comments