Aller au contenu
Français

prometheusHandler

Ce contenu n’est pas encore disponible dans votre langue.

prometheusHandler(registry): (req) => Response

Defined in: src/metrics/PrometheusExporter.ts:87

Build a (req: Request) => Response handler that returns the current registry state in Prometheus text format. Plug into your server:

Bun.serve({ port: 9090, fetch: prometheusHandler(system.metrics), });

MetricsRegistry

(req) => Response