관리-도구
편집 파일: integration.cpython-38.pyc
U �Mg� � @ s� d Z ddlmZmZ ddlmZ ddlmZ ddlm Z z(ddl mZ ddlm Z ddlmZ W n ek r| ed ��Y nX zdd lmZ W n ek r� dZY nX edd iiZG dd� de�Zdd� Zdd� ZdS )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)�TracerProviderzopentelemetry not installed)�DjangoInstrumentorNZis_sql_commentor_enabledTc @ s e Zd ZdZedd� �ZdS )�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 �_/opt/hc_python/lib/python3.8/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�| � tt� � d S �N)r Zadd_span_processorr r Zset_tracer_providerr r )�providerr r r r / s r c C s$ t �� D ]\} }| � jf |� qd S r )�CONFIGURABLE_INSTRUMENTATIONS�itemsZ instrument)Zinstrumentor�kwargsr r r �_setup_instrumentors7 s r )�__doc__Zsentry_sdk.integrationsr r Z0sentry_sdk.integrations.opentelemetry.propagatorr Z4sentry_sdk.integrations.opentelemetry.span_processorr Zsentry_sdk.utilsr r r Zopentelemetry.propagater Zopentelemetry.sdk.tracer �ImportErrorZ$opentelemetry.instrumentation.djangor r r r r r r r r �<module> s( �