faust.web.apps.metrics¶
HTTP endpoint exposing performance metrics.
Enabled with the web_metrics_enabled setting, which is off by
default:
app = faust.App("myapp", web_metrics_enabled=True)
Unlike the statistics endpoints in faust.web.apps.stats this is
independent of debug, so it can be left on in production.
The payload is grouped by concern rather than being a flat dump of
Monitor.asdict(), and adds two
things that monitor does not compute:
consumer lag – derived from the log end offsets and the offsets this worker has actually read, which is the number you usually want to alert on.
latency percentiles – monitor keeps raw deques of up to a few thousand samples; those are summarized here instead of serialized.
faust.sensors.prometheus serves the same underlying data in Prometheus
format on its own path; the two are independent.