opentelemetry-sdk: depcreate logging handler#4919
Open
xrmx wants to merge 6 commits intoopen-telemetry:mainfrom
Open
opentelemetry-sdk: depcreate logging handler#4919xrmx wants to merge 6 commits intoopen-telemetry:mainfrom
xrmx wants to merge 6 commits intoopen-telemetry:mainfrom
Conversation
Contributor
Author
|
Tests are failing because I'm using |
Move config handling to opentelemetry-instrumentation and the handler to opentelemetry-instrumentation-logging
While at it also fix the noopprovider test case that was working because we were asserting against another handler.
a2fed31 to
4139bf5
Compare
pmcollins
approved these changes
Feb 23, 2026
Member
pmcollins
left a comment
There was a problem hiding this comment.
Hi Riccardo, changes LGTM. Suggested a couple of grammar tweaks in the warnings.
Comment on lines
+330
to
+332
| "Setting the OTel Logging handler from the SDK and the " | ||
| "`OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED` are deprecated. " | ||
| "You should install the opentelemetry-instrumentation-logging", |
Member
There was a problem hiding this comment.
"The `OTEL_PYTHON_LOGGING_AUTO_INSTRUMENTATION_ENABLED` environment"
" variable and the `LoggingHandler` in `opentelemetry-sdk` that it controls are"
" deprecated. Install the `opentelemetry-instrumentation-logging`"
" package instead.",
| self._logger_provider = logger_provider or get_logger_provider() | ||
|
|
||
| warnings.warn( | ||
| "This is deprecated you should use the one in opentelemetry-instrumentation-logging", |
Member
There was a problem hiding this comment.
"`LoggingHandler` in `opentelemetry-sdk` is deprecated. Use the"
" handler from `opentelemetry-instrumentation-logging` instead.",
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.
Description
Deprecate using the SDK logging handler, suggest to use opentelemetry-instrumentation-logging instead. While at it also fix tests leaking handlers in loggers that affected other tests.
Refs #4330
Type of change
Please delete options that are not relevant.
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
Does This PR Require a Contrib Repo Change?
Checklist: