o
    i/                     @   s0   d Z ddlmZ ddlmZ eeZdd ZdS )zT
async tracing utils

Note that this module should only be imported in Python 3.5+.
    )Pin)
get_loggerc                    s    fdd}|S )aK  Async version of trace_utils.with_traced_module.
    Usage::

        @with_traced_module
        async def my_traced_wrapper(django, pin, func, instance, args, kwargs):
            # Do tracing stuff
            pass

        def patch():
            import django
            wrap(django.somefunc, my_traced_wrapper(django))
    c                    s    fdd}|S )Nc                    sj   t |}|r| s| |i |I d H S |s)td|  | |i |I d H S  || |||I d H S )Nz"Pin not found for traced method %r)r   _findenabledlogdebug)wrappedinstanceargskwargspin)funcmod ^/home/ubuntu/.local/lib/python3.10/site-packages/ddtrace/contrib/internal/trace_utils_async.pywrapper   s   z5with_traced_module.<locals>.with_mod.<locals>.wrapperr   )r   r   r   )r   r   with_mod   s   	z$with_traced_module.<locals>.with_modr   )r   r   r   r   r   with_traced_module   s   r   N)__doc__ddtrace._trace.pinr   ddtrace.internal.loggerr   __name__r   r   r   r   r   r   <module>   s
    