quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.84k stars 2.7k forks source link

Expose the number of log events in different categories as metrics #12313

Closed slaskawi closed 4 years ago

slaskawi commented 4 years ago

Description Every larger system needs observability. One of the things an SRE Team (Site Reliability Engineering - the ones who look after the production systems) might be interested in is the number of specific log events in certain time. The most interesting metric in this category would be the number of the reported error messages (emitted by the code by logger.error(...) statements).

I'd like to propose implementing and exposing by default this metric.

Implementation ideas

After discussing this with @jamezp, here are some of the implementation proposals:

quarkusbot commented 4 years ago

/cc @jmartisk

jmartisk commented 4 years ago

Hey @slaskawi , we already do have metrics for logging in Quarkus 1.8.0 that you turn on by setting quarkus.log.metrics.enabled. They should work with the SmallRye Metrics as well as the Micrometer extension See https://github.com/quarkusio/quarkus/pull/11224/ Does this suit your needs?

slaskawi commented 4 years ago

Hey @jmartisk ! Thanks for digging this up! This works for me!

Let me close this issue.