Repository navigation
P04: Port operational metrics to ZooKeeper 3.8.7 - #180
Merged
Merged
Conversation
1 task
1 task
arkmish
reviewed
Nov 24, 2026
bellatrix007
force-pushed
the
adbansal/zk-387-p04-metrics
branch
from
November 27, 2026 06:10
2592a45 to
a799e87
Compare
Add the ZooKeeperServer MBean read/write request counts and latencies, connection and session create/close counts, connection auth_info in admin connection output, remote addresses in TLS authentication failure logs, and leader proposal-statistics reset for the admin stat_reset command. Record each ping and createSession latency once, tolerate multi requests without sub-results (throttled or failed), and count a connection close only when an established connection is removed, so repeated closes and rejected TLS connections are not counted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bellatrix007
force-pushed
the
adbansal/zk-387-p04-metrics
branch
from
November 27, 2026 08:26
a799e87 to
e863f4d
Compare
arkmish
approved these changes
Dec 3, 2026
arkmish
left a comment
There was a problem hiding this comment.
LGTM. Thanks for addressing the comments.
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.
Description
Port P04 above #177: operational request, connection and session metrics, connection
auth_info, and authentication-failure address context.branch-3.6(9d245933) with seed Add various operational metrics #134. The unified-port counters added by Adding zk server metrics to track connections on unified client port. #79 and removed again by Adding authinfo in connection info metrics #80 are not reintroduced.ZooKeeperServerMXBeanaddslongattributes:Read/WriteRequestCount,Min/Avg/Max{Read,Write}RequestLatency(ms), andConnection/Session{Create,Close}Count. Names, read/write opcode sets, read-only multi handling and reset behavior follow the fork. Existing metric names are unchanged;stat_resetand MBeanresetStatisticsalso reset the new counters.connections/statconnection objects includeauth_info. Adminstat_resetalso resets leader proposal statistics, matching four-lettersrst. Netty TLS handshake/authentication failure logs include the remote address.multiwithout sub-results no longer throwsNullPointerException.synchronized (ipMap)aroundConcurrentHashMap.computeis not carried.Identity visibility: The additive
auth_infofield preserves identities as stored by each provider, including digest identities inuser:<hash>form. These values are visible to clients able to run AdminServerconnections/stat; endpoint access should be restricted. This is inherited output behavior, not a change to authentication or password hashing.Tests
ServerStatsTest,FinalRequestProcessorTest,NettyServerCnxnTest,SessionTest,CommandsTest,StatResetCommandTest,X509AuthFailureTest, and newRequestMetricsJmxTest, which reads attributes through the MBean server.NullPointerExceptions and the inflated close counts (one established connection versus 40 counted closes after TLS rejections). The same cases pass with this change.clean verifyat2592a45bpassed 139 tests per JDK (8/11/17), 417 total, with no failures, errors or skips: 27 baseline + 10 new/extended P04 cases + 102 existing connection, admin, JMX, Netty/TLS and X509/ACL regression cases.-Djava.net.preferIPv4Stack=true. IPv6 remains unqualified. Testing was local macOS ARM64 only, without full-suite, Linux or mixed-version qualification.Changes that Break Backward Compatibility (Optional)
No existing API or metric names are removed or renamed. Compared with the source fork, ping/createSession latency is recorded once rather than twice, and
ConnectionCloseCountcounts each established connection once rather than every cleanup invocation. Consumers comparing these metrics across versions may observe lower sample or close counts, and aggregate latency values may differ because duplicate samples are removed.Documentation (Optional)
JMX attribute reference and admin command notes in
zookeeperAdmin.md.🤖 Generated with GitHub Copilot CLI