Repository navigation
.NET: Python: Avoid duplicate log export when root logger already has an OTel handler - #9897
Merged
Eduard van Valkenburg (eavanvalkenburg) merged 1 commit intoNov 3, 2026
Conversation
Dineshsuriya D (droideronline)
temporarily deployed
to
github-app-auth
October 30, 2026 17:53 — with
GitHub Actions
Inactive
Dineshsuriya D (droideronline)
requested review from
Darren Cohen (dargilco),
Jose Alvarez (jpalvarezl),
sophia-ramsey and
westey (westey-m)
as code owners
October 30, 2026 17:53
Dineshsuriya D (droideronline)
temporarily deployed
to
github-app-auth
October 30, 2026 17:54 — with
GitHub Actions
Inactive
Dineshsuriya D (droideronline)
force-pushed
the
fix/otel-logging-handler-duplicate
branch
from
November 2, 2026 17:41
2a3684a to
8516750
Compare
Dineshsuriya D (droideronline)
requested a review
from Vincent Biret (baywet)
as a code owner
November 2, 2026 17:41
Dineshsuriya D (droideronline)
temporarily deployed
to
github-app-auth
November 2, 2026 17:41 — with
GitHub Actions
Inactive
…docstring Document that configure_otel_providers attaches its LoggingHandler to the agent_framework logger only and does not coordinate with the application's other logging handlers, and point to the manual setup sample. Also correct a comment that said root logger.
Dineshsuriya D (droideronline)
force-pushed
the
fix/otel-logging-handler-duplicate
branch
from
November 2, 2026 17:42
8516750 to
5c6eb23
Compare
Dineshsuriya D (droideronline)
temporarily deployed
to
github-app-auth
November 2, 2026 17:42 — with
GitHub Actions
Inactive
Dineshsuriya D (droideronline)
temporarily deployed
to
github-app-auth
November 2, 2026 17:42 — with
GitHub Actions
Inactive
Eduard van Valkenburg (eavanvalkenburg)
approved these changes
Nov 3, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation & Context
Issue #9896 reported that
configure_otel_providersattaches an OTelLoggingHandlerto theagent_frameworklogger, so an application that also has its own OTelLoggingHandleron the root logger exports everyagent_frameworkrecord twice. Per maintainer direction on the issue, runtime behavior stays unchanged and the function's docstring is clarified instead.Description & Review Guide
Noteto theconfigure_otel_providersdocstring: it is a convenience setup that attaches a handler to theagent_frameworklogger only, does not inspect or coordinate with other logging handlers, and applications combining it with their own root handler should use manual OpenTelemetry setup, with a pointer topython/samples/02-agents/observability/advanced_manual_setup_console_output.py. Also corrected an inline comment that said "root logger" where the code attaches to theagent_frameworklogger.Related Issue
Fixes #9896
AI Assistance
AI assistance details: issue analysis and the docstring wording.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.