Resolves https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/11635
Currently instrumentation that is enabled by default will be disabled if otel.instrumentation.[name].enabled flag is false for any of the names given for the instrumentation, even if the flag is true for some of the names. This PR alters the behavior so that instrumentation is enabled or disabled based on the value otel.instrumentation.[name].enabled for the first instrumentation name where the value is set, if it isn't set then the default value will be used. This allows using otel.instrumentation.kafka-clients-metrics.enabled=trueotel.instrumentation.kafka-clients.enabled=false to enable only the kafka metrics instrumentation and disable the rest.
Resolves https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/11635 Currently instrumentation that is enabled by default will be disabled if
otel.instrumentation.[name].enabled
flag isfalse
for any of the names given for the instrumentation, even if the flag istrue
for some of the names. This PR alters the behavior so that instrumentation is enabled or disabled based on the valueotel.instrumentation.[name].enabled
for the first instrumentation name where the value is set, if it isn't set then the default value will be used. This allows usingotel.instrumentation.kafka-clients-metrics.enabled=true
otel.instrumentation.kafka-clients.enabled=false
to enable only the kafka metrics instrumentation and disable the rest.