22 #ifndef PROM_REGISTRY_H 23 #define PROM_REGISTRY_H struct prom_collector prom_collector_t
A prometheus collector calls collect to prepare metrics and return them to the registry to which it i...
Definition: prom_collector.h:32
const char * prom_collector_registry_bridge(prom_collector_registry_t *self)
Returns a string in the default metric exposition format.
int prom_collector_registry_destroy(prom_collector_registry_t *self)
Destroy a collector registry.
struct prom_metric prom_metric_t
A prometheus metric.
Definition: prom_metric.h:34
int prom_collector_registry_default_init(void)
Initializes the default collector registry and enables metric collection on the executing process...
A Prometheus collector returns a collection of metrics.
prom_collector_registry_t * prom_collector_registry_new(const char *name)
Constructs a prom_collector_registry_t*.
int prom_collector_registry_enable_process_metrics(prom_collector_registry_t *self)
Enable process metrics on the given collector registry.
struct prom_collector_registry prom_collector_registry_t
A prom_registry_t is responsible for registering metrics and briding them to the string exposition fo...
Definition: prom_collector_registry.h:31
prom_metric_t * prom_collector_registry_must_register_metric(prom_metric_t *metric)
Registers a metric with the default collector on PROM_DEFAULT_COLLECTOR_REGISTRY. ...
prom_collector_registry_t * PROM_COLLECTOR_REGISTRY_DEFAULT
Initialize the default registry by calling prom_collector_registry_init within your program...
Functions for retrieving metric samples from metrics given an ordered set of labels.
int prom_collector_registry_register_metric(prom_metric_t *metric)
Registers a metric with the default collector on PROM_DEFAULT_COLLECTOR_REGISTRY. ...
int prom_collector_registry_validate_metric_name(prom_collector_registry_t *self, const char *metric_name)
Validates that the given metric name complies with the specification:
int prom_collector_registry_register_collector(prom_collector_registry_t *self, prom_collector_t *collector)
Register a collector with the given registry.