Updated at July 17, 2026 02:08 PM
metrics.plugins.prometheus
Get an HTTP response object containing metrics in the Prometheus format.
Returns
a table containing the following fields:
status: set to200headers: response headersbody: metrics in the Prometheus format
Return type
table
Example
local prometheus_plugin = require('metrics.plugins.prometheus')local prometheus_metrics = prometheus_plugin.collect_http()
Example on GitHub: metrics_plugins