Library: Prometheus
Package: Core
Header: Poco/Prometheus/TextExporter.h
Description
Exporter implementation for the Prometheus text format.
See https://github.com/prometheus/docs/blob/main/content/docs/instrumenting/exposition_formats.md for the specification of the Prometheus text exposition format.
Inheritance
Direct Base Classes: Exporter
All Base Classes: Exporter
Member Summary
Member Functions: operator =, typeToString, writeHeader, writeSample
Inherited Functions: operator =, writeHeader, writeSample
Constructors
TextExporter
TextExporter() = delete;
TextExporter
explicit TextExporter(
std::ostream & ostr
);
Creates the TextExporter for the given output stream.
TextExporter
TextExporter(
const TextExporter & param477
) = delete;
Destructor
~TextExporter
~TextExporter() = default;
Member Functions
operator =
TextExporter & operator = (
const TextExporter & param478
) = delete;
writeHeader
void writeHeader(
const Metric & metric
) override;
writeSample
void writeSample(
const Metric & metric,
const std::vector < std::string > & labelNames,
const std::vector < std::string > & labelValues,
float value,
const Poco::Timestamp & timestamp = 0
) override;
writeSample
void writeSample(
const Metric & metric,
const std::vector < std::string > & labelNames,
const std::vector < std::string > & labelValues,
double value,
const Poco::Timestamp & timestamp = 0
) override;
writeSample
void writeSample(
const Metric & metric,
const std::vector < std::string > & labelNames,
const std::vector < std::string > & labelValues,
Poco::UInt32 value,
const Poco::Timestamp & timestamp = 0
) override;
writeSample
void writeSample(
const Metric & metric,
const std::vector < std::string > & labelNames,
const std::vector < std::string > & labelValues,
Poco::Int32 value,
const Poco::Timestamp & timestamp = 0
) override;
writeSample
void writeSample(
const Metric & metric,
const std::vector < std::string > & labelNames,
const std::vector < std::string > & labelValues,
Poco::UInt64 value,
const Poco::Timestamp & timestamp = 0
) override;
writeSample
void writeSample(
const Metric & metric,
const std::vector < std::string > & labelNames,
const std::vector < std::string > & labelValues,
Poco::Int64 value,
const Poco::Timestamp & timestamp = 0
) override;
writeSample
void writeSample(
const Metric & metric,
const std::vector < std::string > & labelNames,
const std::vector < std::string > & labelValues,
const std::string & value,
const Poco::Timestamp & timestamp = 0
) override;
typeToString
static const std::string & typeToString(
Metric::Type type
);
Variables
COUNTER
static const std::string COUNTER;
GAUGE
static const std::string GAUGE;
HISTOGRAM
static const std::string HISTOGRAM;
SUMMARY
static const std::string SUMMARY;
UNTYPED
static const std::string UNTYPED;