Skip to content
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

Support tracestate query tag with marginalia shape #484

Merged
merged 4 commits into from
Dec 4, 2023

Conversation

keiko713
Copy link
Contributor

@keiko713 keiko713 commented Dec 1, 2023

While I was testing, I realized that tracestate is not propagating well when it's passed with marginalia shape.
This PR should fix it.
Honestly, I'm not 100% sure if "With sqlcommenter format (key='value'), key shouldn't include ":"" is accurate, but I think it's a safe assumption to make.

With sqlcommenter, the tracestate might be URL escaped, but let's assume that it's not for marginalia here.

@keiko713 keiko713 requested a review from a team December 1, 2023 09:53
@keiko713 keiko713 mentioned this pull request Dec 1, 2023
Copy link
Contributor

@msakrejda msakrejda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So technically : is a valid URL component value and so it does not need to be percent-encoded, so as far as I can tell from sqlcommenter docs, it could occur unescaped in the name of a key. However, I think it's both unlikely to be there in the first place, and, if present, it's likely that it will be percent-encoded (since even values that don't have to be encoded can be encoded, and, e.g., the node/browser encodeURIComponent does encode it). So I think this is fine as is.

logs/querysample/tags.go Outdated Show resolved Hide resolved
keiko713 and others added 2 commits December 4, 2023 10:10
@keiko713 keiko713 merged commit 0837e43 into main Dec 4, 2023
3 checks passed
@keiko713 keiko713 deleted the support-tracestate-tag branch December 4, 2023 01:52
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.

2 participants