Skip to content

Expose session Id for baggage builder - #71

Merged
fpfp100 merged 5 commits into
mainfrom
users/pefan/sessionid
Nov 18, 2025
Merged

Expose session Id for baggage builder#71
fpfp100 merged 5 commits into
mainfrom
users/pefan/sessionid

Conversation

@fpfp100

@fpfp100 fpfp100 commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Expose session Id for baggage builder

Comment thread packages/agents-a365-observability/src/tracing/middleware/BaggageBuilder.ts Outdated
@fpfp100
fpfp100 marked this pull request as ready for review November 17, 2025 22:51
@fpfp100
fpfp100 requested a review from a team as a code owner November 17, 2025 22:51
Copilot AI review requested due to automatic review settings November 17, 2025 22:51

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 PR exposes session ID support in the baggage builder and span processor, allowing session IDs to be propagated through OpenTelemetry context and automatically enriched into span attributes.

  • Adds sessionId() method to BaggageBuilder class with fluent API support
  • Updates setRequestContext() static method to accept an optional sessionId parameter
  • Includes SESSION_ID_KEY in the list of generic attributes automatically copied from baggage to spans

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/agents-a365-observability/src/tracing/middleware/BaggageBuilder.ts Adds sessionId() method and updates setRequestContext() to accept sessionId parameter
packages/agents-a365-observability/src/tracing/processors/util.ts Adds SESSION_ID_KEY to GENERIC_ATTRIBUTES array for automatic span enrichment
tests/observability/core/BaggageBuilder.test.ts Adds comprehensive test coverage for sessionId functionality in fluent API, static method, and empty value handling
tests/observability/core/SpanProcessor.test.ts Adds test for sessionId propagation from baggage to span attributes and updates attribute registry test

Comment thread packages/agents-a365-observability/src/tracing/middleware/BaggageBuilder.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/middleware/BaggageBuilder.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/middleware/BaggageBuilder.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/middleware/BaggageBuilder.ts Outdated
@fpfp100
fpfp100 merged commit 8ea0ee1 into main Nov 18, 2025
7 checks passed
@pontemonti
pontemonti deleted the users/pefan/sessionid branch December 5, 2025 17:09
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.

4 participants