Skip to content

ddtrace/tracer: add usr.id even with propagation #1702

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

Julio-Guerra
Copy link
Contributor

What does this PR do?

Add the usr.id span tag even when the user id propagation is enabled.

Motivation

At first, we thought the backend would enrich this span tag based on the propagated _dd.p.usr.id one, but having usr.id present is part of the feature:

  1. _dd.p.usr.id is set alone when it was found in the HTTP header for propagated tags (note how anyone can set it)
  2. usr.id must always be set when using the SetUser() function, so that we can know that the user id has been programmatically set.

Describe how to test/QA your changes

Reviewer's Checklist

  • If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • Changed code has unit tests for its functionality.
  • If this interacts with the agent in a new way, a system test has been added.

Sorry, something went wrong.

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
@Julio-Guerra Julio-Guerra added this to the v1.48.0 milestone Jan 30, 2023
@Julio-Guerra Julio-Guerra requested a review from a team January 30, 2023 15:14
@Julio-Guerra
Copy link
Contributor Author

System-tests fix: DataDog/system-tests#817

@Julio-Guerra Julio-Guerra merged commit 0a7636d into main Jan 30, 2023
@Julio-Guerra Julio-Guerra deleted the julio.guerra/fix-user-id-propagation-tagging branch January 30, 2023 15:39
dianashevchenko pushed a commit that referenced this pull request Feb 9, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants