Tor  0.4.7.0-alpha-dev
Macros | Functions
prometheus.c File Reference

Metrics format driver for Prometheus data model. More...

#include "orconfig.h"
#include "lib/container/smartlist.h"
#include "lib/log/util_bug.h"
#include "lib/malloc/malloc.h"
#include "lib/string/printf.h"
#include "lib/metrics/prometheus.h"

Go to the source code of this file.

Functions

static const char * format_labels (smartlist_t *labels)
 
void prometheus_format_store_entry (const metrics_store_entry_t *entry, buf_t *data, bool no_comment)
 

Detailed Description

Metrics format driver for Prometheus data model.

Definition in file prometheus.c.

Function Documentation

◆ format_labels()

static const char* format_labels ( smartlist_t labels)
static

Return a static buffer containing all the labels properly formatted for the output as a string.

Subsequent calls to this invalidates the previous result.

Definition at line 25 of file prometheus.c.

Referenced by prometheus_format_store_entry().

◆ prometheus_format_store_entry()

void prometheus_format_store_entry ( const metrics_store_entry_t *  entry,
buf_t *  data,
bool  no_comment 
)

Format the given entry in to the buffer data.

Definition at line 45 of file prometheus.c.

Referenced by metrics_store_get_output().