prometheus_names.py.template 1.05 KB
Newer Older
1
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 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"
20
    print(prometheus_names.work_handler.ERRORS_TOTAL)  # "errors_total"
21
22

    # Pattern 2: Import specific classes
23
    from dynamo.prometheus_names import frontend_service, work_handler
24
    print(frontend_service.REQUESTS_TOTAL)  # "requests_total"
25
    print(work_handler.ERRORS_TOTAL)  # "errors_total"
26
27
28
29
30
"""

from __future__ import annotations