Skip to content

Commit

Permalink
Remove emitting the entry key with the METRICS_WRITE_ERROR metric (op…
Browse files Browse the repository at this point in the history
…ensearch-project#71)

Signed-off-by: Sruti Parthiban <partsrut@amazon.com>
  • Loading branch information
sruti1312 authored Sep 21, 2021
1 parent cdcae41 commit 43c0915
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static void addMetricEntry(StringBuilder value, String metricKey, long me
private static void emitMetric(BlockingQueue<Event> q, Event entry) {
if (!q.offer(entry)) {
PerformanceAnalyzerApp.WRITER_METRICS_AGGREGATOR.updateStat(
WriterMetrics.METRICS_WRITE_ERROR, entry.key, 1);
WriterMetrics.METRICS_WRITE_ERROR, "", 1);
LOG.debug("Could not enter metric {}", entry);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ public void testThreadNameCategorization() {
"search",
MetricsEmitter.categorizeThreadName("opensearch[I9AByra][search]", dimensions));
assertEquals(
"write", MetricsEmitter.categorizeThreadName("opensearch[I9AByra][bulk]", dimensions));
"write",
MetricsEmitter.categorizeThreadName("opensearch[I9AByra][bulk]", dimensions));
assertEquals("other", MetricsEmitter.categorizeThreadName("Top thread random", dimensions));
}

Expand Down

0 comments on commit 43c0915

Please sign in to comment.