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 basic unbuf reg metrics #137015

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

Conversation

wenyihu6
Copy link
Contributor

@wenyihu6 wenyihu6 commented Dec 9, 2024

kvserver/rangefeed: add kv.rangefeed.{buffered,unbuffered}_registrations

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

Part of: #135332
Release note: none


kvserver/rangefeed: add kv.rangefeed.output_loop_nanos

This patch introduces a new metric, kv.rangefeed.output_loop_nanos, 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: #135332
Release note: none


kvserver/rangefeed: add StreamManagerMetrics

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


kvserver/rangefeed: add rangefeed.buffered_sender.queue_size

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: #129816
Release note: none

Copy link

blathers-crl bot commented Dec 9, 2024

Your pull request contains more than 1000 changes. It is strongly encouraged to split big PRs into smaller chunks.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@wenyihu6 wenyihu6 force-pushed the unbufregmetrics branch 5 times, most recently from 63e2a8a to 1a389b5 Compare December 10, 2024 07:42
Copy link

blathers-crl bot commented Dec 10, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@wenyihu6 wenyihu6 force-pushed the unbufregmetrics branch 2 times, most recently from 28f682c to f727e13 Compare December 11, 2024 14:14
@wenyihu6
Copy link
Contributor Author

@stevendanna I remember you mentioned having a few specific metrics in mind that you'd like to include. These are just four basic ones that could provide some initial observability if people want to test this feature.

@wenyihu6 wenyihu6 marked this pull request as ready for review December 11, 2024 14:19
@wenyihu6 wenyihu6 requested review from a team as code owners December 11, 2024 14:19
@wenyihu6 wenyihu6 requested review from stevendanna and removed request for a team December 11, 2024 14:19
@wenyihu6 wenyihu6 force-pushed the unbufregmetrics branch 3 times, most recently from 0d13ac1 to c0ae144 Compare December 11, 2024 16:02
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, 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
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
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