Bases: RayPrometheusMetric
Wraps around ray.util.metrics.Counter to provide same API as prometheus_client.Counter
Source code in vllm/v1/metrics/ray_wrappers.py
  instance-attribute  ¶
   
  Source code in vllm/v1/metrics/ray_wrappers.py
  
  Bases: RayPrometheusMetric
Wraps around ray.util.metrics.Gauge to provide same API as prometheus_client.Gauge
Source code in vllm/v1/metrics/ray_wrappers.py
  instance-attribute  ¶
   
 __init__(
    name: str,
    documentation: str | None = "",
    labelnames: list[str] | None = None,
    multiprocess_mode: str | None = "",
)
Source code in vllm/v1/metrics/ray_wrappers.py
  
    
  Bases: RayPrometheusMetric
Wraps around ray.util.metrics.Histogram to provide same API as prometheus_client.Histogram
Source code in vllm/v1/metrics/ray_wrappers.py
  instance-attribute  ¶
 metric = Histogram(
    name=name,
    description=documentation,
    tag_keys=labelnames_tuple,
    boundaries=boundaries,
)
 
 __init__(
    name: str,
    documentation: str | None = "",
    labelnames: list[str] | None = None,
    buckets: list[float] | None = None,
)
Source code in vllm/v1/metrics/ray_wrappers.py
  
  Bases: KVConnectorPrometheus
RayKVConnectorPrometheus is used by RayMetrics to log Ray metrics. Provides the same metrics as KV connectors but uses Ray's util.metrics library.
Source code in vllm/v1/metrics/ray_wrappers.py
  
 Source code in vllm/v1/metrics/ray_wrappers.py
  
    staticmethod  ¶
  For compatibility with Ray + OpenTelemetry, the metric name must be sanitized. In particular, this replaces disallowed character (e.g., ':') with '_' in the metric name. Allowed characters: a-z, A-Z, 0-9, _
ruff: noqa: E501¶
Ref: https://github.com/open-telemetry/opentelemetry-cpp/blob/main/sdk/src/metrics/instrument_metadata_validator.cc#L22-L23 Ref: https://github.com/ray-project/ray/blob/master/src/ray/stats/metric.cc#L107
Source code in vllm/v1/metrics/ray_wrappers.py
  
  Source code in vllm/v1/metrics/ray_wrappers.py
  
  Bases: PrometheusStatLogger
RayPrometheusStatLogger uses Ray metrics instead.
Source code in vllm/v1/metrics/ray_wrappers.py
  
  Bases: SpecDecodingProm
RaySpecDecodingProm is used by RayMetrics to log to Ray metrics. Provides the same metrics as SpecDecodingProm but uses Ray's util.metrics library.