Skip to content

Commit

Permalink
make aws-sdk indy compatible (#11552)
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJuge authored Jun 19, 2024
1 parent 3fa90c2 commit b2800e9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.TypeTransformer;
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
import java.util.List;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;

// TODO: Copy & paste with only trivial adaptions from v2
abstract class AbstractAwsSdkInstrumentationModule extends InstrumentationModule {
abstract class AbstractAwsSdkInstrumentationModule extends InstrumentationModule
implements ExperimentalInstrumentationModule {

protected AbstractAwsSdkInstrumentationModule(String additionalInstrumentationName) {
super("aws-sdk", "aws-sdk-1.11", additionalInstrumentationName);
Expand All @@ -29,8 +31,8 @@ public boolean isHelperClass(String className) {
}

@Override
public boolean isIndyModule() {
return false;
public String getModuleGroup() {
return "aws-sdk";
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
import com.google.auto.service.AutoService;
import io.opentelemetry.javaagent.extension.instrumentation.InstrumentationModule;
import io.opentelemetry.javaagent.extension.instrumentation.TypeInstrumentation;
import io.opentelemetry.javaagent.extension.instrumentation.internal.ExperimentalInstrumentationModule;
import java.util.List;

@AutoService(InstrumentationModule.class)
public class AwsSdkInstrumentationModule extends InstrumentationModule {
public class AwsSdkInstrumentationModule extends InstrumentationModule
implements ExperimentalInstrumentationModule {
public AwsSdkInstrumentationModule() {
super("aws-sdk", "aws-sdk-1.11", "aws-sdk-1.11-core");
}
Expand All @@ -24,8 +26,8 @@ public boolean isHelperClass(String className) {
}

@Override
public boolean isIndyModule() {
return false;
public String getModuleGroup() {
return "aws-sdk";
}

@Override
Expand Down

0 comments on commit b2800e9

Please sign in to comment.