hypermetrics
v1.2.1
Published
Hypercore Prometheus metric collector.
Downloads
3
Readme
Hypermetrics
Hypercore Prometheus metric collector.
Usage
const client = require('prom-client')
const hypermetrics = new Hypermetrics(client)
const core = new Hypercore(ram)
await core.ready()
hypermetrics.add(core, { name: 'name-of-the-core' })
server.get('/metrics', async function (req, res) {
res.send(await hypermetrics.register.metrics())
})
server.listen({ port: 8080 })