-
Notifications
You must be signed in to change notification settings - Fork 416
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
fix(celery): change out.host tags to point to celery broker #10750
base: main
Are you sure you want to change the base?
Conversation
|
Datadog ReportBranch report: ✅ 0 Failed, 1097 Passed, 281 Skipped, 8m 50.59s Total duration (17m 43.95s time saved) |
BenchmarksBenchmark execution time: 2024-11-22 22:02:14 Comparing candidate commit 3021b57 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 388 metrics, 2 unstable metrics. |
Co-authored-by: Zachary Groves <[email protected]>
def test_amqp_task(instrument_celery, traced_amqp_celery_app): | ||
tracer = Pin.get_from(traced_amqp_celery_app).tracer | ||
|
||
with start_worker( # <-- Important! |
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.
nit: What is this comment for? Could we maybe elaborate?
assert_traces(tracer, "add", t, "amqp") | ||
|
||
|
||
def assert_traces(tracer, task_name, task, backend): |
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 just make this into a snapshot test?
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.
Forgot to approve, oops
|
||
host = "" | ||
if parsed_url.scheme: | ||
host += parsed_url.scheme + "://" |
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.
out.host
should contain only the host (server.address in otel terms), so we should omit the "scheme" in this case.
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.
Since one of the assertions is assert async_span.get_tag("out.host") == "memory://"
, I think we should only omit it if it doesn't say memory
.
Otherwise, that span tag will be completely blank in the "memory scenario".
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.
Since one of the assertions is assert async_span.get_tag("out.host") == "memory://", I think we should only omit it if it doesn't say memory.
OK, that works.
Motivation
Change
out.host
tags to point towards the celery broker, instead of the local celery hostname. Fixes service-representation issues.Fixes 11491
Checklist
Reviewer Checklist