Skip to content

Commit

Permalink
Remove redundant call to stop on close of GraphiteMeterRegistry
Browse files Browse the repository at this point in the history
In the latest patch versions of Dropwizard's metrics-core library (version 4.1.18 and later), a call to `stop` on the reporter does a final publish, which results in an extra publish happening because the `close` method will also `stop` the reporter. This change effectively reduces the publishes on close from 3 to 2 if using metrics-core 4.1.18 or later. We don't want to eliminate the explicit call to `report` as that will result in no final publish for those using metrics-core 4.1.17 or earlier.

Partially resolves #2156
  • Loading branch information
shakuzen committed Jun 22, 2020
1 parent 1bacd2d commit d451873
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,6 @@ public void start() {
public void close() {
if (config.enabled()) {
reporter.report();
}
stop();
if (config.enabled()) {
reporter.close();
}
super.close();
Expand Down

0 comments on commit d451873

Please sign in to comment.