LogIt++
Header-only, macro-first C++ logging library
Loading...
Searching...
No Matches
PrometheusTextFormatConfig.hpp
Go to the documentation of this file.
1#pragma once
2#ifndef LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOGGERS_PROMETHEUS_PROMETHEUSTEXTFORMATCONFIG_HPP_INCLUDED
3#define LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOGGERS_PROMETHEUS_PROMETHEUSTEXTFORMATCONFIG_HPP_INCLUDED
4
7
8#include <cstdint>
9#include <string>
10#include <vector>
11
12namespace logit {
13
17
21 std::string name;
22 std::string value;
23 };
24
28 std::string name;
29 double value = 0.0;
30 std::vector<PrometheusLabel> labels;
31 int64_t timestamp_ms = 0;
32 };
33
37 std::string name;
38 std::string help;
40 std::vector<PrometheusSample> samples;
41 };
42
46 bool include_help = true;
47 bool include_type = true;
48 bool include_timestamp = false;
49 std::string metric_prefix = "logit_";
50 std::vector<PrometheusLabel> const_labels;
52 std::string logger_label_name = "logger";
54 std::string instance_label_name = "instance";
56 bool include_build_info = true;
57 };
58
59} // namespace logit
60
61#endif // LOGIT_CPP_HEADER_LOGIT_CPP_LOGIT_LOGGERS_PROMETHEUS_PROMETHEUSTEXTFORMATCONFIG_HPP_INCLUDED
The primary namespace for the LogIt++ library.
PrometheusMetricType
Prometheus metric type identifiers.
A single Prometheus label key-value pair.
A group of related samples sharing a name, help, and type.
std::vector< PrometheusSample > samples
Samples in this family.
std::string name
Metric family name.
PrometheusMetricType type
Metric type.
A single metric sample with optional labels and timestamp.
std::string name
Full metric name (including suffixes).
std::vector< PrometheusLabel > labels
Labels for this sample.
int64_t timestamp_ms
Timestamp in ms; 0 = omit.
Configuration for Prometheus text exposition format output.
std::string logger_label_name
Name of logger label.
bool include_build_info
Emit logit_build_info metric.
std::string instance_label_value
Value of instance label.
bool include_instance_label
Add instance label to built-in metrics.
std::string instance_label_name
Name of instance label.
bool include_logger_label
Add logger label to built-in metrics.
std::vector< PrometheusLabel > const_labels
Labels added to every sample.
std::string metric_prefix
Prefix applied to built-in metric names.