1ji. ~ d dl Z ddlmZ dZ e j d Z e j d Z e j d Z G d d e Z G d de Z e Z G d d e Z G d de Z G d de Z G d de Z G d de Z G d de Z G d de ZdS ) N )Sample)countergaugesummary histogramgaugehistogramunknowninfostatesetz^[a-zA-Z_:][a-zA-Z0-9_:]*$z^[a-zA-Z_][a-zA-Z0-9_]*$z^__.*$c . e Zd ZdZddZd dZd Zd ZdS ) MetriczA single metric family and its samples. This is intended only for internal use by the instrumentation client. Custom collectors should use GaugeMetricFamily, CounterMetricFamily and SummaryMetricFamily instead. c . |r | d|z s|d|z z }t | st d|z || _ || _ || _ |dk rd}|t vrt d|z || _ g | _ d S )N_zInvalid metric name: untypedr zInvalid metric type: ) endswithMETRIC_NAME_REmatch ValueErrorname documentationunitMETRIC_TYPEStypesamples)selfr r typr s p/builddir/build/BUILD/cloudlinux-venv-1.0.11/venv/lib/python3.11/site-packages/prometheus_client/metrics_core.py__init__zMetric.__init__ s cDj11 C$JD##D)) =4t;<<< * )Cl""4s:;;; Nc \ | j t ||||| dS )z?Add a sample to the metric. Internal-only, do not use.N)r appendr )r r labelsvalue timestampexemplars r add_samplezMetric.add_sample&