metrics.plugins.prometheus
-
metrics.plugins.prometheus.collect_http()¶ Get an HTTP response object containing metrics in the Prometheus format.
Return: a table containing the following fields:
status: set to200headers: response headersbody: metrics in the Prometheus format
Rtype:
Example
local prometheus_plugin = require('metrics.plugins.prometheus')
local prometheus_metrics = prometheus_plugin.collect_http()
Example on GitHub: metrics_plugins