Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
aggregate stale metrics to write_metrics (#246)
Browse files Browse the repository at this point in the history
* aggregate stale metrics to write_metrics

* aggregate stale metrics to write_metrics

* add comment
  • Loading branch information
yu-sun-77 authored Dec 2, 2020
1 parent 380248a commit 72c46a5
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.amazon.opendistro.elasticsearch.performanceanalyzer.writer;

import com.amazon.opendistro.elasticsearch.performanceanalyzer.PerformanceAnalyzerApp;
import com.amazon.opendistro.elasticsearch.performanceanalyzer.rca.framework.metrics.WriterMetrics;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CancellationException;
Expand Down Expand Up @@ -114,9 +116,9 @@ public void purgeQueueAndPersist() {
} else if (entry.epoch == nextTimeBucket) {
nextMetrics.add(entry);
} else {
LOG.info("UNEXPECTED entry ({}) with epoch '{}' arrived" +
" when the current bucket is '{}'",
entry.key, entry.epoch, timeBucket);
//increment stale_metrics count when metrics to be collected is falling behind the current bucket
PerformanceAnalyzerApp.WRITER_METRICS_AGGREGATOR.updateStat(
WriterMetrics.STALE_METRICS, "", 1);
}
}

Expand Down

0 comments on commit 72c46a5

Please sign in to comment.