fix(pika): pass destination instead of task_name to _enrich_span#4563
Open
GitanshKapoor wants to merge 5 commits intoopen-telemetry:mainfrom
Open
fix(pika): pass destination instead of task_name to _enrich_span#4563GitanshKapoor wants to merge 5 commits intoopen-telemetry:mainfrom
GitanshKapoor wants to merge 5 commits intoopen-telemetry:mainfrom
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.
xrmx
reviewed
May 11, 2026
| ### 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)) |
Author
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In
_get_span(utils.py),_enrich_spanwas called withtask_nameinstead of
destination, causing themessaging.destinationspanattribute to always show
"(temporary)"on publish spans and theconsumer 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 with
destinationas the argument, nottask_name. Allexisting tests in
tests/test_utils.pypass.Does This PR Require a Core Repo Change?
Checklist: