Skip to content

[release-23.0] Add ZooKeeper connection metrics to zk2topo (#19757)#19792

Merged
mattlord merged 3 commits into
release-23.0from
backport-19757-to-release-23.0
Apr 7, 2026
Merged

[release-23.0] Add ZooKeeper connection metrics to zk2topo (#19757)#19792
mattlord merged 3 commits into
release-23.0from
backport-19757-to-release-23.0

Conversation

@vitess-bot
Copy link
Copy Markdown
Contributor

@vitess-bot vitess-bot Bot commented Apr 3, 2026

Description

This is a backport of #19757

@vitess-bot vitess-bot Bot added Type: Enhancement Logical improvement (somewhere between a bug and feature) Backport This is a backport Component: Observability Pull requests that touch tracing/metrics/monitoring Skip CI Skip CI actions from running Merge Conflict Component: Topology labels Apr 3, 2026
Copilot AI review requested due to automatic review settings April 3, 2026 20:54
@vitess-bot
Copy link
Copy Markdown
Contributor Author

vitess-bot Bot commented Apr 3, 2026

Hello @MargaretMorehead, there are conflicts in this backport.

Please address them in order to merge this Pull Request. You can execute the snippet below to reset your branch and resolve the conflict manually.

Make sure you replace origin by the name of the vitessio/vitess remote

git fetch --all
gh pr checkout 19792
git reset --hard origin/release-23.0
git cherry-pick -m 1 8edc85bdba59c1d3875546ffaeac73bacfe9655f

@vitess-bot vitess-bot Bot review requested due to automatic review settings April 3, 2026 20:54
@github-actions github-actions Bot added this to the v23.0.4 milestone Apr 3, 2026
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Copilot AI review requested due to automatic review settings April 7, 2026 20:57
@mhamza15 mhamza15 removed Skip CI Skip CI actions from running Merge Conflict labels Apr 7, 2026
@mhamza15 mhamza15 marked this pull request as ready for review April 7, 2026 20:58
@mhamza15 mhamza15 requested a review from mattlord as a code owner April 7, 2026 20:58
Signed-off-by: Mohamed Hamza <mhamza@fastmail.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Backport that adds ZooKeeper connection observability metrics to the zk2topo connection wrapper to help debug ZooKeeper connectivity/concurrency issues.

Changes:

  • Adds three new exported stats variables: lock/semaphore acquisition latency, retry attempts, and connection state transitions.
  • Instruments withRetry to record semaphore wait time and retry count.
  • Instruments session event handling to count ZooKeeper connection state transitions.

Comment thread go/vt/topo/zk2topo/zk_conn.go
Comment thread go/vt/topo/zk2topo/zk_conn.go
@mattlord mattlord enabled auto-merge (squash) April 7, 2026 21:41
@mattlord mattlord merged commit ce1e397 into release-23.0 Apr 7, 2026
167 of 171 checks passed
@promptless
Copy link
Copy Markdown
Contributor

promptless Bot commented Apr 7, 2026

Promptless prepared a documentation update related to this change.

Triggered by this PR

Added documentation for the three new ZooKeeper connection metrics (ZkLockAcquisition, ZkConnAcquisitionRetry, ZkConnState) to the v23.0 topology service reference docs, matching the existing v24.0 documentation that was created for the original PR #19757.

Review at https://app.gopromptless.ai/suggestions/296beb0a-ffd9-4ee7-8f33-b65b03bc52ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Backport This is a backport Component: Observability Pull requests that touch tracing/metrics/monitoring Component: Topology Type: Enhancement Logical improvement (somewhere between a bug and feature)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants