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

The decoration a Registry applies to every metric created through it: a name prefix, default constant labels, and default display metadata. More...

#include <registry.hpp>

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

Public Attributes

std::string prefix {}
 Prepended to every metric name (e.g. "svc_").
 
Labels const_labels {}
 Merged into every metric's constant labels; a metric's own labels win on a name collision.
 
comms::DisplayInfo display {}
 Default display metadata; per-metric display fields override these.
 

Detailed Description

The decoration a Registry applies to every metric created through it: a name prefix, default constant labels, and default display metadata.

Supplied to Registry::create(adapter, config) and live-reconfigurable afterward through the registry's setters, exactly like a Scope. A registry created without one starts with an empty decoration (its metrics report scoped == false until a setter installs a prefix or labels).

Member Data Documentation

◆ const_labels

Labels prom::RegistryConfig::const_labels {}

Merged into every metric's constant labels; a metric's own labels win on a name collision.

◆ display

comms::DisplayInfo prom::RegistryConfig::display {}

Default display metadata; per-metric display fields override these.

◆ prefix

std::string prom::RegistryConfig::prefix {}

Prepended to every metric name (e.g. "svc_").


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