17 #ifndef PROM_COLLECTOR_H 18 #define PROM_COLLECTOR_H 100 #endif // PROM_COLLECTOR_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
struct prom_metric prom_metric_t
A prometheus metric.
Definition: prom_metric.h:34
int prom_collector_add_metric(prom_collector_t *self, prom_metric_t *metric)
Add a metric to a collector.
int prom_collector_destroy(prom_collector_t *self)
Destroy a collector.
int prom_collector_set_collect_fn(prom_collector_t *self, prom_collect_fn *fn)
The collect function is responsible for doing any work involving a set of metrics and then returning ...
prom_collector_t * prom_collector_new(const char *name)
Create a collector.
void prom_collector_free_generic(void *gen)
Frees a collector passed as a void pointer.
prom_collector_t * prom_collector_process_new(const char *limits_path, const char *stat_path)
Construct a prom_collector_t* which includes the default process metrics.
Functions for retrieving metric samples from metrics given an ordered set of labels.
int prom_collector_destroy_generic(void *gen)
Destroys a collector passed as a void pointer.
prom_map_t * prom_collect_fn(prom_collector_t *self)
The function responsible for preparing metric data and returning metrics for a given collector...
Definition: prom_collector.h:43