File tree Expand file tree Collapse file tree
src/instana/instrumentation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,11 +27,10 @@ async def basic_publish_with_instana(
2727 ) as span :
2828 try :
2929 span .set_attribute ("aioamqp.exchange" , argv [0 ])
30+ return await wrapped (* argv , ** kwargs )
3031 except Exception as exc :
3132 span .record_exception (exc )
3233 logger .debug (f"aioamqp basic_publish_with_instana error: { exc } " )
33- finally :
34- return await wrapped (* argv , ** kwargs )
3534
3635 @wrapt .patch_function_wrapper ("aioamqp.channel" , "Channel.basic_consume" )
3736 async def basic_consume_with_instana (
@@ -63,11 +62,10 @@ async def callback_wrapper(
6362 span .set_attribute ("aioamqp.message" , args [1 ])
6463 span .set_attribute ("aioamqp.exchange_name" , args [2 ].exchange_name )
6564 span .set_attribute ("aioamqp.routing_key" , args [2 ].routing_key )
65+ return await wrapped_callback (* args , ** kwargs )
6666 except Exception as exc :
6767 span .record_exception (exc )
6868 logger .debug (f"aioamqp basic_consume_with_instana error: { exc } " )
69- finally :
70- return await wrapped_callback (* args , ** kwargs )
7169
7270 wrapped_callback = callback_wrapper (callback )
7371 argv = (wrapped_callback ,) + argv [1 :]
You can’t perform that action at this time.
0 commit comments