opentelemetry-java-instrumentation
opentelemetry-java-instrumentation copied to clipboard
Disable Auto instrumentation by telemetry type
Is your feature request related to a problem? Please describe.
the library I am using does not carry trace information through threads, so auto instrumentation creates orphan spans which I would like to disable.
Describe the solution you'd like
I would like to disable auto instrumentation for tracing, while keeping the metrics. This would ideally happen through configuration.
Describe alternatives you've considered
specifically this is for gRPC and I have investigated using https://github.com/open-telemetry/opentelemetry-java-instrumentation/tree/main/instrumentation/grpc-1.6/library with success, however it requires a lot of boilerplate to achieve the same result as auto instrumentation.
Additional context
Originally discussed here, with the hope that OTEL_INSTRUMENTATION_<FRAMEWORK>_ENABLED: 'false'
could be extended to something like OTEL_INSTRUMENTATION_<FRAMEWORK>_<INSTRUMENTATION_TYPE>_ENABLED: 'false'