Skip to content

pika: added instrumentation for pika.connection.Connection and pika.c… #3584

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

Merged

Conversation

warmagedon007
Copy link
Contributor

@warmagedon007 warmagedon007 commented Jun 16, 2025

Description

Added support for the pika base connection and channel classes. Thus making all the SelectConnection adapters to be automatically instrumented.

Fixes #920

Type of change

New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Added relavent tests cases based on current tests for the opentelemetry-instrumentation-pika.
by running tox -l | grep sio-pika | xargs -L1 tox -e

Does This PR Require a Core Repo Change?

No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

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

…hannel.Channel, thus added instrumentation support to all SelectConnection adapters.
Copy link

linux-foundation-easycla bot commented Jun 16, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@warmagedon007 warmagedon007 requested a review from a team as a code owner June 16, 2025 14:53
Copy link
Member

@aabmass aabmass left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have much context on Pika but the change looks reasonable to me. If someone with Pika knowledge can review that would be awesome then I'll merge

Copy link
Contributor

@xrmx xrmx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never used Pika but double checked the attribute names for the Channel class and also that the callback function we decorate have the same signature as the blocking one. Do we have tests that are not testing mocks though?

@warmagedon007
Copy link
Contributor Author

@xrmx I checked the sister aio-pika instrumentation and I see there that all tests use mocks. Do you have test cases in mind that don't use mocks?

@xrmx xrmx enabled auto-merge (squash) July 7, 2025 08:14
@xrmx
Copy link
Contributor

xrmx commented Jul 7, 2025

@xrmx I checked the sister aio-pika instrumentation and I see there that all tests use mocks. Do you have test cases in mind that don't use mocks?

Maybe there's something in docker-tests, anyway I'll just merge this

@xrmx xrmx merged commit 80c357b into open-telemetry:main Jul 7, 2025
625 checks passed
devmonkey22 pushed a commit to devmonkey22/opentelemetry-python-contrib that referenced this pull request Aug 5, 2025
open-telemetry#3584)

* pika: added instrumentation for pika.connection.Connection and pika.channel.Channel, thus added instrumentation support to all SelectConnection adapters.

* updated changelog.

---------

Co-authored-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
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.

Is there plans to have pika SelectConnection adapter to be autoinstrumented ?
3 participants