Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
prometheus_metric Struct Reference

Type used to represent a Prometheus metric base. More...

#include <metric.h>

Data Fields

sys_snode_t node
 Slist metric list node.
 
struct prometheus_collectorcollector
 Back pointer to the collector that this metric belongs to.
 
void * metric
 Back pointer to the actual metric (counter, gauge, etc.).
 
enum prometheus_metric_type type
 Type of the Prometheus metric.
 
const char * name
 Name of the Prometheus metric.
 
const char * description
 Description of the Prometheus metric.
 
struct prometheus_label labels [MAX_PROMETHEUS_LABELS_PER_METRIC]
 Labels associated with the Prometheus metric.
 
int num_labels
 Number of labels associated with the Prometheus metric.
 
void * user_data
 User defined data.
 

Detailed Description

Type used to represent a Prometheus metric base.

Every metric has a prometheus_metric structure associated used to control the metric access and usage.

Field Documentation

◆ collector

struct prometheus_collector* prometheus_metric::collector

Back pointer to the collector that this metric belongs to.

◆ description

const char* prometheus_metric::description

Description of the Prometheus metric.

◆ labels

struct prometheus_label prometheus_metric::labels[MAX_PROMETHEUS_LABELS_PER_METRIC]

Labels associated with the Prometheus metric.

◆ metric

void* prometheus_metric::metric

Back pointer to the actual metric (counter, gauge, etc.).

This is just a temporary solution, ultimate goal is to place this generic metrict struct into the actual metric struct.

◆ name

const char* prometheus_metric::name

Name of the Prometheus metric.

◆ node

sys_snode_t prometheus_metric::node

Slist metric list node.

◆ num_labels

int prometheus_metric::num_labels

Number of labels associated with the Prometheus metric.

◆ type

enum prometheus_metric_type prometheus_metric::type

Type of the Prometheus metric.

◆ user_data

void* prometheus_metric::user_data

User defined data.


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