o
    i                  
   @  s   d dl mZ d dlZd dlmZ ddlmZ ddlm	Z	 zddl
mZ W dZdS  eyE Z zeZedd
dZW Y dZ[dZdS dZ[ww )    )annotationsN)contextmanager   )SpanTreeRecordingError)SpanTree)context_subtreereturn2typing.Iterator[SpanTree | SpanTreeRecordingError]c                  c  s    t d} t| _| V  dS )zSee the docstring for `pydantic_evals.otel._context_in_memory_span_exporter.context_subtree` for more detail.

        This is the fallback implementation that is used if you don't have opentelemetry installed.
        a<  To make use of the `span_tree` in an evaluator, you must install `logfire` or `opentelemetry-sdk`,  configure appropriate instrumentations, and set a tracer provider (e.g. by calling `logfire.configure()`). For more information, refer to the documentation at https://ai.pydantic.dev/evals/#opentelemetry-integration.N)r   _IMPORT_ERROR__context__)exc r   j/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/pydantic_evals/otel/_context_subtree.pyr      s   
r   )r   r	   )
__future__r   _annotationstyping
contextlibr   _errorsr   	span_treer    _context_in_memory_span_exporterr   ImportErrorer
   __all__r   r   r   r   <module>   s    