tjahzi
tjahzi copied to clipboard
Rewrite how statistic are exposed for consumption
After implementing current approach to doing metrics I have identified some drawbacks to how these are exposed.
To access the metrics user has to get hold of the appender object (through ((org.apache.logging.log4j.core.LoggerContext) LogManager.getContext(false))
) and set MonitoringModule
implementation.
Proposal is to add configuration entry that will enable statistics in the appender as well as specify a transient file (possibly in/dev/shm
) that will be mmaped and used to dump statistics in real time. We will provide utility classes to decode that file and send the stats via e.g. dropwizard metrics.