Skip to content

Observability Exporters

The observability module formats runtime telemetry into open standard exposition formats for external scraping systems. It serializes internal counters, gauges, and histograms into Prometheus exposition text format (0.0.4). This module allows standard scrapers like Prometheus and OpenTelemetry collectors to consume gateway metrics without custom agents.

SymbolKindSignaturePurpose
formatPrometheusfunctionfunction formatPrometheus(snapshot: Record<string, unknown>): stringFunction export for formatPrometheus.

Serializes internal metrics structures to valid Prometheus line format text with HELP and TYPE metadata lines.

  • src/observability/prometheus-format.ts