Skip to content

Commit

Permalink
fix aio pika
Browse files Browse the repository at this point in the history
  • Loading branch information
nozik committed Jun 8, 2023
1 parent a679754 commit 3939d17
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ def set_destination(self, destination: str):
self._attributes[SpanAttributes.MESSAGING_DESTINATION] = destination

def set_channel(self, channel: AbstractChannel):
if channel.__class__.__name__ == "RobustChannel":
# Change introduced in v9 of aio-pika
channel = channel.channel

connection = channel.connection
if getattr(connection, "connection", None):
# aio_rmq 7
Expand Down

0 comments on commit 3939d17

Please sign in to comment.