+
    ~j8                         ^ RI t ^ RIHt ^ RIHtHtHtHtHt ^RI	H
t
  ! R R]4      t ! R R4      t ! R	 R
4      t ! R R4      t]! RR7      tR# )    N)Lock)DictIterableListOptionalProtocol)Metricc                   2   a  ] tR t^t o V 3R lR ltRtV tR# )	Collectorc                0   < V ^8  d   QhRS[ S[,          /#    returnr   r	   )format__classdict__s   "o/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/prometheus_client/registry.py__annotate__Collector.__annotate__	   s      &)     c                    R# )zCollect metrics.N selfs   &r   collectCollector.collect	   s    r   r   N__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell__r   s   @r   r   r      s      r   r   c                   2   a  ] tR t^t o V 3R lR ltRtV tR# )_EmptyCollectorc                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   s   "r   r   _EmptyCollector.__annotate__   s      &) r   c                    . # Nr   r   s   &r   r   _EmptyCollector.collect   s    	r   r   Nr   r$   s   @r   r&   r&      s      r   r&   c                      a  ] tR t^t o RtRV 3R lR lltV 3R lR ltV 3R lR ltR	 tV 3R
 lR lt	V 3R lR lt
V 3R lR ltV 3R lR ltR tRV 3R lR lltRtV tR# )CollectorRegistryzMetric collector registry.

