
    fi                         d dl Z d dlZd dlmZmZ d dlmZ d dlmZ d dl	m
Z
 e
rd dl	mZ d dlmZmZ  G d d	e          ZdS )
    N)
ContextVarlogger)Integrationadd_global_event_processor)TYPE_CHECKING)Optional)EventHintc                   D    e Zd ZdZd Zed             Zed             ZdS )DedupeIntegrationdedupec                 .    t          d          | _        d S )Nz	last-seen)r   
_last_seen)selfs    n/var/www/html/Pagina-Ingenieria-Requisitos/venv/lib/python3.11/site-packages/sentry_sdk/integrations/dedupe.py__init__zDedupeIntegration.__init__   s    $[11    c                  &    t           d             } d S )Nc                    || S t          j                                        t                    }|| S |                    dd           }|| S |j                            d           }|&t          |t          j                  r
 |            n|}|d         }||u rt          j
        d|           d S 	 |j                            t          j        |                     n*# t          $ r |j                            |           Y nw xY w| S )Nexc_info   z3DedupeIntegration dropped duplicated error event %s)
sentry_sdk
get_clientget_integrationr   getr   
isinstanceweakrefrefr   infoset	TypeError)eventhintintegrationr   	last_seenexcs         r   	processorz/DedupeIntegration.setup_once.<locals>.processor   s,    |$/11AABSTTK"xx
D11H#.22488I$ $.i#E#ETIIKKK9  1+CCQSVWWWt0&**7;s+;+;<<<< 0 0 0&**3/////0 Ls   4,C! !$DDr   )r(   s    r   
setup_oncezDedupeIntegration.setup_once   s(     
$	 	 
$	#	 	 	r   c                      t          j                                        t                    } | d S | j                            d            d S )N)r   r   r   r   r   r!   )r%   s    r   reset_last_seenz!DedupeIntegration.reset_last_seen<   sI     !+--==>OPPF""4(((((r   N)__name__
__module____qualname__
identifierr   staticmethodr)   r+    r   r   r   r      s_        J2 2 2 " " \"H ) ) \) ) )r   r   )r   r   sentry_sdk.utilsr   r   sentry_sdk.integrationsr   sentry_sdk.scoper   typingr   r	   sentry_sdk._typesr
   r   r   r1   r   r   <module>r7      s         / / / / / / / / / / / / / / 7 7 7 7 7 7             .--------3) 3) 3) 3) 3) 3) 3) 3) 3) 3)r   