Skip to content

Commit d412bd7

Browse files
tobmi1GSVarsha
authored andcommitted
Fix aio-pika instrumentation bug causing the consumer callback to not be included in the trace
Signed-off-by: Tobias Michels <[email protected]>
1 parent b48f5fd commit d412bd7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/instana/instrumentation/aio_pika.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,12 @@ async def callback_wrapper(
100100
_extract_span_attributes(
101101
span, connection, "consume", message.routing_key, message.exchange
102102
)
103-
try:
104-
response = await wrapped(*args, **kwargs)
105-
except Exception as exc:
106-
span.record_exception(exc)
107-
else:
108-
return response
103+
try:
104+
response = await wrapped(*args, **kwargs)
105+
except Exception as exc:
106+
span.record_exception(exc)
107+
else:
108+
return response
109109

110110
wrapped_callback = callback_wrapper(callback)
111111
if kwargs.get("callback"):

0 commit comments

Comments
 (0)