o
    ªZh   ã                   @   sp   d dl mZ d dl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	„ d	eƒZd
S )é    )ÚHub)Ú
ContextVar)ÚIntegration©Úadd_global_event_processor)ÚTYPE_CHECKING)ÚOptional)ÚEventÚHintc                   @   s$   e Zd ZdZdd„ Zedd„ ƒZdS )ÚDedupeIntegrationZdedupec                 C   s   t dƒ| _d S )Nz	last-seen)r   Ú
_last_seen)Úself© r   úU/var/www/html/lang_env/lib/python3.10/site-packages/sentry_sdk/integrations/dedupe.pyÚ__init__   s   zDedupeIntegration.__init__c                  C   s   t dd„ ƒ} d S )Nc                 S   sh   |d u r| S t j t¡}|d u r| S | dd ¡}|d u r| S |d }|j d ¡|u r,d S |j |¡ | S )NÚexc_infoé   )r   ÚcurrentZget_integrationr   Úgetr   Úset)ÚeventÚhintZintegrationr   Úexcr   r   r   Ú	processor   s   z/DedupeIntegration.setup_once.<locals>.processorr   )r   r   r   r   Ú
setup_once   s   zDedupeIntegration.setup_onceN)Ú__name__Ú
__module__Ú__qualname__Ú
identifierr   Ústaticmethodr   r   r   r   r   r      s
    r   N)Zsentry_sdk.hubr   Zsentry_sdk.utilsr   Zsentry_sdk.integrationsr   Zsentry_sdk.scoper   Zsentry_sdk._typesr   Útypingr   r	   r
   r   r   r   r   r   Ú<module>   s    