o
    ©i  ã                   @  sz   d dl mZ d dlmZmZ d dlmZmZ d dlm	Z	 d dl
mZ zd dlmZ W n ey5   edƒ‚w ddd„ZdS )é    )Úannotations)ÚAnyÚCallable)ÚHttpRequestÚHttpResponse)ÚSpan)Úmaybe_capture_server_headers)ÚDjangoInstrumentorz—`logfire.instrument_django()` requires the `opentelemetry-instrumentation-django` package.
You can install this with:
    pip install 'logfire[django]'Úcapture_headersÚboolÚis_sql_commentor_enabledúbool | NoneÚexcluded_urlsú
str | NoneÚrequest_hookú*Callable[[Span, HttpRequest], None] | NoneÚresponse_hookú8Callable[[Span, HttpRequest, HttpResponse], None] | NoneÚkwargsr   ÚreturnÚNonec                 K  s(   t | ƒ tƒ jd||||dœ|¤Ž dS )zžInstrument the `django` module so that spans are automatically created for each web request.

    See the `Logfire.instrument_django` method for details.
    )r   r   r   r   N© )r   r	   Ú
instrument)r
   r   r   r   r   r   r   r   úk/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/logfire/_internal/integrations/django.pyÚinstrument_django   s   ü
ûr   N)r
   r   r   r   r   r   r   r   r   r   r   r   r   r   )Ú
__future__r   Útypingr   r   Údjango.httpr   r   Úopentelemetry.tracer   Úlogfire._internal.utilsr   Ú$opentelemetry.instrumentation.djangor	   ÚImportErrorÚRuntimeErrorr   r   r   r   r   Ú<module>   s    ÿÿ