Skip to main content

Module prometheus

Module prometheus 

Source
Expand description

Prometheus exporter: an HTTP /metrics endpoint whose metrics the model invents.

A real Prometheus server (or promtool, or anything else that reads the exposition format) scrapes GET /metrics; NetGet raises one prometheus_scrape event, and the model answers with send_metrics — structured families, never exposition text. NetGet renders the text (format 0.0.4, or OpenMetrics 1.0.0 when the scraper prefers it) in exposition, so the model cannot produce a body a scraper would reject.

GET / is a static HTML page linking to /metrics, like every exporter’s. HEAD /metrics answers the headers without asking the model. Anything else is a 404 or 405.

See src/server/prometheus/CLAUDE.md.

Modules§

actions
Prometheus exporter actions.
exposition
Rendering and validation. Public so it can be tested directly against promtool. Prometheus exposition rendering: structured metric families in, text format 0.0.4 or OpenMetrics 1.0.0 out.

Structs§

PrometheusServer
Prometheus exporter server.

Constants§

MAX_REQUEST_BODY_BYTES
Largest request body this server will buffer, in bytes.