Skip to content

Conversation

@eavanvalkenburg
Copy link
Contributor

@eavanvalkenburg eavanvalkenburg commented Dec 10, 2025

Description

This adds two additional params as kwargs to the configure_azure_monitor function.
One for log_processors, one for metric_readers, then parses them the same way as the span_processors.

Closes: #44366

If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.

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.

Testing Guidelines

  • Pull request includes test coverage for the included changes.

Copilot AI review requested due to automatic review settings December 10, 2025 15:01
@github-actions github-actions bot added Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Distro Monitor OpenTelemetry Distro labels Dec 10, 2025
@github-actions
Copy link

Thank you for your contribution @eavanvalkenburg! We will review the pull request and get back to you soon.

Copy link
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

This PR adds extensibility to the configure_azure_monitor function by introducing two new parameters: log_processors and metric_readers. These allow users to provide custom log processors and metric readers alongside Azure Monitor's default processors/readers, following the existing pattern established by the span_processors parameter.

Key changes:

  • Added LOG_PROCESSORS_ARG and METRIC_READERS_ARG constants
  • Implemented default configuration handlers for the new parameters
  • Integrated custom log processors and metric readers into the setup pipeline
  • Added test coverage for configuration storage and defaults

Reviewed changes

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

Show a summary per file
File Description
_constants.py Adds two new constant definitions for the log_processors and metric_readers arguments
_utils/configurations.py Imports new constants and adds default configuration functions for log_processors and metric_readers
_configure.py Imports new constants, updates docstring, adds logic to include custom log_processors in logger provider and custom metric_readers in meter provider
test_configurations.py Adds test assertions for log_processors and metric_readers in configuration tests, includes whitespace cleanup
test_configure.py Code formatting improvements (indentation, quote consistency) for existing logging tests

@github-actions
Copy link

github-actions bot commented Dec 10, 2025

API Change Check

APIView identified API level changes in this PR and created the following API reviews

azure-monitor-opentelemetry

@rads-1996
Copy link
Member

rads-1996 commented Dec 10, 2025

@eavanvalkenburg Thank you for your contribution. Do you mind if I push some changes to this PR?

Copy link
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

@lzchen
Copy link
Member

lzchen commented Jan 7, 2026

@rads-1996 Is this a duplicate? #43713

@rads-1996
Copy link
Member

@rads-1996 Is this a duplicate? #43713

Yes, I will close the other one.

@rads-1996 rads-1996 merged commit 62861a2 into Azure:main Jan 7, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Community Contribution Community members are working on the issue customer-reported Issues that are reported by GitHub users external to the Azure organization. Monitor - Distro Monitor OpenTelemetry Distro

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow log and metric exporters/processers in configure_azure_monitor

4 participants