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

The complete, backend-agnostic description of a metric family handed to Adapter::register_metric. More...

#include <adapter.hpp>

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

Public Attributes

MetricType type {}
 Which kind of metric this is.
 
std::string_view name {}
 Fully-qualified metric name.
 
std::string_view help {}
 One-line description.
 
Unit unit {}
 Declared unit (may be empty).
 
Labels const_labels {}
 Labels fixed for the whole family.
 
comms::DisplayInfo display {}
 Optional UI metadata.
 
std::span< const double > buckets {}
 Histogram bucket bounds (else empty).
 
std::span< const double > quantiles {}
 Summary quantiles (else empty).
 
std::span< const std::string > states {}
 State-set member names (else empty).
 

Detailed Description

The complete, backend-agnostic description of a metric family handed to Adapter::register_metric.

The string_view/span members reference storage owned by the caller (the metric's shared state) and are guaranteed valid only for the duration of the register_metric call — backends must copy anything they need to keep.

Member Data Documentation

◆ buckets

std::span<const double> prom::MetricMeta::buckets {}

Histogram bucket bounds (else empty).

◆ const_labels

Labels prom::MetricMeta::const_labels {}

Labels fixed for the whole family.

◆ display

comms::DisplayInfo prom::MetricMeta::display {}

Optional UI metadata.

◆ help

std::string_view prom::MetricMeta::help {}

One-line description.

◆ name

std::string_view prom::MetricMeta::name {}

Fully-qualified metric name.

◆ quantiles

std::span<const double> prom::MetricMeta::quantiles {}

Summary quantiles (else empty).

◆ states

std::span<const std::string> prom::MetricMeta::states {}

State-set member names (else empty).

◆ type

MetricType prom::MetricMeta::type {}

Which kind of metric this is.

◆ unit

Unit prom::MetricMeta::unit {}

Declared unit (may be empty).


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