# Poco::Prometheus

# class TextExporter

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

## Destructor

### ~TextExporter

~TextExporter() = default;

## Member Functions

### operator =

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

### writeHeader

void writeHeader(
const Metric & metric
) override;

See also: Poco::Prometheus::Exporter::writeHeader()

### 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;

See also: Poco::Prometheus::Exporter::writeSample()

### 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;

See also: Poco::Prometheus::Exporter::writeSample()

### 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;

See also: Poco::Prometheus::Exporter::writeSample()

### 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;

See also: Poco::Prometheus::Exporter::writeSample()

### 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;

See also: Poco::Prometheus::Exporter::writeSample()

### 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;

See also: Poco::Prometheus::Exporter::writeSample()

### 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;

See also: Poco::Prometheus::Exporter::writeSample()

### 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;