You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/07/20 12:10:48 UTC
[skywalking-python] branch master updated: fix again for BlockingChannel.basic_get() (#226)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-python.git
The following commit(s) were added to refs/heads/master by this push:
new 8ce1f68 fix again for BlockingChannel.basic_get() (#226)
8ce1f68 is described below
commit 8ce1f689ff4ba44e298b614bce72d4edc92c7370
Author: Tomasz Pytel <to...@gmail.com>
AuthorDate: Wed Jul 20 09:10:43 2022 -0300
fix again for BlockingChannel.basic_get() (#226)
---
skywalking/plugins/sw_rabbitmq.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/skywalking/plugins/sw_rabbitmq.py b/skywalking/plugins/sw_rabbitmq.py
index 6ec9b08..055dd61 100644
--- a/skywalking/plugins/sw_rabbitmq.py
+++ b/skywalking/plugins/sw_rabbitmq.py
@@ -128,8 +128,9 @@ def _sw_callback_func(callback):
def _sw_callback(this, method, properties, body):
peer = getattr(method, '_sw_peer', None)
- if peer is None: # this is not a callback caused by _on_deliver(), some other object like GetOk
- return callback(this, method, properties, body)
+ if peer is None:
+ params = getattr(getattr(this.connection, '_impl', None), 'params', None)
+ peer = '<unavailable>' if params is None else f'{params.host}:{params.port}'
context = get_context()
exchange = method.exchange