Revert: Fix getCallerBaggagePairs userId fallback#253
Open
fpfp100 wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Reverts the previously-added userId fallback chain in OpenTelemetry baggage generation so user.id is only populated from aadObjectId, preventing non-GUID values from being sent to ingest.
Changes:
- Update
getCallerBaggagePairsto setuser.idexclusively fromfrom.aadObjectId - Remove/adjust tests that asserted fallback to
agenticUserId/from.id - Update Jest config by removing the
@microsoft/agents-a365-observability-hostingmoduleNameMapper entry
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/observability/extension/hosting/TurnContextUtils.test.ts | Removes tests that asserted userId fallback behavior |
| tests/observability/extension/hosting/BaggageBuilderUtils.test.ts | Updates expectation so user.id is not emitted when aadObjectId is absent |
| tests/jest.config.cjs | Removes Jest moduleNameMapper for the hosting package |
| packages/agents-a365-observability-hosting/src/utils/TurnContextUtils.ts | Reverts user.id to only use aadObjectId |
Agent-Logs-Url: https://github.com/microsoft/Agent365-nodejs/sessions/6d50d8d4-7449-4f9d-9fb0-5a42e75c19af Co-authored-by: fpfp100 <126631706+fpfp100@users.noreply.github.com>
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.
Summary
Reverts #250.
The ingest service only accepts GUIDs for
user.id. Any non-GUID value gets replaced with an all-zeros GUID (00000000-0000-0000-0000-000000000000). Allowing non-GUID values as userId (via theaadObjectId → agenticUserId → from.idfallback chain) breaks downstream scenarios that expect an AAD object ID.Test plan
🤖 Generated with Claude Code
Note
The original PR will not take effect since UPN (non-GUID) values are always ignored by the ingestion service.