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

Publish latency and failure metrics for cluster state applier thread #563

Merged
merged 6 commits into from
Mar 17, 2021
Merged

Publish latency and failure metrics for cluster state applier thread #563

merged 6 commits into from
Mar 17, 2021

Conversation

amathur1893
Copy link
Contributor

@amathur1893 amathur1893 commented Mar 1, 2021

Fixes #, if available: 564

Description of changes: With this change we will start publishing metrics like Latency and failure for Cluster state applier thread.

1.Tested using Docker

Tmp file

^cluster_applier_service
{"current_time":1614584101385}
{"ClusterApplierService_Failure":2,"ClusterApplierService_Latency":0}$

Table created

sqlite> .tables
ClusterApplierService_Latency 
ClusterApplierService_Failure

Contents of the table

sqlite> select * from ClusterApplierService_Failure;
6.0|6.0|6.0|6.0
sqlite> select * from ClusterApplierService_Latency;
29.0|29.0|29.0|29.0

Comment on lines 826 to 828
/**
* Sum of total pending tasks throttled by master node.
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a copy-paste miss? The comment seems to be unrelated.

AllMetrics.ClusterApplierServiceStatsValue.CLUSTER_APPLIER_SERVICE_LATENCY.toString(),
new MetricAttributes(
MetricUnits.MILLISECOND.toString(), EmptyDimension.values()));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we need to include failure metric as well in here?

@khushbr khushbr requested a review from yu-sun-77 March 9, 2021 05:25
ADMISSION_CONTROL_METRICS,
SHARD_INDEXING_PRESSURE
SHARD_INDEXING_PRESSURE;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we replace ";" with "," to avoid future changes when adding new metric?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -0,0 +1,25 @@
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we change year to 2021 in the license header?

@yu-sun-77 yu-sun-77 merged commit 3575243 into opendistro-for-elasticsearch:main Mar 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants