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 to 200
  • headers: response headers
  • body: metrics in the Prometheus format
Rtype:

table

Example

local prometheus_plugin = require('metrics.plugins.prometheus') local prometheus_metrics = prometheus_plugin.collect_http() 

Example on GitHub: metrics_plugins

Found what you were looking for?
Feedback