Uname : Linux premium36.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Soft : LiteSpeed
Ip : 198.54.115.237
Port : 443
~
/
proc
/
self
/
root
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
sentry_sdk
/
ai
/
__pycache__
[ HOME ]
Exec
Submit
File Name : monitoring.cpython-312.pyc
� w�/i� � �� � d dl Z d dlmZ d dlmZ d dlZd dlmZ d dlm Z d dlm Z d dlmZ er,d dlm Z mZmZmZmZmZ ed eed ef ed ee f f �� Z e dd� � Zd� Zd� Zd� Z dd�Zy)� N)�wraps)�SPANDATA)� start_span)�Span)� ContextVar)� TYPE_CHECKING)�Optional�Callable� Awaitable�Any�Union�TypeVar�F.)�bound�ai_pipeline_name)�defaultc �. � t j | � y �N)�_ai_pipeline_name�set)�names �G/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/ai/monitoring.py�set_ai_pipeline_namer s � ����$�� c �* � t j � S r )r �get� r r �get_ai_pipeline_namer s � �� � �"�"r c � � �� � �fd�}|S )Nc � �� � �� �fd�}�� �fd�}t j � � r t � � |� S t � � |� S )Nc �l �� t j � }� j d|rdnd� }t d�|d�� ��5 }|j di � j � D ] \ }}|j ||� � |j di � j � D ] \ }}|j ||� � |r1|j t j |� �| i |��cd d d � S t j �� �| i |��} t j d � |cd d d � S # t $ rc}t j j |t j � j ddd �� � \ } } t j | | �� |d �d }~ww xY w# t j d � w xY w# 1 sw Y y xY w� N�opzai.runzai.pipeline)r r# �sentry_tags�sentry_data� ai_monitoringF)�type�handled)�client_options� mechanism)�hintr �r r �popr �items�set_tag�set_datar �GEN_AI_PIPELINE_NAMEr � Exception� sentry_sdk�utils�event_from_exception� get_client�options� capture_event��args�kwargs� curr_pipeliner# �span�k�v�res�e�eventr+ �description�f�span_kwargss ���r �sync_wrappedz1ai_track.<locals>.decorator.<locals>.sync_wrapped"