Python: Capture workflow telemetry input and output - #7565
Open
slcnx wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds opt-in workflow payload telemetry for improved OpenTelemetry/OpenInference observability.
Changes:
- Captures workflow, executor, and message payloads when sensitive telemetry is enabled.
- Adds message routing and OpenInference attributes.
- Tests enabled, disabled, routing, structured-output, and serialization-failure behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
python/packages/core/agent_framework/observability.py |
Adds payload attributes and serialization helpers. |
python/packages/core/agent_framework/_workflows/_workflow.py |
Captures workflow input and explicit outputs. |
python/packages/core/agent_framework/_workflows/_workflow_context.py |
Captures sent-message content and routing. |
python/packages/core/agent_framework/_workflows/_executor.py |
Captures executor input and output. |
python/packages/core/tests/workflow/test_workflow_observability.py |
Adds focused telemetry tests. |
Author
|
@microsoft-github-policy-service agree [company="yikaobang"] |
Author
|
@microsoft-github-policy-service agree company="yikaobang" |
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.
Motivation & Context
Python workflow spans currently expose structural metadata but omit the payloads processed by executors and sent between them. This prevents OpenTelemetry backends from showing useful workflow inputs and outputs.
This change closes the Python payload-capture gap identified in #3075, follows the sensitive-data behavior introduced for .NET in #3467, and adds vendor-neutral OpenInference attributes so compatible backends can render workflow I/O directly.
Description & Review Guide
Related Issue
Fixes #3075
Contribution Checklist