Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kvserver/rangefeed: add kv.rangefeed.lifetime_nanos #142134

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wenyihu6
Copy link
Contributor

@wenyihu6 wenyihu6 commented Feb 28, 2025

This patch adds a new metric, kv.rangefeed.lifetime_nanos, to track the duration
of rangefeed lifetime between its successful instantiation and disconnection.

Note that the counter starts when the registration is instantiated, though there
may be a short delay before it registers with the processor and begins receiving
events. We ignore this gap as it is expected to be short.

Part of: #129816
Release note: none

This patch introduces two new metrics -
kv.rangefeed.{buffered,unbuffered}_registrations. They track the number of
corresponding active buffered and unbuffered rangefeeds subscribed on
replicas.

Part of: cockroachdb#129816
Release note: none
This patch introduces a new metric,
kv.rangefeed.output_loop_nanos_unbuffered_reg, which tracks the duration of the
per-range, per-registration runOutputLoop goroutine. This goroutine is expected
to be short-lived for unbuffered registrations, while it remains long-lived for
buffered registrations. Note that this metric is only non-zero for unbuffered
registrations.

Part of: cockroachdb#129816
Release note: none
@cockroach-teamcity
Copy link
Member

This change is Reviewable

This patch refactors rangefeed metrics in node.Metrics into a dedicated
StreamManagerMetrics struct. This improves modularity and aligns with future
additions like BufferedSenderMetrics.

Epic: none
Release note: none
This patch adds a new metric, rangefeed.buffered_sender.queue_size, to track the
number of entries pending in the buffered sender queue waiting to be sent to rpc
stream.

Part of: cockroachdb#129816
Release note: none
@wenyihu6 wenyihu6 marked this pull request as ready for review February 28, 2025 16:01
@wenyihu6 wenyihu6 requested review from a team as code owners February 28, 2025 16:01
@wenyihu6 wenyihu6 requested review from stevendanna and removed request for a team February 28, 2025 16:01
This patch adds a new metric, kv.rangefeed.lifetime_nanos, to track the duration
of rangefeed lifetime between its successful instantiation and disconnection.

Note that the counter starts when the registration is instantiated, though there
may be a short delay before it registers with the processor and begins receiving
events. We ignore this gap as it is expected to be short.

Part of: cockroachdb#129816
Release note: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants