ApplicationInsights-Java icon indicating copy to clipboard operation
ApplicationInsights-Java copied to clipboard

Support OpenTelemetry's way to suppress autoinstrumentation

Open greatvovan opened this issue 1 year ago • 0 comments

Is your feature request related to a problem? Please describe. As illustrated by this bug report, users may expect the OpenTelemetry's Java Agent's configuration settings for suppressing instrumentation would work for the App Insights Agent. However, currently only otel.javaagent.enabled is supported with a handful of other ones.

The particular parameter of interest would be otel.instrumentation.common.default-enabled aimed to suppress all default instrumentation and reversing from "I suppress N things" to "I allow N things". Going further, a combination with otel.instrumentation.opentelemetry-api.enabled=true, otel.instrumentation.opentelemetry-instrumentation-annotations.enabled=true would allow to let only user instrumentation.

Describe the solution you would like Where applicable, be compatible with vanilla OpenTelemetry Java Agent configuration settings. If configured through the config file as well, allow properties/env variables override that configuration. Post configuration resolution into the diagnostic log.

Describe alternatives you have considered The alternative is suppressing through configuration file and using sampling overrides, which technically is not suppression of instrumentation (and still must have performance overhead), but functionally is even more powerful for the user for limiting noisy telemetry.

greatvovan avatar Oct 28 '24 01:10 greatvovan