Function: getMetrics()
getMetrics():
Promise<string>
Defined in: src/observability/prometheus-registry.ts:306
Retrieves all metrics in Prometheus text format.
Returns
Promise<string>
Promise resolving to metrics string
Remarks
Use this in the /metrics endpoint handler.
Example
app.get('/metrics', async (req, res) => {
res.set('Content-Type', prometheusRegistry.contentType);
res.end(await getMetrics());
});
Since
0.1.0