Honor default enabled for instrumentation modules (#10211)
This commit is contained in:
parent
6ce3bd8c14
commit
3dd0925081
|
@ -23,7 +23,8 @@ public class ApplicationLoggingInstrumentationModule extends InstrumentationModu
|
||||||
@Override
|
@Override
|
||||||
public boolean defaultEnabled(ConfigProperties config) {
|
public boolean defaultEnabled(ConfigProperties config) {
|
||||||
// only enable this instrumentation if the application logger is enabled
|
// only enable this instrumentation if the application logger is enabled
|
||||||
return "application".equals(config.getString("otel.javaagent.logging"));
|
return super.defaultEnabled(config)
|
||||||
|
&& "application".equals(config.getString("otel.javaagent.logging"));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -39,6 +39,6 @@ public class JaxrsInstrumentationModule extends InstrumentationModule {
|
||||||
// This instrumentation produces controller telemetry and sets http route. Http route is set by
|
// This instrumentation produces controller telemetry and sets http route. Http route is set by
|
||||||
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
|
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
|
||||||
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
|
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
|
||||||
return ExperimentalConfig.get().controllerTelemetryEnabled();
|
return super.defaultEnabled(config) && ExperimentalConfig.get().controllerTelemetryEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,6 @@ public class JaxrsAnnotationsInstrumentationModule extends InstrumentationModule
|
||||||
// This instrumentation produces controller telemetry and sets http route. Http route is set by
|
// This instrumentation produces controller telemetry and sets http route. Http route is set by
|
||||||
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
|
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
|
||||||
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
|
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
|
||||||
return ExperimentalConfig.get().controllerTelemetryEnabled();
|
return super.defaultEnabled(config) && ExperimentalConfig.get().controllerTelemetryEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,6 @@ public class JaxrsAnnotationsInstrumentationModule extends InstrumentationModule
|
||||||
// This instrumentation produces controller telemetry and sets http route. Http route is set by
|
// This instrumentation produces controller telemetry and sets http route. Http route is set by
|
||||||
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
|
// this instrumentation only when it was not already set by a jax-rs framework instrumentation.
|
||||||
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
|
// This instrumentation uses complex type matcher, disabling it can improve startup performance.
|
||||||
return ExperimentalConfig.get().controllerTelemetryEnabled();
|
return super.defaultEnabled(config) && ExperimentalConfig.get().controllerTelemetryEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,6 +28,6 @@ public class JwsInstrumentationModule extends InstrumentationModule {
|
||||||
@Override
|
@Override
|
||||||
public boolean defaultEnabled(ConfigProperties config) {
|
public boolean defaultEnabled(ConfigProperties config) {
|
||||||
// this instrumentation only produces controller telemetry
|
// this instrumentation only produces controller telemetry
|
||||||
return ExperimentalConfig.get().controllerTelemetryEnabled();
|
return super.defaultEnabled(config) && ExperimentalConfig.get().controllerTelemetryEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,6 @@ public class SpringWsInstrumentationModule extends InstrumentationModule {
|
||||||
@Override
|
@Override
|
||||||
public boolean defaultEnabled(ConfigProperties config) {
|
public boolean defaultEnabled(ConfigProperties config) {
|
||||||
// this instrumentation only produces controller telemetry
|
// this instrumentation only produces controller telemetry
|
||||||
return ExperimentalConfig.get().controllerTelemetryEnabled();
|
return super.defaultEnabled(config) && ExperimentalConfig.get().controllerTelemetryEnabled();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue