Class PrometheusWriter

Inheritance Relationships

Base Type

Class Documentation

class PrometheusWriter : public Writer

A class to write metrics to Prometheus.

Public Functions

explicit PrometheusWriter(int port)

Constructor.

Parameters:

port -- The port number to expose Prometheus metrics.

virtual void write_message(const nlohmann::json &message) override

Writes a JSON message to Prometheus.

Parameters:

message -- The JSON message containing metrics.