Skip to content

fix(auto-instrumentation): print debug startup messages#4542

Open
pmcollins wants to merge 7 commits intoopen-telemetry:mainfrom
pmcollins:fix/auto-instrumentation-debug-diagnostics
Open

fix(auto-instrumentation): print debug startup messages#4542
pmcollins wants to merge 7 commits intoopen-telemetry:mainfrom
pmcollins:fix/auto-instrumentation-debug-diagnostics

Conversation

@pmcollins
Copy link
Copy Markdown
Member

@pmcollins pmcollins commented May 6, 2026

Description

Writes auto-instrumentation startup debug messages to stderr when OTEL_LOG_LEVEL=debug or OTEL_LOG_LEVEL=trace is set. This makes it easier to see which distro and instrumentors were loaded during opentelemetry-instrument startup.

If Python logging is already configured to handle these debug messages, the new stderr output is suppressed to avoid double logging.

Fixes #4540

Type of change

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

How Has This Been Tested?

  • Ran python -m unittest opentelemetry-python-contrib/opentelemetry-instrumentation/tests/auto_instrumentation/test_load.py
  • Ran oteltest with local packages and confirmed the expected stderr debug messages

Does This PR Require a Core Repo Change?

  • No.

Checklist:

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

@pmcollins pmcollins force-pushed the fix/auto-instrumentation-debug-diagnostics branch from 13ef6f1 to 4e5b680 Compare May 6, 2026 22:08
@pmcollins pmcollins marked this pull request as ready for review May 6, 2026 22:24
@pmcollins pmcollins requested a review from a team as a code owner May 6, 2026 22:24
@pmcollins pmcollins force-pushed the fix/auto-instrumentation-debug-diagnostics branch from 8191a08 to eb2baa5 Compare May 7, 2026 19:58
@pmcollins pmcollins changed the title fix(auto-instrumentation): print debug startup diagnostics fix(auto-instrumentation): print debug startup messages May 7, 2026
@github-project-automation github-project-automation Bot moved this to Approved PRs in Python PR digest May 7, 2026
@pmcollins pmcollins force-pushed the fix/auto-instrumentation-debug-diagnostics branch from 6a8306d to 172ab96 Compare May 7, 2026 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Approved PRs

Development

Successfully merging this pull request may close these issues.

[instrumentation] write auto-instrumentation loader messages to stderr when OTEL_LOG_LEVEL=debug

2 participants