Poco::Prometheus

class TextExporter

File Information

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 & param599
) = delete;

Destructor

~TextExporter virtual

~TextExporter() = default;

Member Functions

operator =

TextExporter & operator = (
    const TextExporter & param600
) = delete;

writeHeader virtual

void writeHeader(
    const Metric & metric
) override;

writeSample virtual

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 virtual

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 virtual

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 virtual

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 virtual

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 virtual

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 virtual

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 protected static

static const std::string & typeToString(
    Metric::Type type
);

Variables

COUNTER protected static

static const std::string COUNTER;

GAUGE protected static

static const std::string GAUGE;

HISTOGRAM protected static

static const std::string HISTOGRAM;

SUMMARY protected static

static const std::string SUMMARY;

UNTYPED protected static

static const std::string UNTYPED;

Securely control IoT edge devices from anywhere   Connect a Device