Collectors must have a no-argument method 'collect' that returns a list of
Metric objects. The returned metrics should be consistent with the Prometheus
exposition formats.
Nc                R   < V ^8  d   QhRS[ RS[S[S[S[3,          ,          RS[ /# )r   auto_describetarget_info support_collectors_without_names)boolr   r   str)r   r   s   "r   r   CollectorRegistry.__annotate__   s1     	* 	*d 	*$sTWx.AY 	*37	*r   c                    / V n         / V n        Wn        \        4       V n        / V n        W0n        . V n        V P                  V4       R # r*   )	_collector_to_names_names_to_collectors_auto_describer   _lock_target_info!_support_collectors_without_names_collectors_without_namesset_target_info)r   r/   r0   r1   s   &&&&r   __init__CollectorRegistry.__init__   sE    ?A :<!+V
681Q.:<&[)r   c                $   < V ^8  d   QhRS[ RR/# r   	collectorr   Nr   )r   r   s   "r   r   r4   %   s     A A) A Ar   c                   V P                   ;_uu_ 4        V P                  V4      p\        V P                  4      P	                  V4      pV'       d   \        RP                  V4      4      hV F  pWP                  V&   K  	  W P                  V&   V P                  '       d$   V'       g   V P                  P                  V4       RRR4       R#   + '       g   i     R# ; i)z Add a collector to the registry.z.Duplicated timeseries in CollectorRegistry: {}N)r9   
_get_namessetr7   intersection
ValueErrorr   r6   r;   r<   append)r   rB   names
duplicatesnames   &&   r   registerCollectorRegistry.register%   s    ZZZOOI.ET667DDUKJ DKK"$% % 2;))$/ 27$$Y/555e..55i@ ZZZs   BC,CC"	c                $   < V ^8  d   QhRS[ RR/# rA   rC   )r   r   s   "r   r   r4   4   s     4 4I 4$ 4r   c                    V P                   ;_uu_ 4        V P                  V,           F  pV P                  V K  	  V P                  V RRR4       R#   + '       g   i     R# ; i)z%Remove a collector from the registry.N)r9   r6   r7   )r   rB   rL   s   && r   
unregisterCollectorRegistry.unregister4   sK    ZZZ00;;--d3 <((3 ZZZs   5AA%	c           
        Rp VP                   pV'       g   V P                  '       d   VP                  pV'       g   . # . pRRR.R. R
OR. ROR. RORR	./pV! 4        Fc  pVP	                  VP
                  4       VP                  VP                  . 4       F%  pVP	                  VP
                  V,           4       K'  	  Ke  	  V#   \         d     Li ; i)z@Get names of timeseries the collector produces and clashes with.Ncounter_total_createdsummary	histogramgaugehistograminfo_info)_sum_countrV   )_bucketr\   r]   rV   )r^   _gsum_gcount)describeAttributeErrorr8   r   rI   rL   gettype)r   rB   	desc_funcresulttype_suffixesmetricsuffixs   &&     r   rE   CollectorRegistry._get_names;   s    		!**I T000!))II*-5B=WI
  kFMM&++&'++FKK<fkkF23 = " +  		s   C CCc                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   s   "r   r   r4   X   s     + +&) +r   c              #  X  "   RpRpV P                   ;_uu_ 4        \        P                  ! V P                  4      pV P                  '       d   V P	                  4       pRRR4       V'       d   Vx  V F  pVP                  4        Rj  xL
  K  	  R#   + '       g   i     L?; i L5i)z3Yields metrics from the collectors in the registry.N)r9   copyr6   r:   _target_info_metricr   )r   
collectorstirB   s   &   r   r   CollectorRegistry.collectX   s~     
ZZZ4#;#;<J   --/  H#I ((*** $ Z +s/   B*ABB*.B*
B(
B*B%	 	B*c                4   < V ^8  d   QhRS[ S[,          RR/# )r   rJ   r   RestrictedRegistry)r   r3   )r   r   s   "r   r   r4   e   s      / /# /;O /r   c                .    \        V4      p\        W4      # )zReturns object that only collects some metrics.

Returns an object which upon collect() will return
only samples with the given names.

Intended usage is:
    generate_latest(REGISTRY.restricted_registry(['a_timeseries']), escaping)

Experimental.)rF   rs   )r   rJ   s   &&r   restricted_registry%CollectorRegistry.restricted_registrye   s     E
!%..r   c                J   < V ^8  d   QhRS[ S[S[S[3,          ,          RR/# )r   labelsr   Nr   r   r3   )r   r   s   "r   r   r4   r   s(     ' 'htCH~&> '4 'r   c                l   V P                   ;_uu_ 4        V'       dG   V P                  '       g   R V P                  9   d   \        R4      h\	        4       V P                  R &   M.V P                  '       d   V P                  P                  R R4       Wn        RRR4       R#   + '       g   i     R# ; i)r0   z7CollectorRegistry already contains a target_info metricN)r9   r:   r7   rH   r&   pop)r   rx   s   &&r   r=   !CollectorRegistry.set_target_infor   sz    ZZZ(((]d>W>W-W$%^__;J;L))-8"""))--mTB & ZZZs   B"AB"6"B""B3	c                F   < V ^8  d   QhRS[ S[S[S[3,          ,          /# r   ry   )r   r   s   "r   r   r4   |   s!     % %$sCx.!9 %r   c                    V P                   ;_uu_ 4        V P                  uuR R R 4       #   + '       g   i     R # ; ir*   )r9   r:   r   s   &r   get_target_info!CollectorRegistry.get_target_info|   s     ZZZ$$ ZZZs   ,=	c                Z    \        R RR4      pVP                  RV P                  ^4       V# )targetzTarget metadatarZ   r0   )r	   
add_sampler:   )r   ms   & r   rn   %CollectorRegistry._target_info_metric   s,    8.7	]D$5$5q9r   c                b   < V ^8  d   QhRS[ RS[S[S[ S[ 3,          ,          RS[S[,          /# )r   rL   rx   r   )r3   r   r   float)r   r   s   "r   r   r4      s6      S (4S>2J V^_dVe r   c                    Vf   / pV P                  4        FJ  pVP                   F7  pVP                  V8X  g   K  VP                  V8X  g   K)  VP                  u u # 	  KL  	  R# )znReturns the sample value, or None if not found.

This is inefficient, and intended only for use in unittests.
N)r   samplesrL   rx   value)r   rL   rx   rh   ss   &&&  r   get_sample_value"CollectorRegistry.get_sample_value   sP    
 >FllnF^^66T>ahh&&877N $ % r   )r8   r6   r<   r9   r7   r;   r:   )FNFr*   )r   r   r    r!   __doc__r>   rM   rQ   rE   r   ru   r=   r   rn   r   r"   r#   r$   s   @r   r-   r-      sk     	* 	*A A4 4:+ +/ /' '% %
  r   r-   c                   D   a  ] tR t^t o V 3R lR ltV 3R lR ltRtV tR# )rs   c                6   < V ^8  d   QhRS[ S[,          RS[/# )r   rJ   registry)r   r3   r-   )r   r   s   "r   r   RestrictedRegistry.__annotate__   s      " "hsm "7H "r   c                2    \        V4      V n        W n        R # r*   )rF   	_name_set	_registry)r   rJ   r   s   &&&r   r>   RestrictedRegistry.__init__   s    U!r   c                0   < V ^8  d   QhRS[ S[,          /# r   r   )r   r   s   "r   r   r      s      &) r   c              #    "   \        V P                  P                  4      pR pV P                  P                  ;_uu_ 4        RV P                  9   d7   V P                  P
                  '       d   V P                  P                  4       pV P                   FT  pVR8w  g   K  W0P                  P                  9   g   K(  VP                  V P                  P                  V,          4       KV  	  R R R 4       V'       d   Vx  V FC  pVP                  4        F,  pVP                  V P                  4      pV'       g   K(  Vx  K.  	  KE  	  R #   + '       g   i     Lg; i5i)Nr0   )rF   r   r<   r9   r   r:   rn   r7   addr   _restricted_metric)r   ro   target_info_metricrL   rB   rh   r   s   &      r   r   RestrictedRegistry.collect   s     AAB
!^^!!!.4>>3N3N3N%)^^%G%G%I"=(T^^5X5X-XNN4>>#F#Ft#LM ' " $$#I#++---dnn=1G . $ "!s<   A E -E0-E"E>0E.E ><E ?E E	E )r   r   N)r   r   r    r!   r>   r   r"   r#   r$   s   @r   rs   rs      s     " " r   rs   T)r/   )rm   	threadingr   typingr   r   r   r   r   metrics_corer	   r   r&   r-   rs   REGISTRYr   r   r   <module>r      sM      ; ;   
 
~ ~B . 40r   