Skip to content

fix: do not report disabled instrumentations as failures#2216

Open
0robustus1 wants to merge 2 commits into
open-telemetry:mainfrom
0robustus1:fix/do-not-call-disabled-instrumentations-failures
Open

fix: do not report disabled instrumentations as failures#2216
0robustus1 wants to merge 2 commits into
open-telemetry:mainfrom
0robustus1:fix/do-not-call-disabled-instrumentations-failures

Conversation

@0robustus1

Copy link
Copy Markdown

It can be very confusing to see a Instrumentation: OpenTelemetry::Instrumentation::Sinatra failed to install log line when that instrumentation is in fact just disabled (via enabled: false) or OTEL_RUBY_INSTRUMENTATION_SINATRA_ENABLED=false. This instead reports it as a not-enabled instrumentation.

It can be very confusing to see a "Instrumentation: OpenTelemetry::Instrumentation::Sinatra failed to install" log line
when that instrumentation is in fact just disabled (via `enabled: false`) or 'OTEL_RUBY_INSTRUMENTATION_SINATRA_ENABLED=false'.
This instead reports it as a not-enabled instrumentation.
@xuan-cao-swi

Copy link
Copy Markdown
Contributor

Thanks for bringing this up. Since you're already working on this, could you also include a compatibility check (e.g., Instrumentation: #{instrumentation.name} failed to install: compatibility issue)?

@0robustus1

Copy link
Copy Markdown
Author

@xuan-cao-swi good point. Added it.

@0robustus1

Copy link
Copy Markdown
Author

Test failure seems to report on other PRs as well:

1) Failure:
OpenTelemetry::SDK::Trace::Export::BatchSpanProcessor::dropped spans metrics#test_0001_reports consistent label keys [test/opentelemetry/sdk/trace/export/batch_span_processor_test.rb:407]:
Expected: nil
  Actual: ["code.function", "reason"]

So it might be broken on main?

@mwear mwear changed the title fix - do not report disabled instrumentations as failures fix: do not report disabled instrumentations as failures Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants