-
Notifications
You must be signed in to change notification settings - Fork 446
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
Empty headers injected by HTTP and Baggage propagator #1366
Comments
A quick look into the HTTP propagator code, I don't think empty header files are injected if the context is not valid as we return early in that case: opentelemetry-cpp/api/include/opentelemetry/trace/propagation/http_trace_context.h Lines 40 to 43 in c8bd431
Let me know if I am missing something here. |
@lalitb Sorry for necro-bumping this issue, but I've finally had time to check it once again, and the Tracestate header still can be empty. I've also found the root cause: while there is a test case for this, it's checking the extracted |
If the HTTP propagator is used on an invalid context or the baggage propagator is used on an empty baggage, the resulting header map will contain empty values. I don't know if this is intended or not, but I think it'd be more user friendly if empty values wouldn't be injected, so the user wouldn't have to remove or check them manually before using them as HTTP request headers.
The text was updated successfully, but these errors were encountered: