o
    ‰Öhÿ  ã                   @   sÐ   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 zddl
mZ ddlmZ ddlmZ W n ey;   ed	ƒ‚w zdd
lmZ W n eyO   dZY nw eddiiZG dd„ deƒZdd„ Zdd„ ZdS )zÈ
IMPORTANT: The contents of this file are part of a proof of concept and as such
are experimental and not suitable for production use. They may be changed or
removed at any time without prior notice.
é    )ÚDidNotEnableÚIntegration)ÚSentryPropagator)ÚSentrySpanProcessor)Úlogger)Útrace)Úset_global_textmap)ÚTracerProviderzopentelemetry not installed)ÚDjangoInstrumentorNÚis_sql_commentor_enabledTc                   @   s   e Zd ZdZedd„ ƒZdS )ÚOpenTelemetryIntegrationÚopentelemetryc                   C   s   t  d¡ tƒ  t  d¡ d S )NzT[OTel] Initializing highly experimental OpenTelemetry support. Use at your own risk.z4[OTel] Finished setting up OpenTelemetry integration)r   ÚwarningÚ_setup_sentry_tracingÚdebug© r   r   ús/var/www/html/pro-man-master/venv/lib/python3.10/site-packages/sentry_sdk/integrations/opentelemetry/integration.pyÚ
setup_once!   s
   ÿz#OpenTelemetryIntegration.setup_onceN)Ú__name__Ú
__module__Ú__qualname__Ú
identifierÚstaticmethodr   r   r   r   r   r      s    r   c                  C   s*   t ƒ } |  tƒ ¡ t | ¡ ttƒ ƒ d S )N)r	   Úadd_span_processorr   r   Úset_tracer_providerr   r   )Úproviderr   r   r   r   /   s   
r   c                  C   s(   t  ¡ D ]\} }| ƒ jdi |¤Ž qd S )Nr   )ÚCONFIGURABLE_INSTRUMENTATIONSÚitemsÚ
instrument)ÚinstrumentorÚkwargsr   r   r   Ú_setup_instrumentors7   s   ÿr!   )Ú__doc__Úsentry_sdk.integrationsr   r   Ú0sentry_sdk.integrations.opentelemetry.propagatorr   Ú4sentry_sdk.integrations.opentelemetry.span_processorr   Úsentry_sdk.utilsr   r   r   Úopentelemetry.propagater   Úopentelemetry.sdk.tracer	   ÚImportErrorÚ$opentelemetry.instrumentation.djangor
   r   r   r   r!   r   r   r   r   Ú<module>   s,    ÿÿÿ