fix(pika): pass destination instead of task_name to _enrich_span#4563
fix(pika): pass destination instead of task_name to _enrich_span#4563GitanshKapoor wants to merge 9 commits into
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.
| ### Fixed | ||
|
|
||
| - `opentelemetry-instrumentation-pika`: Fix `messaging.destination` span attribute set to `task_name` instead of `destination` in `_get_span` | ||
| ([#1026](https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1026)) |
There was a problem hiding this comment.
- Hi, I’ve updated the PR URL as suggested. Thanks!
- 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. 🙂 |
| @@ -0,0 +1 @@ | |||
| 'opentelemetry-instrumentation-pika': pass destination to _enrich_span instead of task_name | |||
There was a problem hiding this comment.
Nit:
| 'opentelemetry-instrumentation-pika': pass destination to _enrich_span instead of task_name | |
| `opentelemetry-instrumentation-pika`: pass destination to _enrich_span instead of task_name |
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. |
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: