0i~ddlZddlZddlmZmZddlmZddlmZddl m Z e rddl m Z ddl m Z mZGdd eZy) N) ContextVarlogger) Integrationadd_global_event_processor) TYPE_CHECKING)Optional)EventHintc6eZdZdZdZedZedZy)DedupeIntegrationdedupec$td|_y)Nz last-seen)r _last_seen)selfs M/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/integrations/dedupe.py__init__zDedupeIntegration.__init__s$[1ctd}y)Nc||Stjjt}||S|j dd}||S|j j d}|#t |tjr|n|}|d}||urtjd|y |j jtj||S#t$r|j j|Y|SwxYw)Nexc_infoz3DedupeIntegration dropped duplicated error event %s) sentry_sdk get_clientget_integrationr getr isinstanceweakrefrefrinfoset TypeError)eventhint integrationr last_seenexcs r processorz/DedupeIntegration.setup_once..processors| $//1AABSTK" xx D1H #..2248I$$.i#EIK91+CC QSVW 0&&**7;;s+;<L 0&&**3/L 0s'.C$C?>C?r)r(s r setup_oncezDedupeIntegration.setup_onces $  $ rctjjt}|y|jj dy)N)rrrr rr!)r%s rreset_last_seenz!DedupeIntegration.reset_last_seen<s;!++-==>OP   ""4(rN)__name__ __module__ __qualname__ identifierr staticmethodr)r+rrr r s5J2""H))rr )rrsentry_sdk.utilsrrsentry_sdk.integrationsrsentry_sdk.scopertypingrr sentry_sdk._typesr r r r1rrr7s,//7 -3) 3)r