-
Notifications
You must be signed in to change notification settings - Fork 8
[Observability] Agent framework spans - clean up input and output, listen to custom sources #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 pull request enhances the Agent Framework observability extension to support custom activity sources and simplifies input/output message attributes by extracting only text content.
Changes:
- Adds support for custom activity sources via an optional
additionalSourcesparameter inWithAgentFramework() - Implements message filtering and text extraction logic to clean up gen_ai.input.messages and gen_ai.output.messages tags
- Introduces comprehensive test coverage for the new message processing functionality
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 27 comments.
Show a summary per file
| File | Description |
|---|---|
| Microsoft.Agents.A365.Observability.Extension.Tests.csproj | Adds project reference to AgentFramework extension for testing |
| AgentFrameworkSpanProcessorHelperTests.cs | New test file with comprehensive coverage for message filtering and text extraction |
| AgentFrameworkSpanProcessorHelper.cs | New helper class implementing message filtering logic to extract text content from user/assistant messages |
| AgentFrameworkMessageContent.cs | New model classes for deserializing Agent Framework message structure |
| Microsoft.Agents.A365.Observability.Extensions.AgentFramework.csproj | Adds InternalsVisibleTo for test project access |
| BuilderExtensions.cs | Updates WithAgentFramework to accept custom sources and updates copyright header format (inconsistent) |
| AgentFrameworkSpanProcessor.cs | Adds constructor parameter for custom sources and implements source filtering for invoke_agent, chat, and execute_tool operations |
Why?
What?
builder.AddA365Tracing(config => { config.WithAgentFramework(additionalSources: "myCustomSource"); });Testing

Before change
gen_ai.input.messages
gen_ai.output.messages
With change
