semantic_logger icon indicating copy to clipboard operation
semantic_logger copied to clipboard

Prometheus exporter for queue status

Open xrl opened this issue 4 years ago • 1 comments

I'm starting to "prometheus all the things" in our rails application. They have support for ruby garbage collector, rails, puma, activerecord, etc, would this project be open to support on the semantic logger operational metrics?

I'd love to get stats like

  • Count of all log lines processed
  • Count of all rejected log lines
  • Size of queues
  • Thoughts on other properties to instrument?

I'm using: https://github.com/discourse/prometheus_exporter

I could author instrumentation for semantic logger but I'm not sure where to include it. I could put it in this code base? Or would you prefer it's a third party repo?

Perhaps this library could make a SemanticLogger.stats property like they do on Puma? I'm looking at https://github.com/puma/puma/blob/64c0153cd0bd2bb0fe85258e17dad538067c6484/lib/puma.rb#L28

xrl avatar Feb 01 '21 04:02 xrl

Yes, adding stats directly to Semantic Logger would be a useful addition. Just be sure that it is thread safe and does not slow down each of the concurrent appenders. Some appenders have their own queues and worker threads too.

reidmorrison avatar Apr 29 '21 17:04 reidmorrison