snapshot as Prometheus text.
Parameters
Returns
string
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Function exported by @botmesh/core.
function toPrometheus(snapshot, options?): string;
snapshot as Prometheus text.
| Parameter | Type |
|---|---|
snapshot | BotMetricsSnapshot |
options? | PrometheusOptions |
string
import { toPrometheus, PROMETHEUS_CONTENT_TYPE } from '@botmesh/core'
http.createServer((req, res) => {
res.setHeader('Content-Type', PROMETHEUS_CONTENT_TYPE)
res.end(toPrometheus(bot.metrics(), { labels: { bot: 'ventas' } }))
}).listen(9464)