o
    i                     @   sl   d dl mZ d dlmZ d dlZd dlmZ d dlmZ d dl	m
Z
 G dd deZeG d	d
 d
eZdS )    )	dataclass)LogDataN)WrapperLogProcessor)BaseScrubber)is_instrumentation_suppressedc                       s&   e Zd ZdZdef fddZ  ZS )/CheckSuppressInstrumentationLogProcessorWrapperzChecks if instrumentation is suppressed, then suppresses instrumentation itself.

    Placed at the root of the tree of processors.
    log_datac                    sB   t  rd S t  t |W  d    S 1 sw   Y  d S N)r   logfiresuppress_instrumentationsuperon_emitselfr   	__class__ f/var/www/html/karishye-ai-python/venv/lib/python3.10/site-packages/logfire/_internal/exporters/logs.pyr      s
   

$z7CheckSuppressInstrumentationLogProcessorWrapper.on_emit)__name__
__module____qualname____doc__r   r   __classcell__r   r   r   r   r      s    r   c                       s,   e Zd ZU eed< def fddZ  ZS )MainLogProcessorWrapperscrubberr   c                    s   | j |j|_t |S r	   )r   	scrub_log
log_recordr   r   r   r   r   r   r      s   zMainLogProcessorWrapper.on_emit)r   r   r   r   __annotations__r   r   r   r   r   r   r   r      s   
 r   )dataclassesr   opentelemetry.sdk._logsr   r
   #logfire._internal.exporters.wrapperr   logfire._internal.scrubbingr   logfire._internal.utilsr   r   r   r   r   r   r   <module>   s    