Add the span and log record processors for multi-agent GENAI systems#46703
Draft
rads-1996 wants to merge 2 commits intoAzure:mainfrom
Draft
Add the span and log record processors for multi-agent GENAI systems#46703rads-1996 wants to merge 2 commits intoAzure:mainfrom
rads-1996 wants to merge 2 commits intoAzure:mainfrom
Conversation
6 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to enable automatic GenAI main-agent attribution in the azure-monitor-opentelemetry distro by registering new span and log record processors during Azure Monitor configuration.
Changes:
- Add a changelog entry describing GenAI main-agent attribution support for multi-agent systems.
- Import new GenAI main-agent processors from the exporter package.
- Register the new processors first in both tracing and logging pipeline setup.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md |
Documents the new GenAI main-agent attribution feature. |
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py |
Wires GenAI span/log processors into tracing and logging setup. |
Comment on lines
+62
to
+65
| from azure.monitor.opentelemetry.exporter._gen_ai._processor import ( # pylint: disable=import-error,no-name-in-module | ||
| _GenAIMainAgentLogRecordProcessor, | ||
| _GenAIMainAgentSpanProcessor, | ||
| ) |
Comment on lines
+189
to
+190
| # GenAI main-agent attribution processor must be registered first | ||
| tracer_provider.add_span_processor(_GenAIMainAgentSpanProcessor()) |
Comment on lines
+244
to
+245
| # GenAI main-agent attribution processor must be registered first | ||
| logger_provider.add_log_record_processor(_GenAIMainAgentLogRecordProcessor()) |
929a37f to
fc98fa9
Compare
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.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines