Skip to content

Conversation

@fpfp100
Copy link
Contributor

@fpfp100 fpfp100 commented Jan 9, 2026

Changes to add support for gen_ai.agent.type

Copilot AI review requested due to automatic review settings January 9, 2026 00:46
@fpfp100 fpfp100 requested a review from a team as a code owner January 9, 2026 00:46
Copy link
Contributor

Copilot AI left a 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_KEY constant and agentType field to the AgentDetails interface
  • Implemented agentType() method in BaggageBuilder for 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

@fpfp100 fpfp100 changed the title Changes to add support for gen_ai.agent.type Add changes to support gen_ai.agent.type Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants