-
Notifications
You must be signed in to change notification settings - Fork 1
Implement metrics for Zookeeper client #164
base: release/8.8
Are you sure you want to change the base?
Conversation
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.
Aside from the handful of minor comments/questions/suggestions, I wonder if a bit more consideration would be warranted wrt at a high level what we're seeking to capture with these metrics? One concern I have is that based on where the stats are actually incremented, we're currently not capturing any info about connection errors/retries (some stats are incremented before operations, some after -- a relevant distinction in the event of an exception being thrown by the actual operation; and metrics don't currently capture anything wrt retryOnConnLoss
, which might be useful).
solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
Outdated
Show resolved
Hide resolved
solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
Outdated
Show resolved
Hide resolved
solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
Outdated
Show resolved
Hide resolved
This is why I have marked this as a WIP. We need to refine the scope of this ticket and add/remove more metrics . Maybe, @hiteshk25 will be able to add more here |
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.
Thanks @noblepaul, this looks good. I think the remaining questions are more about the significance/utility of individual metrics (will discuss with @hiteshk25 et al).
solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
Outdated
Show resolved
Hide resolved
} | ||
metrics.reads.increment(); |
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.
same here!
solr/solrj/src/java/org/apache/solr/common/cloud/SolrZkClient.java
Outdated
Show resolved
Hide resolved
some of these metrics are collected after the operation is done because we also need to collect data from output for instance, when we do data reads , we need to collect both the number of reads and no:of bytes. the no:of bytes are only available after the operation. OTOH , if you are writing data to ZK , we know the payload size before hand. |
right. But look their main ops counter, which incremented inconsistently. |
In general, better to increment counter before their ops. Here is solr request example
|
Ideally, I would do the increments before the operation. if we also wish to increment the result data , what choice do we have? In places where we don't need to collect output data , we just increment it in the beginning
look at the above method. We want to keep track of the |
I think those are two different metrics,
|
@hiteshk25 The JUnit test is added . lemme know if there is anything more required |
These are the test failing in CI
|
2add79d
to
953958f
Compare
rebased from release/8.8, Now these tests are failing
|
@noblepaul @chatman we need to look above test failures |
Do not commit, WIP
please let me know if we wish to add more variables
How to use?
http://localhost:8983/solr/admin/metrics?key=solr.node:CONTAINER.zkClient
sample output