Skip to content

Added custom log record processors configuration option#43713

Closed
rads-1996 wants to merge 9 commits intoAzure:mainfrom
rads-1996:add-log-record-processor
Closed

Added custom log record processors configuration option#43713
rads-1996 wants to merge 9 commits intoAzure:mainfrom
rads-1996:add-log-record-processor

Conversation

@rads-1996
Copy link
Copy Markdown
Member

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.

Copilot AI review requested due to automatic review settings October 30, 2025 19:47
@github-actions github-actions Bot added the Monitor - Distro Monitor OpenTelemetry Distro label Oct 30, 2025
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

This PR adds support for custom log record processors in the Azure Monitor OpenTelemetry distro. Users can now pass a list of LogRecordProcessor objects via the log_record_processors parameter to configure_azure_monitor(), allowing for custom processing and enrichment of log records before they are exported to Azure Monitor.

Key Changes

  • Added log_record_processors parameter to configure_azure_monitor() configuration
  • Custom log record processors are now added to the logger provider before built-in processors (quickpulse and performance counters)
  • Included a sample demonstrating how to use the feature to enrich logs with operation name from the current span context

Reviewed Changes

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

Show a summary per file
File Description
azure/monitor/opentelemetry/_constants.py Adds the LOG_RECORD_PROCESSORS_ARG constant for the new configuration parameter
azure/monitor/opentelemetry/_configure.py Implements log record processor registration logic and adds parameter documentation
azure/monitor/opentelemetry/_utils/configurations.py Adds default configuration handler for log record processors
samples/logging/modify_logs.py Provides a working example of using custom log record processors
tests/test_configure.py Updates tests to verify custom log record processors are registered correctly
tests/utils/test_configurations.py Tests configuration handling for log record processors
README.md Documents the new log_record_processors parameter in the configuration table
CHANGELOG.md Adds release note for the new feature

Comment thread sdk/monitor/azure-monitor-opentelemetry/README.md Outdated
Comment thread sdk/monitor/azure-monitor-opentelemetry/samples/logging/modify_logs.py Outdated
Comment thread sdk/monitor/azure-monitor-opentelemetry/README.md Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Oct 30, 2025

API Change Check

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

azure-monitor-opentelemetry

rads-1996 and others added 7 commits October 30, 2025 13:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…_logs.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Comment thread sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jan 2, 2026

Hi @rads-1996. Thank you for your interest in helping to improve the Azure SDK experience and for your contribution. We've noticed that there hasn't been recent engagement on this pull request. If this is still an active work stream, please let us know by pushing some changes or leaving a comment. Otherwise, we'll close this out in 7 days.

@github-actions github-actions Bot added the no-recent-activity There has been no recent activity on this issue. label Jan 2, 2026
@rads-1996
Copy link
Copy Markdown
Member Author

Superseeded by #44367

@rads-1996 rads-1996 closed this Jan 7, 2026
@github-actions
Copy link
Copy Markdown

Hi @rads-1996. Thank you for your contribution. Since there hasn't been recent engagement, we're going to close this out. Feel free to respond with a comment containing /reopen if you'd like to continue working on these changes. Please be sure to use the command to reopen or remove the no-recent-activity label; otherwise, this is likely to be closed again with the next cleanup pass.

@rads-1996 rads-1996 reopened this Feb 24, 2026
@github-actions github-actions Bot removed the no-recent-activity There has been no recent activity on this issue. label Feb 24, 2026
@rads-1996 rads-1996 closed this Feb 24, 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