Upgrade Byte Buddy to 1.10.10 (DataDog/dd-trace-java#1409)
MODIFY
agent-tooling/src/main/java/io/opentelemetry/auto/tooling/context/FieldBackedProvider.java
agent-tooling/src/main/java/io/opentelemetry/auto/tooling/context/FieldBackedProvider.java
@@ -340,7 +340,7 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
// TODO: Better to pass through the context of the Instrumenter
return new AgentBuilder.Transformer() {
final HelperInjector injector =
- HelperInjector.forDynamicTypes(this.getClass().getSimpleName(), helpers);
+ HelperInjector.forDynamicTypes(getClass().getSimpleName(), helpers);
@Override
public DynamicType.Builder<?> transform(
@@ -407,7 +407,7 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
.type(safeHasSuperType(named(entry.getKey())), instrumenter.classLoaderMatcher())
.and(safeToInjectFieldsMatcher())
.and(Default.NOT_DECORATOR_MATCHER)
- .transform(AgentBuilder.Transformer.NoOp.INSTANCE);
+ .transform(NoOpTransformer.INSTANCE);
/*
* We inject helpers here as well as when instrumentation is applied to ensure that
@@ -1059,4 +1059,18 @@ public class FieldBackedProvider implements InstrumentationContextProvider {
private static String getContextSetterName(final String key) {
return "set" + getContextFieldName(key);
}
+
+ // Originally found in AgentBuilder.Transformer.NoOp, but removed in 1.10.7
+ enum NoOpTransformer implements AgentBuilder.Transformer {
+ INSTANCE;
+
+ @Override
+ public DynamicType.Builder<?> transform(
+ final DynamicType.Builder<?> builder,
+ final TypeDescription typeDescription,
+ final ClassLoader classLoader,
+ final JavaModule module) {
+ return builder;
+ }
+ }
}

MODIFY
gradle/dependencies.gradle
gradle/dependencies.gradle
@@ -18,7 +18,7 @@ ext {
groovy : groovyVer,
logback : "1.2.3",
lombok : "1.18.10",
- bytebuddy : "1.10.6",
+ bytebuddy : "1.10.10",
scala : "2.11.12", // Last version to support Java 7 (2.12+ require Java 8+)
kotlin : "1.3.72",
coroutines : "1.3.0"

Upgrade Byte Buddy to 1.10.10 (DataDog/dd-trace-java#1409)