quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.6k stars 2.63k forks source link

OpenTelemetry instrumentation still active after `quarkus.otel.sdk.disabled=true` #43502

Open brunobat opened 4 hours ago

brunobat commented 4 hours ago

Describe the bug

OpenTelemetry instrumentation is still active even when the SDK is disabled, therefore performing a non trivial amount of work and allocations that are not needed.

See the following flamegraph:

Screenshot 2024-09-25 at 17 46 14

This must be corrected.

Expected behavior

When quarkus.otel.sdk.disabled=true the amount of OpenTelemetry related work must be near zero.

Actual behavior

14,23% of all samples in the above flamegraph are OpenTelemetry related.

How to Reproduce?

Using this project: https://github.com/brunobat/quarkus-observability-perf Set quarkus.otel.sdk.disabled=true Executing this hyperfoill test script to generate loa: https://github.com/brunobat/quarkus-observability-perf/blob/main/hyperfoil-scripts/quarkus-otel-perf.hf.yaml And profiling the the execution with async profiler.

Data of the test execution can be seen performance test environment. Please contact me for details.

This affects all versions of the OpenTelemetry extension.

brunobat commented 4 hours ago

quarkus.otel.sdk.disabled must be checked on each OTel related recorder.