writeMetrics
Writes the metrics collected from the provided collectors into the Prometheus text exposition format.
This format is compatible with Prometheus' /metrics HTTP scraping interface.
Example output:
# TYPE http_requests_total counter
# HELP http_requests_total Total number of HTTP requests
http_requests_total{method="GET", status="200"} 1243Content copied to clipboard
Return
A string in Prometheus-compatible text format.
Parameters
collectors
The list of Collector instances to serialize.
withTimestamp
If true, appends the collection timestamp to each sample line.