📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-06-28 12:41:58
📂
/ (Root)
/
opt
/
hc_python
/
lib
/
python3.12
/
site-packages
/
sentry_sdk
/
integrations
/
pydantic_ai
/
spans
/
__pycache__
📍 /opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/pydantic_ai/spans/__pycache__
🔄 Refresh
✏️
Editing: utils.cpython-312.pyc
Read Only
� |�*j� � � � d Z ddlmZ ddlZddlmZ ddlmZ ddlm Z ddl mZ ddlm Z erdd lmZmZmZ dd lmZmZ dd�Zdd�Z dd �Zy)z6Utility functions for PydanticAI span instrumentation.� )� TYPE_CHECKINGN)�BLOB_DATA_SUBSTITUTE)�DATA_URL_BASE64_REGEX)�get_modality_from_mime_type)�SPANDATA)�StreamedSpan)�Any�Dict�Union)�RequestUsage�RunUsagec �v � t | j � }t j |� }|r dt d�S d|d�S )z�Serialize an ImageUrl content item for span data. For data URLs containing base64-encoded images, the content is redacted. For regular HTTP URLs, the URL string is preserved. �image)�type�content)�str�urlr �matchr )�itemr �data_url_matchs �^/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/pydantic_ai/spans/utils.py�_serialize_image_url_itemr sF � � �d�h�h�-�C�*�0�0��5�N���+� � � ��� � c �R � dt | j � | j t d�S )zFSerialize a BinaryContent item for span data, redacting the blob data.�blob)r �modality� mime_typer )r � media_typer )r s r �_serialize_binary_content_itemr '