Skip to content

Commit e8df8a0

Browse files
authored
Move HasMethodAdvice aspect to instrumentations, away from modules (#8139)
* Load 'AbcModule' definitions from the instrumentation class-loader so they can be unloaded after startup * Move postProcessor option to InstrumenterModule, so it can be shared across the grouped instrumentations
1 parent c99c2c2 commit e8df8a0

File tree

761 files changed

+919
-820
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

761 files changed

+919
-820
lines changed

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/DatadogClassLoader.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,9 @@ protected Enumeration<URL> findResources(String name) {
9393
@Override
9494
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
9595
if (name.startsWith("datadog.trace.instrumentation.")
96-
&& (name.endsWith("$Muzzle") || name.endsWith("Instrumentation"))) {
96+
&& (name.endsWith("$Muzzle")
97+
|| name.endsWith("Instrumentation")
98+
|| name.endsWith("Module"))) {
9799
InstrumentationClassLoader cl;
98100
if (null == (cl = instrumentationClassLoader.get())) {
99101
synchronized (instrumentationClassLoaderLock) {

dd-java-agent/agent-builder/src/main/java/datadog/trace/agent/tooling/CombiningTransformerBuilder.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import static datadog.trace.agent.tooling.bytebuddy.matcher.NameMatchers.namedOneOf;
1010
import static net.bytebuddy.matcher.ElementMatchers.not;
1111

12-
import datadog.trace.agent.tooling.Instrumenter.WithPostProcessor;
1312
import datadog.trace.agent.tooling.bytebuddy.ExceptionHandlers;
1413
import datadog.trace.agent.tooling.context.FieldBackedContextInjector;
1514
import datadog.trace.agent.tooling.context.FieldBackedContextMatcher;
@@ -73,17 +72,12 @@ public final class CombiningTransformerBuilder
7372
private Map<String, String> contextStore;
7473
private AgentBuilder.Transformer contextRequestRewriter;
7574
private HelperTransformer helperTransformer;
75+
private Advice.PostProcessor.Factory postProcessor;
7676
private MuzzleCheck muzzle;
7777

7878
// temporary buffer for collecting advice; reset for each instrumenter
7979
private final List<AgentBuilder.Transformer> advice = new ArrayList<>();
8080

81-
/**
82-
* Post processor to be applied to instrumenter advices if they implement {@link
83-
* WithPostProcessor}
84-
*/
85-
private Advice.PostProcessor.Factory postProcessor;
86-
8781
public CombiningTransformerBuilder(
8882
AgentBuilder agentBuilder, InstrumenterIndex instrumenterIndex) {
8983
this.agentBuilder = agentBuilder;
@@ -134,6 +128,8 @@ private void prepareInstrumentation(InstrumenterModule module, int instrumentati
134128
module.useAgentCodeSource(), module.getClass().getSimpleName(), helperClassNames)
135129
: null;
136130

131+
postProcessor = module.postProcessor();
132+
137133
muzzle = new MuzzleCheck(module, instrumentationId);
138134
}
139135

@@ -208,9 +204,6 @@ private void buildTypeMatcher(Instrumenter member, int transformationId) {
208204

209205
private void buildTypeAdvice(Instrumenter member, int transformationId) {
210206

211-
postProcessor =
212-
member instanceof WithPostProcessor ? ((WithPostProcessor) member).postProcessor() : null;
213-
214207
if (null != helperTransformer) {
215208
advice.add(helperTransformer);
216209
}

dd-java-agent/agent-builder/src/test/groovy/datadog/trace/agent/test/DefaultInstrumenterForkedTest.groovy

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,5 @@ class DefaultInstrumenterForkedTest extends DDSpecification {
141141
TestDefaultInstrumenter(String instrumentationName, String additionalName) {
142142
super(instrumentationName, [additionalName] as String[])
143143
}
144-
145-
@Override
146-
void methodAdvice(MethodTransformer transformer) {}
147144
}
148145
}

dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/Instrumenter.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55

66
import java.security.ProtectionDomain;
77
import java.util.Collection;
8-
import net.bytebuddy.asm.Advice;
98
import net.bytebuddy.asm.AsmVisitorWrapper;
109
import net.bytebuddy.description.method.MethodDescription;
1110
import net.bytebuddy.description.type.TypeDescription;
@@ -82,11 +81,6 @@ interface WithTypeStructure {
8281
ElementMatcher<TypeDescription> structureMatcher();
8382
}
8483

85-
/** Instrumentation that wants to apply additional structure checks after type matching. */
86-
interface WithPostProcessor {
87-
Advice.PostProcessor.Factory postProcessor();
88-
}
89-
9084
/** Instrumentation that provides advice which affects the whole type. */
9185
interface HasTypeAdvice extends Instrumenter {
9286
/**

dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/InstrumenterModule.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,11 @@ public ElementMatcher<? super MethodDescription> methodIgnoreMatcher() {
156156
return isSynthetic();
157157
}
158158

159+
/** Override this to post-process the operand stack of any transformed methods. */
160+
public Advice.PostProcessor.Factory postProcessor() {
161+
return null;
162+
}
163+
159164
/**
160165
* Context stores to define for this instrumentation. Are added to matching class loaders.
161166
*
@@ -191,7 +196,7 @@ protected final boolean isShortcutMatchingEnabled(boolean defaultToShortcut) {
191196
}
192197

193198
/** Parent class for all tracing related instrumentations */
194-
public abstract static class Tracing extends InstrumenterModule implements HasMethodAdvice {
199+
public abstract static class Tracing extends InstrumenterModule {
195200
public Tracing(String instrumentationName, String... additionalNames) {
196201
super(instrumentationName, additionalNames);
197202
}
@@ -203,7 +208,7 @@ public boolean isApplicable(Set<TargetSystem> enabledSystems) {
203208
}
204209

205210
/** Parent class for all profiling related instrumentations */
206-
public abstract static class Profiling extends InstrumenterModule implements HasMethodAdvice {
211+
public abstract static class Profiling extends InstrumenterModule {
207212
public Profiling(String instrumentationName, String... additionalNames) {
208213
super(instrumentationName, additionalNames);
209214
}
@@ -222,7 +227,7 @@ public boolean isEnabled() {
222227
}
223228

224229
/** Parent class for all AppSec related instrumentations */
225-
public abstract static class AppSec extends InstrumenterModule implements HasMethodAdvice {
230+
public abstract static class AppSec extends InstrumenterModule {
226231
public AppSec(String instrumentationName, String... additionalNames) {
227232
super(instrumentationName, additionalNames);
228233
}
@@ -235,8 +240,7 @@ public boolean isApplicable(Set<TargetSystem> enabledSystems) {
235240

236241
/** Parent class for all IAST related instrumentations */
237242
@SuppressForbidden
238-
public abstract static class Iast extends InstrumenterModule
239-
implements HasMethodAdvice, WithPostProcessor {
243+
public abstract static class Iast extends InstrumenterModule {
240244
public Iast(String instrumentationName, String... additionalNames) {
241245
super(instrumentationName, additionalNames);
242246
}
@@ -291,7 +295,7 @@ protected boolean isOptOutEnabled() {
291295
}
292296

293297
/** Parent class for all USM related instrumentations */
294-
public abstract static class Usm extends InstrumenterModule implements HasMethodAdvice {
298+
public abstract static class Usm extends InstrumenterModule {
295299
public Usm(String instrumentationName, String... additionalNames) {
296300
super(instrumentationName, additionalNames);
297301
}
@@ -303,7 +307,7 @@ public boolean isApplicable(Set<TargetSystem> enabledSystems) {
303307
}
304308

305309
/** Parent class for all CI related instrumentations */
306-
public abstract static class CiVisibility extends InstrumenterModule implements HasMethodAdvice {
310+
public abstract static class CiVisibility extends InstrumenterModule {
307311
public CiVisibility(String instrumentationName, String... additionalNames) {
308312
super(instrumentationName, additionalNames);
309313
}

dd-java-agent/instrumentation/aerospike-4/src/main/java/datadog/trace/instrumentation/aerospike4/AerospikeClientInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
@AutoService(InstrumenterModule.class)
1919
public final class AerospikeClientInstrumentation extends InstrumenterModule.Tracing
20-
implements Instrumenter.ForSingleType {
20+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2121
public AerospikeClientInstrumentation() {
2222
super("aerospike");
2323
}

dd-java-agent/instrumentation/aerospike-4/src/main/java/datadog/trace/instrumentation/aerospike4/CommandInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
@AutoService(InstrumenterModule.class)
2121
public final class CommandInstrumentation extends InstrumenterModule.Tracing
22-
implements Instrumenter.ForSingleType {
22+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2323
public CommandInstrumentation() {
2424
super("aerospike");
2525
}

dd-java-agent/instrumentation/aerospike-4/src/main/java/datadog/trace/instrumentation/aerospike4/NioEventLoopInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
@AutoService(InstrumenterModule.class)
1818
public final class NioEventLoopInstrumentation extends InstrumenterModule.Tracing
19-
implements Instrumenter.ForSingleType {
19+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2020
public NioEventLoopInstrumentation() {
2121
super("aerospike", "java_concurrent");
2222
}

dd-java-agent/instrumentation/aerospike-4/src/main/java/datadog/trace/instrumentation/aerospike4/PartitionInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
@AutoService(InstrumenterModule.class)
2222
public final class PartitionInstrumentation extends InstrumenterModule.Tracing
23-
implements Instrumenter.ForSingleType {
23+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2424
public PartitionInstrumentation() {
2525
super("aerospike");
2626
}

dd-java-agent/instrumentation/akka-concurrent/src/main/java/datadog/trace/instrumentation/akka/concurrent/AkkaActorCellInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
@AutoService(InstrumenterModule.class)
2323
public class AkkaActorCellInstrumentation extends InstrumenterModule.Tracing
24-
implements Instrumenter.ForSingleType {
24+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2525

2626
public AkkaActorCellInstrumentation() {
2727
super("akka_actor_receive", "akka_actor", "akka_concurrent", "java_concurrent");

dd-java-agent/instrumentation/akka-concurrent/src/main/java/datadog/trace/instrumentation/akka/concurrent/AkkaEnvelopeInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@AutoService(InstrumenterModule.class)
1717
public class AkkaEnvelopeInstrumentation extends InstrumenterModule.Tracing
18-
implements Instrumenter.ForSingleType {
18+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
1919

2020
public AkkaEnvelopeInstrumentation() {
2121
super("akka_actor_send", "akka_actor", "akka_concurrent", "java_concurrent");

dd-java-agent/instrumentation/akka-concurrent/src/main/java/datadog/trace/instrumentation/akka/concurrent/AkkaForkJoinExecutorTaskInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626
@AutoService(InstrumenterModule.class)
2727
public final class AkkaForkJoinExecutorTaskInstrumentation extends InstrumenterModule.Tracing
28-
implements Instrumenter.ForSingleType {
28+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2929
public AkkaForkJoinExecutorTaskInstrumentation() {
3030
super("java_concurrent", "akka_concurrent");
3131
}

dd-java-agent/instrumentation/akka-concurrent/src/main/java/datadog/trace/instrumentation/akka/concurrent/AkkaForkJoinPoolInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
@AutoService(InstrumenterModule.class)
2121
public final class AkkaForkJoinPoolInstrumentation extends InstrumenterModule.Tracing
22-
implements Instrumenter.ForSingleType {
22+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2323

2424
public AkkaForkJoinPoolInstrumentation() {
2525
super("java_concurrent", "akka_concurrent");

dd-java-agent/instrumentation/akka-concurrent/src/main/java/datadog/trace/instrumentation/akka/concurrent/AkkaForkJoinTaskInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
*/
4040
@AutoService(InstrumenterModule.class)
4141
public final class AkkaForkJoinTaskInstrumentation extends InstrumenterModule.Tracing
42-
implements Instrumenter.ForTypeHierarchy, ExcludeFilterProvider {
42+
implements Instrumenter.ForTypeHierarchy, Instrumenter.HasMethodAdvice, ExcludeFilterProvider {
4343

4444
public AkkaForkJoinTaskInstrumentation() {
4545
super("java_concurrent", "akka_concurrent");

dd-java-agent/instrumentation/akka-concurrent/src/main/java/datadog/trace/instrumentation/akka/concurrent/AkkaMailboxInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
@AutoService(InstrumenterModule.class)
2424
public class AkkaMailboxInstrumentation extends InstrumenterModule.Tracing
25-
implements Instrumenter.ForSingleType, ExcludeFilterProvider {
25+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice, ExcludeFilterProvider {
2626

2727
public AkkaMailboxInstrumentation() {
2828
super("akka_actor_mailbox", "akka_actor", "akka_concurrent", "java_concurrent");

dd-java-agent/instrumentation/akka-concurrent/src/main/java/datadog/trace/instrumentation/akka/concurrent/AkkaRoutedActorCellInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
@AutoService(InstrumenterModule.class)
2121
public class AkkaRoutedActorCellInstrumentation extends InstrumenterModule.Tracing
22-
implements Instrumenter.ForSingleType {
22+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2323

2424
public AkkaRoutedActorCellInstrumentation() {
2525
super("akka_actor_send", "akka_actor", "akka_concurrent", "java_concurrent");

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaHttp2ServerInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
@AutoService(InstrumenterModule.class)
2424
public final class AkkaHttp2ServerInstrumentation extends InstrumenterModule.Tracing
25-
implements Instrumenter.ForKnownTypes {
25+
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {
2626
public AkkaHttp2ServerInstrumentation() {
2727
super("akka-http2", "akka-http", "akka-http-server");
2828
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaHttpServerInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
*/
5252
@AutoService(InstrumenterModule.class)
5353
public final class AkkaHttpServerInstrumentation extends InstrumenterModule.Tracing
54-
implements Instrumenter.ForSingleType {
54+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
5555
public AkkaHttpServerInstrumentation() {
5656
super("akka-http", "akka-http-server");
5757
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaHttpSingleRequestInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
@AutoService(InstrumenterModule.class)
2626
public final class AkkaHttpSingleRequestInstrumentation extends InstrumenterModule.Tracing
27-
implements Instrumenter.ForSingleType {
27+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2828
public AkkaHttpSingleRequestInstrumentation() {
2929
super("akka-http", "akka-http-client");
3030
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/AkkaPoolMasterActorInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@AutoService(InstrumenterModule.class)
1414
public final class AkkaPoolMasterActorInstrumentation extends InstrumenterModule.Tracing
15-
implements Instrumenter.ForSingleType {
15+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
1616
public AkkaPoolMasterActorInstrumentation() {
1717
super("akka-http", "akka-http-client");
1818
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/DefaultExceptionHandlerInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
@AutoService(InstrumenterModule.class)
1717
public class DefaultExceptionHandlerInstrumentation extends InstrumenterModule.AppSec
18-
implements Instrumenter.ForSingleType {
18+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
1919
public DefaultExceptionHandlerInstrumentation() {
2020
super("akka-http", "akka-http-server");
2121
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/Bug4304Instrumentation.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@
2525
/** See https://github.com/akka/akka-http/issues/4304 */
2626
@AutoService(InstrumenterModule.class)
2727
public class Bug4304Instrumentation extends InstrumenterModule.AppSec
28-
implements Instrumenter.ForTypeHierarchy, Instrumenter.WithTypeStructure {
28+
implements Instrumenter.ForTypeHierarchy,
29+
Instrumenter.WithTypeStructure,
30+
Instrumenter.HasMethodAdvice {
2931
public Bug4304Instrumentation() {
3032
super("akka-http");
3133
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/ConfigProvideRemoteAddressHeaderInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@AutoService(InstrumenterModule.class)
1515
public class ConfigProvideRemoteAddressHeaderInstrumentation extends InstrumenterModule.AppSec
16-
implements Instrumenter.ForSingleType {
16+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
1717
public ConfigProvideRemoteAddressHeaderInstrumentation() {
1818
super("akka-http");
1919
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/FormDataToStrictInstrumentation.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
/** @see akka.http.scaladsl.model.Multipart.FormData#toStrict(FiniteDuration, Materializer) */
1919
@AutoService(InstrumenterModule.class)
2020
public class FormDataToStrictInstrumentation extends InstrumenterModule.AppSec
21-
implements Instrumenter.ForSingleType, ScalaListCollectorMuzzleReferences {
21+
implements Instrumenter.ForSingleType,
22+
Instrumenter.HasMethodAdvice,
23+
ScalaListCollectorMuzzleReferences {
2224
public FormDataToStrictInstrumentation() {
2325
super("akka-http");
2426
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/JacksonUnmarshallerInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
@AutoService(InstrumenterModule.class)
1818
public class JacksonUnmarshallerInstrumentation extends InstrumenterModule.AppSec
19-
implements Instrumenter.ForSingleType {
19+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2020

2121
public JacksonUnmarshallerInstrumentation() {
2222
super("akka-http");

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/MultipartUnmarshallersInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
/** @see MultipartUnmarshallers */
1515
@AutoService(InstrumenterModule.class)
1616
public class MultipartUnmarshallersInstrumentation extends InstrumenterModule.AppSec
17-
implements Instrumenter.ForKnownTypes {
17+
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {
1818

1919
private static final String TRAIT_NAME =
2020
"akka.http.scaladsl.unmarshalling.MultipartUnmarshallers";

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/PredefinedFromEntityUnmarshallersInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*/
2121
@AutoService(InstrumenterModule.class)
2222
public class PredefinedFromEntityUnmarshallersInstrumentation extends InstrumenterModule.AppSec
23-
implements Instrumenter.ForKnownTypes {
23+
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {
2424

2525
private static final String TRAIT_NAME =
2626
"akka.http.scaladsl.unmarshalling.PredefinedFromEntityUnmarshallers";

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/SprayUnmarshallerInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// TODO: move to separate module and have better support
1515
@AutoService(InstrumenterModule.class)
1616
public class SprayUnmarshallerInstrumentation extends InstrumenterModule.AppSec
17-
implements Instrumenter.ForKnownTypes {
17+
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {
1818

1919
private static final String TRAIT_NAME =
2020
"akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport";

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/appsec/StrictFormCompanionInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
/** @see akka.http.scaladsl.common.StrictForm$#unmarshaller(Unmarshaller, Unmarshaller) */
2121
@AutoService(InstrumenterModule.class)
2222
public class StrictFormCompanionInstrumentation extends InstrumenterModule.AppSec
23-
implements Instrumenter.ForSingleType {
23+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
2424
public StrictFormCompanionInstrumentation() {
2525
super("akka-http");
2626
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/iast/CookieDirectivesInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*/
2323
@AutoService(InstrumenterModule.class)
2424
public class CookieDirectivesInstrumentation extends InstrumenterModule.Iast
25-
implements Instrumenter.ForKnownTypes {
25+
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {
2626
public CookieDirectivesInstrumentation() {
2727
super("akka-http");
2828
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/iast/CookieHeaderInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*/
3434
@AutoService(InstrumenterModule.class)
3535
public class CookieHeaderInstrumentation extends InstrumenterModule.Iast
36-
implements Instrumenter.ForSingleType {
36+
implements Instrumenter.ForSingleType, Instrumenter.HasMethodAdvice {
3737
public CookieHeaderInstrumentation() {
3838
super("akka-http");
3939
}

dd-java-agent/instrumentation/akka-http/akka-http-10.0/src/main/java/datadog/trace/instrumentation/akkahttp/iast/ExtractDirectivesInstrumentation.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
@AutoService(InstrumenterModule.class)
3636
public class ExtractDirectivesInstrumentation extends InstrumenterModule.Iast
37-
implements Instrumenter.ForKnownTypes {
37+
implements Instrumenter.ForKnownTypes, Instrumenter.HasMethodAdvice {
3838
public ExtractDirectivesInstrumentation() {
3939
super("akka-http");
4040
}

0 commit comments

Comments
 (0)