metrics
metrics copied to clipboard
ScheduledReporter enhancements
trafficstars
After revisiting ScheduledReporter and its implementations for a bit, have a few ideas for enhancements:
- Add callback / promise support to
report()that completes when all reporting duties are completed. This will allow the user to detect when reporting completes (so perhaps they can schedule another report if they want to control it manually) or fails. - Using enhancement 1, only allow one in flight
reportat a time. While it seems unlikely, if there are concurrent reports happening at a time, you could have interlaced data. - Allow
CsvReporterandGraphiteReporterto be used without requiring user to callstart. This would allow the user to manually control when data is reported with these reporters. - Support duration and rate time unit configurations like dropwizard metrics does so user can request the time unit displayed in their reports.
I think numbers 3 and 4 would require a version bump, which I'm fine with. These seem like reasonable additions to me.
Can you shoot me an email at mike at mustwin .com, I'd like to discuss something else with you too