
    .h{                         d dl Z d dlmZmZ erddlmZ ddlmZ  G d de j                  Z	 G d d	e j                  Z
dS )
    N)TYPE_CHECKINGAny   )Span)Tracec                       e Zd ZdZej        dd            Zej        dd            Zej        dd
            Zej        dd            Z	ej        dd            Z
ej        dd            ZdS )TracingProcessorzInterface for processing spans.tracer   returnNc                     dS )zbCalled when a trace is started.

        Args:
            trace: The trace that started.
        N selfr
   s     _/var/www/FlaskApp/flask-venv/lib/python3.11/site-packages/agents/tracing/processor_interface.pyon_trace_startzTracingProcessor.on_trace_start   	     	    c                     dS )zcCalled when a trace is finished.

        Args:
            trace: The trace that started.
        Nr   r   s     r   on_trace_endzTracingProcessor.on_trace_end   r   r   span	Span[Any]c                     dS )z_Called when a span is started.

        Args:
            span: The span that started.
        Nr   r   r   s     r   on_span_startzTracingProcessor.on_span_start   r   r   c                     dS )zCalled when a span is finished. Should not block or raise exceptions.

        Args:
            span: The span that finished.
        Nr   r   s     r   on_span_endzTracingProcessor.on_span_end'   r   r   c                     dS )z"Called when the application stops.Nr   r   s    r   shutdownzTracingProcessor.shutdown0   	     	r   c                     dS )z5Forces an immediate flush of all queued spans/traces.Nr   r   s    r   force_flushzTracingProcessor.force_flush5   r    r   )r
   r   r   N)r   r   r   N)r   N)__name__
__module____qualname____doc__abcabstractmethodr   r   r   r   r   r"   r   r   r   r	   r	   	   s        ))    	    	    	    	    	     r   r	   c                   H    e Zd ZdZej        ded         ddfd            ZdS )TracingExporterzPExports traces and spans. For example, could log them or send them to a backend.itemszTrace | Span[Any]r   Nc                     dS )zcExports a list of traces and spans.

        Args:
            items: The items to export.
        Nr   )r   r+   s     r   exportzTracingExporter.export>   r   r   )r#   r$   r%   r&   r'   r(   listr-   r   r   r   r*   r*   ;   sP        ZZD!45 $      r   r*   )r'   typingr   r   spansr   tracesr   ABCr	   r*   r   r   r   <module>r3      s    



 % % % % % % % % / / / / /sw / / /d
 
 
 
 
cg 
 
 
 
 
r   