-
Notifications
You must be signed in to change notification settings - Fork 412
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
WIP: otel baggage support initial PR #10389
base: main
Are you sure you want to change the base?
Conversation
|
BenchmarksBenchmark execution time: 2024-10-07 20:17:20 Comparing candidate commit 6dc990a in PR branch Found 0 performance improvements and 20 performance regressions! Performance is the same for 354 metrics, 52 unstable metrics. scenario:httppropagationextract-b3_headers
scenario:httppropagationextract-b3_single_headers
scenario:httppropagationextract-full_t_id_datadog_headers
scenario:httppropagationextract-invalid_priority_header
scenario:httppropagationextract-invalid_span_id_header
scenario:httppropagationextract-invalid_tags_header
scenario:httppropagationextract-invalid_trace_id_header
scenario:httppropagationextract-medium_header_no_matches
scenario:httppropagationextract-medium_valid_headers_all
scenario:httppropagationextract-tracecontext_headers
scenario:httppropagationextract-valid_headers_all
scenario:httppropagationextract-valid_headers_basic
scenario:httppropagationextract-wsgi_invalid_priority_header
scenario:httppropagationextract-wsgi_invalid_tags_header
scenario:httppropagationextract-wsgi_invalid_trace_id_header
scenario:httppropagationextract-wsgi_medium_header_no_matches
scenario:httppropagationextract-wsgi_medium_valid_headers_all
scenario:httppropagationextract-wsgi_valid_headers_all
scenario:httppropagationextract-wsgi_valid_headers_basic
scenario:span-start
|
Datadog ReportBranch report: ❌ 426 Failed (0 Known Flaky), 163772 Passed, 10479 Skipped, 8h 40m 55.13s Total duration (7h 4m 44.34s time saved) ❌ Failed Tests (426)
New Flaky Tests (47)
⌛ Performance Regressions vs Default Branch (3)
|
ddtrace/propagation/http.py
Outdated
return | ||
|
||
header_value = ",".join( | ||
f"{_BaggageHeader._encode_key(str(key).strip())}={_BaggageHeader._encode_value(str(value).strip())}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we raise an unhandled exception if value can not be converted to a string? How should we handle dicts,arrays,booleans,etc. The format needs to be consistent across languages (ex: encoding True
vs true
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When "extracting baggage from propagation headers, they may encounter malformed header contents." When this occurs, we "should ignore the entire header." (RFC) So instead of an error, we could potentially just ignore it? As of now, I think it would just do something like a type error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we raise an unhandled exception if value can not be converted to a string?
I don't know who errors are handles in Python, but an invalid header should not break the service we are instrumenting. We could definitely log a warning or whatever you usually do in cases like this.
"should ignore the entire header." (RFC)
The main point here was that we should not try to extract individual values while ignore that bad ones. If something is wrong, don't try to extract anything. I clear this up in the RFC, thanks.
First PR introducing baggage support
Checklist
Reviewer Checklist