Closed zerok closed 7 years ago
Hey @zerok, I think that this is quite unnecessary. You can already expose custom metrics by talking to the prom-client
module directly:
const epimetheus = require('epimetheus');
const client = require('prom-client');
//...
epimetheus.instrument(app)
const counter = new client.Counter({name: "My counter", help:"Some help text"})
//...
app.get("/some/endpoint/", (req, res)=>{
//...
counter.inc(10)
//...
});
And it will be merged with the Epimetheus default metrics.
@bricef Weird, for some reason pretty much the same example didn't work for me before. All the better :) Thanks!
This will allow users to register custom metrics and expose them through the same registry.