Skip to content

Change import path for LoggingHandler to accommodate upstream breaking changes - Distro#45539

Merged
rads-1996 merged 9 commits intoAzure:mainfrom
rads-1996:logging-handler-distro
Mar 19, 2026
Merged

Change import path for LoggingHandler to accommodate upstream breaking changes - Distro#45539
rads-1996 merged 9 commits intoAzure:mainfrom
rads-1996:logging-handler-distro

Conversation

@rads-1996
Copy link
Copy Markdown
Member

Description

LoggingHandler from opentelemetry.sdk_logs is being deprecated. Need to use the LoggingHandler from the opentelemetry-instrumentation-logging instead.

All SDK Contribution checklist:

  • The pull request does not introduce [breaking changes]
  • CHANGELOG is updated for new features, bug fixes or other significant changes.
  • I have read the contribution guidelines.

General Guidelines and Best Practices

  • Title of the pull request is clear and informative.
  • There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

@github-actions github-actions bot added the Monitor - Distro Monitor OpenTelemetry Distro label Mar 5, 2026
@rads-1996 rads-1996 changed the title Change import path for LoggingHandler to accomodate upstream breaking changes - Distro Change import path for LoggingHandler to accommodate upstream breaking changes - Distro Mar 5, 2026
@rads-1996 rads-1996 force-pushed the logging-handler-distro branch from d9397ea to fce973b Compare March 18, 2026 18:27
@rads-1996 rads-1996 marked this pull request as ready for review March 18, 2026 23:07
Copilot AI review requested due to automatic review settings March 18, 2026 23:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Azure Monitor OpenTelemetry distro to use the new LoggingHandler location from opentelemetry-instrumentation-logging, aligning with upstream deprecation/breaking changes in opentelemetry.sdk._logs.

Changes:

  • Switch LoggingHandler import to opentelemetry.instrumentation.logging.handler.
  • Update unit test module stubs to reflect the new import path.
  • Bump pinned OpenTelemetry-related dependencies and add opentelemetry-instrumentation-logging to install_requires.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py Imports LoggingHandler from the instrumentation package during logging pipeline setup.
sdk/monitor/azure-monitor-opentelemetry/tests/test_configure.py Adjusts sys.modules patching in logging setup tests for the new handler import.
sdk/monitor/azure-monitor-opentelemetry/setup.py Updates pinned OpenTelemetry versions and adds the logging instrumentation dependency.
sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md Notes the import-path change under “Other Changes”.

You can also share your feedback on Copilot code review. Take the survey.

@rads-1996 rads-1996 force-pushed the logging-handler-distro branch from fce973b to 35aed51 Compare March 18, 2026 23:11
@rads-1996 rads-1996 force-pushed the logging-handler-distro branch from 4b4ec0b to 610892d Compare March 19, 2026 00:38
Copy link
Copy Markdown
Member

@JacksonWeber JacksonWeber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rads-1996 rads-1996 merged commit 4b5be11 into Azure:main Mar 19, 2026
20 checks passed
@rads-1996 rads-1996 deleted the logging-handler-distro branch March 19, 2026 15:13
@rads-1996 rads-1996 mentioned this pull request Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Monitor - Distro Monitor OpenTelemetry Distro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants