fix(pika): pass destination instead of task_name to _enrich_span#4563
Conversation
- tightened the test_get_span assertion to verify _enrich_span is called with destination, not task_name. - changed enrich_span.assert_called_once() to enrich_span.assert_called_once_with(...) with destination as the argument.
- Update CHANGELOG.md - Updated the Pull Request URL
|
Thanks for the PR! Just a heads-up: we no longer update Please add the appropriate changelog fragment for this change instead of editing |
Thanks for the heads-up! I’ve added a changelog fragment in Please let me know if any adjustments are needed. 🙂 |
tammy-baylis-swi
left a comment
There was a problem hiding this comment.
Lgtm! Will also need a Maintainer's approval.
Thank you for the feedback! Waiting on a Maintainer’s approval. |
Co-authored-by: Tammy Baylis <96076570+tammy-baylis-swi@users.noreply.github.com>
|
@GitanshKapoor It you are interested in the instrumentation it would be nice to add some tests that test the exported telemetry instead of the utils in a followup PR |
Description
In
_get_span(utils.py),_enrich_spanwas called withtask_nameinstead ofdestination, causing themessaging.destinationspan attribute to always show"(temporary)"on publish spans and the consumer tag on consume spans, instead of the actual queue or exchange name.Fixes #1026
Type of change
How Has This Been Tested?
Updated
test_get_spanintest_utils.pyto assert that_enrich_spanis called withdestinationas the argument, nottask_name. All existing tests intests/test_utils.pypass.Does This PR Require a Core Repo Change?
Checklist: