Skip to content

Reduce severity & verbosity of instrumentation ImportError (#1115)#4064

Open
john-karp wants to merge 2 commits intoopen-telemetry:mainfrom
john-karp:reduce-excessive-import-errors
Open

Reduce severity & verbosity of instrumentation ImportError (#1115)#4064
john-karp wants to merge 2 commits intoopen-telemetry:mainfrom
john-karp:reduce-excessive-import-errors

Conversation

@john-karp
Copy link
Copy Markdown

@john-karp john-karp commented Dec 30, 2025

Description

In auto-instrumentation context, it is expected that many of the supported target libraries will not be present. Hence, it does not make sense to flood logs with ImportErrors for this expected scenario.

The existing workaround of having users set OTEL_PYTHON_DISABLED_INSTRUMENTATIONS to prevent this gets in the way of the ideal of "making instrumentation easy", because instead of allowing for instrumentation to be 'automatic', users then have to come up with (and maintain in the face of upstream changes) an explicit list of instrumentations to opt out of.

Fixes #1115

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • tox

Does This PR Require a Core Repo Change?

  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been updated
  • Documentation has been updated

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Dec 30, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 3, 2026

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions bot added the Stale label Mar 3, 2026
…metry#1115)

In auto-instrumentation context, it is expected that many of the supported target libraries will not be present.
Hence, it does not make sense to flood logs with ImportErrors for this expected scenario.
@john-karp john-karp force-pushed the reduce-excessive-import-errors branch from 1fd497e to b236d15 Compare March 23, 2026 16:37
@john-karp john-karp marked this pull request as ready for review April 20, 2026 15:38
@john-karp john-karp requested a review from a team as a code owner April 20, 2026 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant