[logback-user] Monitor Dropped Events using Spring Actuator
Cameron Prinsloo
cameron.prinsloo at s4.co.za
Thu Feb 25 06:57:43 CET 2021
Hi everyone,
I've run into a bit of a problem. We want to monitor the total amount of
events that have been *dropped *by Logback using the Spring Boot Actuator.
However, it seems that Actuator only allows us to monitor all the events
that have been processed by Logback, and not the amount of dropped events.
I know that Logback logs warnings regarding dropped events (if the amount
matches the droppedWarnFrequency). However I'd prefer to monitor this via
Spring Actuator instead of Logback logs. I took a look into the source code
where this log is created (
https://github.com/logstash/logstash-logback-encoder/blob/master/src/main/java/net/logstash/logback/appender/AsyncDisruptorAppender.java,
line 464 as of now ), and the amount of dropped events used in the log is
stored in a private variable that isn't exposed via some getter.
Is this a use case that any of you guys have had? I'd love to hear your
thoughts on this :) If this is a relatively common use case (and there is
not currently a way to do this), I would suggest exposing
"consecutiveDroppedCount" in some way, perhaps by including this total as a
value in the WarnStatus class (
https://github.com/qos-ch/logback/blob/61ffd3aba042bbb22f588599ff5574d3b9667d22/logback-core/src/main/java/ch/qos/logback/core/status/WarnStatus.java)
- unless there's a reason that should not be done of course.
Please let me know if you need any more info.
Thanks a lot
--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20210225/7264e5a5/attachment.html>
More information about the logback-user
mailing list