Skip to content
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

Bugfix: Pika basicConsume context propagation #766

Conversation

oxeye-yuval
Copy link
Contributor

Fixing the context propagation to consumer callback.

Description

The bug was fixed by attaching and detaching the context before executing the user callback.
Hook location was changed to hook the user callback and not the async enqueuing of messages.

Fixes # (issue)
Fixing context propagation to other instrumentors executed from inside the basicConsume callback.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • Creating rabbitMQ consumer which receives a message and performs requests.get() using the Requests instrumntor, verifying the traceID for both the requests span and the pika receive is the same.

Does This PR Require a Core Repo Change?

  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Fixing the context propegation to consumer callback.
Bug was fix by attaching and detaching the context before executing the user callback.
Hook location was changed to hook the user callback and not the async enqeueuing of messages.
@oxeye-yuval oxeye-yuval requested a review from a team as a code owner October 21, 2021 07:58
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 21, 2021

CLA Signed

The committers are authorized under a signed CLA.

@lzchen lzchen merged commit 3ff06da into open-telemetry:main Oct 21, 2021
nicholasgribanov pushed a commit to nicholasgribanov/opentelemetry-python-contrib that referenced this pull request Oct 29, 2021
nicholasgribanov pushed a commit to nicholasgribanov/opentelemetry-python-contrib that referenced this pull request Oct 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants