webhook icon indicating copy to clipboard operation
webhook copied to clipboard

prometheus metrics

Open rockaut opened this issue 4 years ago • 2 comments

Anyone tried to add prometheus metrics/integration yet? Speaking anything against it?

rockaut avatar Apr 06 '21 08:04 rockaut

I assume you mean exposing a metrics HTTP endpoint in webhook for prometheus to scrape.

I haven't looked into it, but I've only toyed with prometheus in the past. Not super-familiar with it. I would be open to adding it, but we may need to agree on a proposal first. My initial questions:

  1. How would the user configure the feature? Do we need #326 first?
  2. What metrics should we export? Would that be configurable? What Caddy does looks interesting.

moorereason avatar Apr 06 '21 21:04 moorereason

Yes Caddy came to my mind too. Personally I'm mostly interested in the error- and over-all-counts and less in the details like timings ... but that's just me.

On the configuration. I came across a lot of implementations where no config other than on/off were possible - thought small scale things. Most are using /metrics as the endpoint anyways and turning the feature on an off by providing a port or not through a flag. That said having config files could make things easier.

I've implemented prometheus metrics libraries mostly with python and my golang-fu isn't that strong but I'm hoping to help as much as I can.

rockaut avatar Apr 07 '21 06:04 rockaut