libprom  @VERSION@
C based libraries to expose metrics in Promtheus exposition format
Typedefs | Functions
prom/include/prom_metric_sample.h File Reference

Functions for interfacting with metric samples directly. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct pms pms_t
 Contains the specific metric and value given the name and label set.

Functions

int pms_add (pms_t *self, double r_value)
 Add the given r_value to the given sample.
int pms_sub (pms_t *self, double r_value)
 Subtract the given r_value from the given sample.
int pms_set (pms_t *self, double r_value)
 Set the given r_value to the given ample.

Detailed Description

Functions for interfacting with metric samples directly.


Typedef Documentation

typedef struct pms pms_t

Contains the specific metric and value given the name and label set.

Note:
All operations MUST be called on a sample derived from a gauge metric. Reference: https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels

Function Documentation

int pms_add ( pms_t self,
double  r_value 
)

Add the given r_value to the given sample.

Parameters:
selfWhere to add the given value.
r_valueValue to add. Must be >= 0.
Returns:
Non-zero integer value upon failure, 0 otherwise.
int pms_set ( pms_t self,
double  r_value 
)

Set the given r_value to the given ample.

Parameters:
selfWhere to set the given value.
r_valueValue to set.
Returns:
Non-zero integer value upon failure, 0 otherwise.
int pms_sub ( pms_t self,
double  r_value 
)

Subtract the given r_value from the given sample.

Parameters:
selfWhere to add the given value.
r_valueValue to substract.
Returns:
Non-zero integer value upon failure, 0 otherwise.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines