-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
streamingest: add a replication lag metric #95248
Conversation
4f071a8
to
81d5e48
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (waiting on @adityamaru, @lidorcarmel, and @stevendanna)
pkg/ccl/streamingccl/streamingest/metrics.go
line 96 at r1 (raw file):
} metaFrontierLagSeconds = metric.Metadata{ Name: "replication.frontier_lag_seconds",
just want to confirm that we'll probably have more replication.
prefixed metrics in the future, right? this seems like the first one so want to make sure a new prefix is needed instead of filing it under streaming.replication.*
for instance.
@@ -221,6 +221,7 @@ func (h *heartbeatSender) startHeartbeatLoop(ctx context.Context) { | |||
case frontier := <-h.frontierUpdates: | |||
h.frontier.Forward(frontier) | |||
} | |||
metrics.FrontierLagSeconds.Update(timeutil.Since(h.frontier.GoTime()).Seconds()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we think it is better to put this here rather than in maybeUpdatePartitionProgress
? If so, some commentary on why might be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think your suggestion would be better, thanks! done. PTAL.
Add a metric to track the lag of the replication frontier, in seconds. Informs: cockroachdb#92959 Epic: CRDB-18752 Release note: None
81d5e48
to
e5cc6d2
Compare
right, it was intentional because we want to rename |
TFTR! |
Build failed (retrying...): |
Build failed (retrying...): |
Build succeeded: |
Add a metric to track the lag of the replication frontier, in seconds.
Informs: #92959
Epic: CRDB-18752
Release note: None