Add various operational metrics#134
Merged
adityaagg09 merged 5 commits intoli-dev/base-3.8.4from Nov 19, 2025
Merged
Conversation
Cherry picked e2e tests from upstream. This checks basic backward compatibility and regression testing. For original PR : apache/zookeeper@609afd1 Co-authored-by: tison <wander4096@gmail.com>
* ZOOKEEPER-4461: Use logback in zookeeper-contrib project * ZOOKEEPER-4479: C tests: Avoid some jitter which results in flaky tests
…' and ')' (#109) Cherry picked #PR1814 Co-authored-by: 67 <67@gd67.com>
Add the following metrics: * Max/Min/Avg latency for read and write requests. * Total request count for read and write requests. * Connection/session create and close count.
cdf7dea to
56a21cb
Compare
laxman-ch
approved these changes
Nov 19, 2025
| return cnxnCount; | ||
| }); | ||
| increaseConnectionCreateCount(); | ||
| synchronized (ipMap) { |
There was a problem hiding this comment.
why do we need synchronisation in this case? ipMap is ConcurrentHashMap.
Also, this synchronization is inconsistent. we are not synchronizing in removeCnxnFromIpMap.
Collaborator
Author
There was a problem hiding this comment.
Added this as an AI in the sheet https://docs.google.com/spreadsheets/d/1B8G3-VmnqolrxBeNAI2XptkVvy9-Y8D7B0TnYWp5zXg/edit?gid=1039821402#gid=1039821402 in 4th tab ( Files to be ehanced )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the following metrics:
Description
(Write a concise description including what, why, how)
Add various operational metrics
Add the following metrics:
This change has been cherry picked, Ref pr :- apache@a88d01d
Tests
The following tests are written for this issue:
(List the names of added unit/integration tests)
[INFO] Reactor Summary for Apache ZooKeeper 3.8.4: [INFO] [INFO] Apache ZooKeeper ................................... SUCCESS [ 1.411 s] [INFO] Apache ZooKeeper - Documentation ................... SUCCESS [ 0.369 s] [INFO] Apache ZooKeeper - Jute ............................ SUCCESS [ 3.797 s] [INFO] Apache ZooKeeper - Server .......................... SUCCESS [ 9.017 s] [INFO] Apache ZooKeeper - Metrics Providers ............... SUCCESS [ 0.128 s] [INFO] Apache ZooKeeper - Prometheus.io Metrics Provider .. SUCCESS [ 1.236 s] [INFO] Apache ZooKeeper - Client .......................... SUCCESS [ 0.103 s] [INFO] Apache ZooKeeper - Recipes ......................... SUCCESS [ 0.257 s] [INFO] Apache ZooKeeper - Recipes - Election .............. SUCCESS [ 0.350 s] [INFO] Apache ZooKeeper - Recipes - Lock .................. SUCCESS [ 0.319 s] [INFO] Apache ZooKeeper - Recipes - Queue ................. SUCCESS [ 0.308 s] [INFO] Apache ZooKeeper - Assembly ........................ SUCCESS [ 1.404 s] [INFO] Apache ZooKeeper - Compatibility Tests ............. SUCCESS [ 0.115 s] [INFO] Apache ZooKeeper - Compatibility Tests - Curator ... SUCCESS [ 0.288 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 19.172 s [INFO] Finished at: 2025-11-19T12:34:00+05:30 [INFO] ------------------------------------------------------------------------The following is the result of the "mvn test" command on the appropriate module:
(If CI test fails due to known issue, please specify the issue and test PR locally. Then copy & paste the result of "mvn test" to here.)
Changes that Break Backward Compatibility (Optional)
My PR contains changes that break backward compatibility or previous assumptions for certain methods or API. They include:
(Consider including all behavior changes for public methods or API. Also include these changes in merge description so that other developers are aware of these changes. This allows them to make relevant code changes in feature branches accounting for the new method/API behavior.)
Documentation (Optional)
In case of new functionality, my PR adds documentation in the following wiki page:
(Link the GitHub wiki you added)