-
Notifications
You must be signed in to change notification settings - Fork 5
Add changes to support gen_ai.agent.type #143
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
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 adds support for a new gen_ai.agent.type field to the observability framework. The change introduces a new telemetry attribute to track the type of AI agents, providing better categorization and monitoring capabilities.
Key Changes:
- Added
GEN_AI_AGENT_TYPE_KEYconstant andagentTypefield to theAgentDetailsinterface - Implemented
agentType()method inBaggageBuilderfor fluent API support - Updated scope utilities and processors to capture and propagate agent type information
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/agents-a365-observability/src/tracing/constants.ts | Added GEN_AI_AGENT_TYPE_KEY constant definition |
| packages/agents-a365-observability/src/tracing/contracts.ts | Added agentType optional field to AgentDetails interface |
| packages/agents-a365-observability/src/tracing/middleware/BaggageBuilder.ts | Implemented agentType() method for setting agent type in baggage |
| packages/agents-a365-observability/src/tracing/scopes/OpenTelemetryScope.ts | Added agent type tag setting in scope initialization |
| packages/agents-a365-observability/src/tracing/processors/util.ts | Added agent type to GENERIC_ATTRIBUTES array |
| packages/agents-a365-observability-hosting/src/utils/ScopeUtils.ts | Maps recipient.role to agentType when deriving agent details |
| packages/agents-a365-observability-hosting/src/utils/TurnContextUtils.ts | Added agent type to baggage pairs; removed agent description from pairs |
| tests/observability/core/BaggageBuilder.test.ts | Added test for agentType() method |
| tests/observability/extension/hosting/BaggageBuilderUtils.test.ts | Updated test expectations to include agent type |
| tests/observability/extension/hosting/TurnContextUtils.test.ts | Updated test to verify agent type in baggage pairs |
| tests/observability/extension/hosting/scope-utils.test.ts | Updated tests to verify agent type in derived agent details |
packages/agents-a365-observability-hosting/src/utils/TurnContextUtils.ts
Outdated
Show resolved
Hide resolved
nikhilNava
left a comment
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.
Everything else looks good. Please make the change mentioned.
packages/agents-a365-observability-hosting/src/utils/ScopeUtils.ts
Outdated
Show resolved
Hide resolved
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
Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.
Changes to add support for gen_ai.agent.type