Skip to content

Add conversation id and channel metadata to InferenceScope and ExecuteToolScope - #111

Merged
PengF (fpfp100) merged 2 commits into
mainfrom
users/pefan/sourcemetadatachange
Dec 11, 2025
Merged

Add conversation id and channel metadata to InferenceScope and ExecuteToolScope#111
PengF (fpfp100) merged 2 commits into
mainfrom
users/pefan/sourcemetadatachange

Conversation

@fpfp100

Copy link
Copy Markdown
Contributor

Add conversation id and channel metadata to InferenceScope and ExecuteToolScope

@fpfp100
PengF (fpfp100) marked this pull request as ready for review December 11, 2025 01:09
@fpfp100
PengF (fpfp100) requested a review from a team as a code owner December 11, 2025 01:09
Copilot AI review requested due to automatic review settings December 11, 2025 01:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 observability telemetry capabilities by adding optional conversationId and sourceMetadata parameters to the InferenceScope and ExecuteToolScope classes. These additions enable better tracking of AI operations by tagging spans with conversation identifiers and channel/source information for distributed tracing.

Key Changes:

  • Added optional conversationId parameter to both InferenceScope and ExecuteToolScope for tagging spans with gen_ai.conversation.id
  • Added optional sourceMetadata parameter (using Pick<SourceMetadata, "name" | "description">) for tagging spans with channel name and description
  • Added comprehensive test coverage for both new parameters across both scope types

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.

File Description
packages/agents-a365-observability/src/tracing/scopes/InferenceScope.ts Added conversationId and sourceMetadata parameters to start() method and constructor; tags are set via setTagMaybe()
packages/agents-a365-observability/src/tracing/scopes/ExecuteToolScope.ts Added conversationId and sourceMetadata parameters to start() method and constructor; tags are set via setTagMaybe()
tests/observability/core/scopes.test.ts Added tests verifying conversationId and sourceMetadata tags are correctly set for both ExecuteToolScope and InferenceScope

Comment thread tests/observability/core/scopes.test.ts
@fpfp100
PengF (fpfp100) enabled auto-merge (squash) December 11, 2025 19:39
@fpfp100
PengF (fpfp100) merged commit c564d28 into main Dec 11, 2025
7 checks passed
@fpfp100
PengF (fpfp100) deleted the users/pefan/sourcemetadatachange branch December 11, 2025 19:41
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.

5 participants