PrometheusExporter

Exports Prometheus metrics from a CollectorRegistry in the Prometheus text exposition format.

The PrometheusExporter is responsible for producing a textual representation of all registered metrics that can be scraped by Prometheus or exposed through an HTTP endpoint.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard

The CollectorRegistry from which metrics are collected.

Functions

Link copied to clipboard
suspend fun scrape(withTimestamp: Boolean = false): String

Scrapes all current metrics from the registry and encodes them in Prometheus text format.