Expand description
The prometheus node — a thin parity node over featherbit’s built-in
Prometheus metrics.
featherbit already exposes Prometheus metrics out of the box. The
GatewayMetrics registry records
per-route request counters and latency histograms plus per-node execution
metrics; the graph engine and data-plane listener feed it on every request
with no plugin required, and it is rendered at the Admin API’s /metrics
endpoint. So this node does not stand up metrics from scratch.
It exists only to add a dimension APISIX’s prometheus plugin tracks that
featherbit’s always-on core metrics do not: a per-consumer request
counter (gateway_consumer_requests_total, labelled consumer and
route). Drop it into a pipeline after the auth node that attaches the
consumer (key-auth, basic-auth, …); each execution bumps the counter
for the request’s consumer (anonymous when none is attached). It never
mutates the context and never fails.
§Deviations from APISIX
- APISIX’s plugin wires up the entire Prometheus exporter and its full metric set. In featherbit the core metrics are built-in and always on, so this node is a thin add-on that only records the per-consumer counter.
- APISIX’s
prefer_nametoggles route name vs route id in labels. featherbit has no route object on the context here, so theroutelabel uses the requestHost(kept low-cardinality on purpose).prefer_nameis accepted for config compatibility but is otherwise inert.
Structs§
- Prometheus
Plugin - Records a per-consumer request counter against the shared
GatewayMetrics; a no-op when metrics are disabled (unit tests).