Skip to content

Revert: Fix GetCallerBaggagePairs userId fallback#96

Merged
fpfp100 merged 1 commit into
mainfrom
revert-userid-fallback
May 13, 2026
Merged

Revert: Fix GetCallerBaggagePairs userId fallback#96
fpfp100 merged 1 commit into
mainfrom
revert-userid-fallback

Conversation

@fpfp100

@fpfp100 fpfp100 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Reverts #86.

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 the AadObjectId → AgenticUserId → From.Id fallback chain) breaks downstream scenarios that expect an AAD object ID.

Test plan

  • Verify existing tests pass
  • Confirm userId is only set from AadObjectId again

🤖 Generated with Claude Code

Note

The original PR will not take effect since UPN (non-GUID) values are always ignored by the ingestion service.

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 reverts the caller user.id fallback behavior introduced in #86 so Agent365 telemetry uses only AadObjectId for user.id, aligning with downstream GUID expectations.

Changes:

  • Restores GetCallerBaggagePairs to emit user.id only from Activity.From.AadObjectId.
  • Removes the tests that validated fallback behavior through AgenticUserId and From.Id.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/Microsoft.OpenTelemetry/Agent365/Hosting/Extensions/TurnContextExtensions.cs Reverts caller user ID extraction to AadObjectId-only behavior.
test/Microsoft.OpenTelemetry.Agent365.Tests/Hosting/Extensions/TurnContextExtensionsTests.cs Deletes fallback-related tests added for the reverted behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fpfp100
fpfp100 merged commit 41dbed9 into main May 13, 2026
11 checks passed
@fpfp100
fpfp100 deleted the revert-userid-fallback branch May 13, 2026 22:56
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