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
trimming space in parseCommaSeparatedMap #271
Comments
Thanks for catching this; it looks like a bug |
Related Issue in JS jaegertracing/jaeger-client-node#244 |
@jsongHBO @black-adder I have a PR coming right up! Thanks for opening this issue; I'll reference it in my PR. |
@black-adder Actually, there's an existing test case that looks like it's expecting that the whitespace is preserved:
I think it's counter-intuitive (not to mention inconsistent with the associated godoc comments) to preserve whitespace in this way, but maybe this was done intentionally for some reason? I'll go ahead with my PR, and we can hash it out there. |
@yurishkuro is this intended behavior? Seems weird that we trim the whitespace before the key and after the value but not in between. |
Opened #272 to address this, if indeed is a bug and not some intended behavior. |
we have plans to switch baggage propagation format from span.SetBaggage("key", " value")
// --- in another process
span.GetBaggage("key") == " value" // leading space is preserved If we always trim the spaces the above will be broken. One could argue (correctly) that when encoding baggage in the client process it should use url encoding for the value, i.e. |
What about the key? Should key also be encoded |
keys can be trimmed since we do not support spaces in them anyway with the current propagation format |
I'd like to fix it. |
The comments in https://github.com/jaegertracing/jaeger-client-go/blob/master/propagation.go#L267-L272
suggest that if I enter
"key3 = value3 "
, then it should returnmap[key3:value3]
But it doesn't
https://goplay.space/#K-zW71Vr33C
since trimming is not done after the
=
separation.I'm not sure if this is intentional or a bug. If it's intentional, then the comments should be updated.
The text was updated successfully, but these errors were encountered: