Skip to content
This repository was 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
yu-sun-77 merged 6 commits into
opendistro-for-elasticsearch:mainfrom
amathur1893:ClusterStateApplierStats
Mar 17, 2021
Merged

Publish latency and failure metrics for cluster state applier thread#563
yu-sun-77 merged 6 commits into
opendistro-for-elasticsearch:mainfrom
amathur1893:ClusterStateApplierStats

Conversation

@amathur1893
Copy link
Copy Markdown
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.
*/
Copy link
Copy Markdown

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()));

Copy link
Copy Markdown

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
CLUSTER_APPLIER_SERVICE,
ADMISSION_CONTROL_METRICS,
SHARD_INDEXING_PRESSURE
SHARD_INDEXING_PRESSURE;
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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