31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
"""
|
|
Python constants for Prometheus metric names
|
|
|
|
AUTO-GENERATED from lib/runtime/src/metrics/prometheus_names.rs
|
|
DO NOT EDIT THIS FILE MANUALLY
|
|
|
|
To regenerate this file after modifying lib/runtime/src/metrics/prometheus_names.rs:
|
|
cargo run -p dynamo-codegen --bin gen-python-prometheus-names
|
|
|
|
This module provides pure Python access to Prometheus metric name constants
|
|
without requiring Rust bindings.
|
|
|
|
Usage (both patterns supported):
|
|
# Pattern 1: Import module
|
|
from dynamo import prometheus_names
|
|
print(prometheus_names.frontend_service.REQUESTS_TOTAL) # "requests_total"
|
|
print(prometheus_names.kvstats.ACTIVE_BLOCKS) # "kvstats_active_blocks"
|
|
|
|
# Pattern 2: Import specific classes
|
|
from dynamo.prometheus_names import frontend_service, kvstats
|
|
print(frontend_service.REQUESTS_TOTAL) # "requests_total"
|
|
print(kvstats.ACTIVE_BLOCKS) # "kvstats_active_blocks"
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
|