Add changes to support gen_ai.agent.type - #143
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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 |
Julio Carlos Menendez (juliomenendez)
previously approved these changes
Jan 12, 2026
Nikhil Navakiran (nikhilNava)
requested changes
Jan 12, 2026
Nikhil Navakiran (nikhilNava)
left a comment
Contributor
There was a problem hiding this comment.
Everything else looks good. Please make the change mentioned.
Nikhil Navakiran (nikhilNava)
requested changes
Jan 13, 2026
Julio Carlos Menendez (juliomenendez)
approved these changes
Jan 13, 2026
Nikhil Navakiran (nikhilNava)
approved these changes
Jan 13, 2026
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.
Changes to add support for gen_ai.agent.type