prom 0.1.0
Client-independent C++23 Prometheus/OpenMetrics metric abstraction
Loading...
Searching...
No Matches
Public Attributes | List of all members
prom::MetricInfo Struct Reference

A read-only snapshot describing one registered metric, returned by the enumeration APIs (Registry::metrics, Scope::metrics). More...

#include <registry.hpp>

Collaboration diagram for prom::MetricInfo:
Collaboration graph
[legend]

Public Attributes

MetricType type {}
 
std::string name
 
std::string help
 
Labels const_labels
 
Unit unit
 
bool scoped = false
 

Detailed Description

A read-only snapshot describing one registered metric, returned by the enumeration APIs (Registry::metrics, Scope::metrics).

For a scoped metric the name and const_labels are the effective (scope-decorated) values computed live. The unit's string views reference storage owned by the live metric, so a MetricInfo is valid only while that metric is alive.

Member Data Documentation

◆ const_labels

Labels prom::MetricInfo::const_labels

◆ help

std::string prom::MetricInfo::help

◆ name

std::string prom::MetricInfo::name

◆ scoped

bool prom::MetricInfo::scoped = false

◆ type

MetricType prom::MetricInfo::type {}

◆ unit

Unit prom::MetricInfo::unit

The documentation for this struct was generated from the following file: