Skip to content

Commit

Permalink
if a metric equals -1, no need to publish it
Browse files Browse the repository at this point in the history
  • Loading branch information
evernat committed Aug 16, 2017
1 parent 74d5f65 commit e264ea2
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,11 @@ private void collectSessionsMeanAge(long sessionAgeSum, int sessionCount) throws

private void addJRobinValue(JRobin jRobin, double value) throws IOException {
jRobin.addValue(value);
for (final MetricsPublisher metricsPublisher : metricsPublishers) {
metricsPublisher.addValue(jRobin.getName(), value);
// if value == -1, then do not publish that metric
if (value >= 0) {
for (final MetricsPublisher metricsPublisher : metricsPublishers) {
metricsPublisher.addValue(jRobin.getName(), value);
}
}
}

Expand Down

0 comments on commit e264ea2

Please sign in to comment.