-
Notifications
You must be signed in to change notification settings - Fork 20
Publish Shard State Metrics #436
Publish Shard State Metrics #436
Conversation
src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/metrics/AllMetrics.java
Outdated
Show resolved
Hide resolved
src/main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/metrics/AllMetrics.java
Outdated
Show resolved
Hide resolved
...main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/reader/MetricsEmitter.java
Show resolved
Hide resolved
...a/com/amazon/opendistro/elasticsearch/performanceanalyzer/reader/ReaderMetricsProcessor.java
Outdated
Show resolved
Hide resolved
...main/java/com/amazon/opendistro/elasticsearch/performanceanalyzer/reader/MetricsEmitter.java
Outdated
Show resolved
Hide resolved
...m/amazon/opendistro/elasticsearch/performanceanalyzer/reader/ShardStateMetricsProcessor.java
Outdated
Show resolved
Hide resolved
...om/amazon/opendistro/elasticsearch/performanceanalyzer/reader/ShardStateMetricsSnapshot.java
Outdated
Show resolved
Hide resolved
...mazon/opendistro/elasticsearch/performanceanalyzer/reader/ShardStateMetricsSnapshotTest.java
Show resolved
Hide resolved
@@ -65,6 +66,7 @@ public void run() { | |||
() -> StatExceptionCode.OTHER_COLLECTION_ERROR.toString()); | |||
StatsCollector.instance().logException(StatExceptionCode.OTHER_COLLECTION_ERROR); | |||
} finally { | |||
LOG.debug("{} took {} time to execute", collectorName, System.nanoTime() - startTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we change this to a metric ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, it would be good to have a "timetook" metric to indicate the time taken for metric collection.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Already made the change in PA PR - opendistro-for-elasticsearch/performance-analyzer#212
@@ -65,6 +66,7 @@ public void run() { | |||
() -> StatExceptionCode.OTHER_COLLECTION_ERROR.toString()); | |||
StatsCollector.instance().logException(StatExceptionCode.OTHER_COLLECTION_ERROR); | |||
} finally { | |||
LOG.debug("{} took {} time to execute", collectorName, System.nanoTime() - startTime); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, it would be good to have a "timetook" metric to indicate the time taken for metric collection.
Fixes #:opendistro-for-elasticsearch/performance-analyzer#213
Description of changes:
This change will start publishing shard state - Initializing, Unassigned and Relocating for each shard. We have not published Active shards to save space.
Testing
Tmp File -
Table created
Content of the table
Rest API
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.