GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||
GeezerVison is showing github.com — fix(tracing): drop trailing comma when serializing baggage without third-party items by alphasafal · Pull Request #8119 · getsentry/sentry-python Conversation
|
|
Ran the baggage tests locally against this branch — |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@alphasafal CONTRIBUTING auto-closes outside PRs without a linked, maintainer-acknowledged issue. Otherwise, from my perspective this can be merged at e8f8ace.
# probe_celery.py: _update_celery_task_headers({"baggage": "sentry-trace_id=771a43a4192642f0b136d5159a501700,sentry-sample_rate=0.5"}, span, False)
$ python probe_celery.py # e8f8ace with the base condition (if include_third_party:)
'sentry-trace_id=771a43a4192642f0b136d5159a501700,sentry-sample_rand=0.395125,sentry-environment=production,sentry-transaction=t,sentry-sample_rate=0.5,sentry-sampled=true,'
$ python probe_celery.py # e8f8ace
'sentry-trace_id=771a43a4192642f0b136d5159a501700,sentry-sample_rand=0.051087,sentry-environment=production,sentry-transaction=t,sentry-sample_rate=0.5,sentry-sampled=true'
$ pytest tests/tracing/test_baggage.py tests/integrations/celery/test_update_celery_task_headers.py -q --no-cov
42 passed, 4 warnings in 4.42s # e8f8ace, Python 3.12
1 failed, 41 passed, 4 warnings in 1.11s # base condition restored, test kept
FAILED tests/tracing/test_baggage.py::test_serialize_no_trailing_comma_without_third_party_items
# test_span_with_transaction_custom_headers, the one Celery merge test, sends custom=value
# and expects combined_baggage.serialize(include_third_party=True): it passes on both
non-blocking: add a Celery test without third-party baggage?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@chrikrah thanks for running the Celery probe and checking it against the base condition. I've opened #8120 for the bug and linked it in the description, and I'll add a Celery test with no third-party baggage so that path is covered directly. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Adds a Celery header test where the incoming baggage has only Sentry items. The outgoing baggage must not end with a trailing comma.
|
Added the Celery test for baggage without third-party items in 0bc5679. It passes with the fix and fails on the base condition. Marking this ready for review. @chrikrah could a maintainer also acknowledge #8120 so this isn't auto-closed? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@alphasafal the Celery test fails on the base condition; nothing blocks a merge.
$ pytest tests/tracing/test_baggage.py tests/integrations/celery/test_update_celery_task_headers.py -q --no-cov -p no:cacheprovider # export of 0bc5679, sentry_sdk imported from it, Python 3.12.3, celery 5.6.3
43 passed, 4 warnings
2 failed, 41 passed, 4 warnings # base condition `if include_third_party:` restored, tests kept
FAILED tests/tracing/test_baggage.py::test_serialize_no_trailing_comma_without_third_party_items
FAILED tests/integrations/celery/test_update_celery_task_headers.py::test_span_with_transaction_custom_headers_without_third_party_baggage
My 10-25 auto-close warning was wrong: validate-pr.yml only runs on open or reopen, so #8120 needs nothing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thanks for picking this up! Looks good to me now 😃
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Baggage.serialize(include_third_party=True) leaves a trailing comma when there are no third-party items
There was an error while loading. Please reload this page.