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

gauges for current batch id & normalized batch id #2378

Merged
merged 2 commits into from
Dec 23, 2024
Merged

gauges for current batch id & normalized batch id #2378

merged 2 commits into from
Dec 23, 2024

Conversation

serprex
Copy link
Contributor

@serprex serprex commented Dec 19, 2024

important once #2371 prevents seeing batch history in temporal

@@ -349,6 +349,16 @@ func syncCore[TPull connectors.CDCPullConnectorCore, TSync connectors.CDCSyncCon
activity.RecordHeartbeat(ctx, pushedRecordsWithCount)
a.Alerter.LogFlowInfo(ctx, flowName, pushedRecordsWithCount)

if a.OtelManager != nil {
currentBatchID, err := a.OtelManager.GetOrInitInt64Gauge(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ideally we'd have something like I have for typed temoral slots & then this could just be

otel_metrics.CurrentBatchId.Record(ctx, a.OtelManager, res.CurrentSyncBatchID)

@heavycrystal
Copy link
Contributor

heavycrystal commented Dec 20, 2024

need to ensure #2382 doesn't happen with these

Copy link
Member

@iamKunalGupta iamKunalGupta left a comment

Choose a reason for hiding this comment

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

@serprex if you have bandwidth can you add a couple of metrics more from #2341?

Also as @heavycrystal mentioned, would be great if you could check #2382 while you're at it?

IntervalSinceLastNormalizeGaugeName string = "interval_since_last_normalize"
FetchedBytesCounterName string = "fetched_bytes"
SlotLagGaugeName = "cdc_slot_lag"
CurrentBatchIdGaugeName = "current_batch_id"
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should call it sync_batch_id

Also wondering if we should emit this twice, one at start and one at end, can attach different labels for both the times.

@serprex
Copy link
Contributor Author

serprex commented Dec 20, 2024

@serprex if you have bandwidth can you add a couple of metrics more from #2341?

Also as @heavycrystal mentioned, would be great if you could check #2382 while you're at it?

those would be separate PRs

@serprex serprex requested a review from heavycrystal December 23, 2024 16:21
@serprex serprex merged commit 0511edd into main Dec 23, 2024
9 checks passed
@serprex serprex deleted the batch-gauge branch December 23, 2024 21:46
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.

3 participants