Skip to content

Ensure ClassloadingInstrumentation is always applied even with DD_TRACE_ENABLED=false #8863

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import datadog.trace.agent.tooling.InstrumenterModule;
import datadog.trace.bootstrap.CallDepthThreadLocalMap;
import datadog.trace.bootstrap.Constants;
import java.util.Set;
import net.bytebuddy.asm.Advice;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.matcher.ElementMatcher;
Expand All @@ -31,14 +32,19 @@
* for the classes that we have put in the bootstrap class loader.
*/
@AutoService(InstrumenterModule.class)
public final class ClassloadingInstrumentation extends InstrumenterModule.Tracing
public final class ClassloadingInstrumentation extends InstrumenterModule
implements Instrumenter.ForBootstrap,
Instrumenter.ForTypeHierarchy,
Instrumenter.HasMethodAdvice {
public ClassloadingInstrumentation() {
super("classloading");
}

@Override
public boolean isApplicable(Set<TargetSystem> enabledSystems) {
return true;
}

@Override
protected boolean defaultEnabled() {
return true;
Expand Down