Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
collector.h File Reference

Prometheus collector APIs. More...

#include <zephyr/kernel.h>
#include <zephyr/sys/iterable_sections.h>
#include <zephyr/net/prometheus/metric.h>
#include <stddef.h>

Go to the source code of this file.

Data Structures

struct  prometheus_collector
 Prometheus collector definition. More...
 

Macros

#define PROMETHEUS_COLLECTOR_DEFINE(_name, ...)
 Prometheus Collector definition.
 

Typedefs

typedef int(* prometheus_scrape_cb_t) (struct prometheus_collector *collector, struct prometheus_metric *metric, void *user_data)
 Callback used to scrape a collector for a specific metric.
 

Functions

int prometheus_collector_register_metric (struct prometheus_collector *collector, struct prometheus_metric *metric)
 Register a metric with a Prometheus collector.
 
const void * prometheus_collector_get_metric (struct prometheus_collector *collector, const char *name)
 Get a metric from a Prometheus collector.
 
int prometheus_collector_walk_metrics (struct prometheus_collector_walk_context *ctx, uint8_t *buffer, size_t buffer_size)
 Walk through all metrics in a Prometheus collector and format them into a buffer.
 
static int prometheus_collector_walk_init (struct prometheus_collector_walk_context *ctx, struct prometheus_collector *collector)
 Initialize the walker context to walk through all metrics.
 

Detailed Description

Prometheus collector APIs.