amppackager icon indicating copy to clipboard operation
amppackager copied to clipboard

Prometheus endpoint for metrics

Open FranGM opened this issue 6 years ago • 6 comments

Hey there!

I think a prometheus endpoint would be very handy to have in this service, so we can easily track request/error rates etc without needing to rely on the metrics for the proxied service itself. Once the service is out of development mode it's not easy to operate without having metrics readily available.

Thanks!

FranGM avatar Oct 21 '19 13:10 FranGM

Oops, I missed this notification. Agreed, seems like a good idea. Any suggestions for metrics to expose? Off the top of my head:

  • # of requests
  • failures (by type)

Less important but possibly useful:

  • per-request: CPU usage, response byte size, latency (total [request -> response], added [fetch response -> response])

twifkak avatar Dec 03 '19 02:12 twifkak

Yeah I think those are pretty much what I had in mind.

Response byte size is definitely important, given that there's a limit on the size of the response that the packager can process, so being able to monitor that would be really useful.

The ability to monitor response codes from upstream as well as latency would also be great.

Thanks for working on this!

FranGM avatar Dec 09 '19 14:12 FranGM

Sorry for the delay on this. It's still top-of-mind, but life.

Wanted to document a few other ideas:

  • time until cert expires
  • time until ocsp expires
  • ACME or OCSP fetch errors

twifkak avatar Feb 27 '20 02:02 twifkak

@FranGM Hi Fran!

I've implemented a bunch of basic metrics recently per your request. The documentation lists the available metrics. Would you like to try them out and give us some feedback?

MichaelRybak avatar Jul 14 '20 17:07 MichaelRybak

Hey there! Sorry about the delay. I might not have enough time to test this in any meaningful way at the moment but I've been going over the linked docs (which are excellent) and this seems exactly what we need. Thanks!

FranGM avatar Jul 31 '20 10:07 FranGM

Happy to hear that!

MichaelRybak avatar Aug 06 '20 01:08 MichaelRybak