Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions instana/instrumentation/asynqp.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

try:
import asynqp
import asyncio

@wrapt.patch_function_wrapper('asynqp.exchange','Exchange.publish')
def publish_with_instana(wrapped, instance, argv, kwargs):
Expand Down Expand Up @@ -41,6 +42,7 @@ def publish_with_instana(wrapped, instance, argv, kwargs):
else:
return rv

@asyncio.coroutine
@wrapt.patch_function_wrapper('asynqp.queue','Queue.get')
def get_with_instana(wrapped, instance, argv, kwargs):
parent_span = async_tracer.active_span
Expand All @@ -63,6 +65,7 @@ def get_with_instana(wrapped, instance, argv, kwargs):

return msg

@asyncio.coroutine
@wrapt.patch_function_wrapper('asynqp.queue','Queue.consume')
def consume_with_instana(wrapped, instance, argv, kwargs):
def callback_generator(original_callback):
Expand Down