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

opentelemetry-instrumentation-aio-pika compatibility issue #2005

Open
sha1n opened this issue Oct 17, 2023 · 2 comments
Open

opentelemetry-instrumentation-aio-pika compatibility issue #2005

sha1n opened this issue Oct 17, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@sha1n
Copy link

sha1n commented Oct 17, 2023

The opentelemetry-instrumentation-aio-pika module depends on aio-pika >= 7.2.0, < 10.0.0 but when I use it with aio-pika 9.3.0 it raises the following AttributeError error, because connection has changed to _connection at some point.

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <opentelemetry.instrumentation.aio_pika.span_builder.SpanBuilder object at 0x105aa5870>
channel = <aio_pika.robust_channel.RobustChannel object at 0x105aa65c0>

    def set_channel(self, channel: AbstractChannel):
>       connection = channel.connection
E       AttributeError: 'RobustChannel' object has no attribute 'connection'. Did you mean: '_connection'?

Python version: 3.10

Relevant library versions:
opentelemetry-api 1.20.0
opentelemetry-instrumentation 0.41b0
opentelemetry-instrumentation-aio-pika 0.41b0
opentelemetry-sdk 1.20.0
opentelemetry-semantic-conventions 0.41b0
pika 1.3.2
aio-pika 9.3.0

Steps to reproduce

  • Instrument an app that uses aio-pika version 9.3
  • Try to produce a message

What is the expected behavior?
Message produced

What is the actual behavior?
AttributeError is raised

@sha1n sha1n added the bug Something isn't working label Oct 17, 2023
@evstratbg
Copy link

Same discussion here
#1835

@sha1n
Copy link
Author

sha1n commented Oct 24, 2023

Thanks @evstratbg!
I just want to emphasis the fact that the instrumentation declares the wrong version range of aio-pika. This is why I consider this a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants