-
Notifications
You must be signed in to change notification settings - Fork 796
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
Baggage value certain characters will crash application or encode chars #1607
Comments
Any update on this? I have not yet re-tested it with the 1.0 release. I have overheard this comment: #1842 (comment) |
@Mario-Hofstaetter I ended up finding dotnet/runtime#36908 which is the root cause, so this is really unrelated to OTEL. Unfortunately, it doesn't seem like much one can do other than not using Activity.Baggage especially with the fun part of anything in Activity.Baggage propagating automatically to any external service you call. |
@rgmills Thank you for the response. What about using the OpenTelemetry Baggage API? As mentioned in #1842 (comment) I have to dig into the docs again, we have postponed implementation of Opentelemetry Tracing since I reported the issue ... |
That seems to be the correct route since the DiagnosticListener in the runtime is automatically going to add anything on Activity.Baggage. I haven't tried yet, yesterday we just switched out baggage to tag to get OTEL enabled again. Today, I'll get something into prod with the OTEL Baggage API. |
Got similar behavior when tried to pass baggage between services. Baggage.Current.SetBaggage("baggage_key_test", "baggage value test 123"); Get baggage: var value = Baggage.Current.GetBaggage("baggage_key_test");
// baggage%2Bvalue%2Btest%2B123 I see the encoding in inject method, but there is no decoding in the extract method. So probably it could be easily fixed if we add decoding into the extract method. |
Bug Report
netcoreapp3.1
Symptom
When adding
Baggage
to anActivity
using certain chars will encode them or crash the receiving application.The baggage value is not correctly received in child-service.
\
%2B
@
%2540
,
%252C
&
%2526
(
There is no mentioning of a limited allowed charset in specification/overview.md#baggage ?
What is the expected behavior?
Original baggage value should be preserved exactly.
What is the actual behavior?
Some characters are only encoded.
Using round brackets will crash the ASP.NET Core WEB API Service.
Using
.AddBaggage("demo.foobar5", "!x_x,x-x&x(x");
:Reproduce
In child-service:
Log output of receiving service
Resulting display in jaeger
1.21.0
:The text was updated successfully, but these errors were encountered: