Skip to content

Commit

Permalink
Merge pull request #134895 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-23.2-134781

release-23.2: changefeedccl: add log tag for processor type
  • Loading branch information
andyyang890 authored Nov 12, 2024
2 parents 49ed2bd + 202a9ac commit e4685a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/ccl/changefeedccl/changefeed_processors.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,11 @@ func (ca *changeAggregator) wrapMetricsController(
return recorderWithTelemetry, nil
}

const (
changeAggregatorLogTag = "change-aggregator"
changeFrontierLogTag = "change-frontier"
)

// Start is part of the RowSource interface.
func (ca *changeAggregator) Start(ctx context.Context) {
// Derive a separate context so that we can shutdown the poller.
Expand All @@ -290,6 +295,8 @@ func (ca *changeAggregator) Start(ctx context.Context) {
if ca.spec.JobID != 0 {
ctx = logtags.AddTag(ctx, "job", ca.spec.JobID)
}
ctx = logtags.RemoveTag(ctx, changeFrontierLogTag)
ctx = logtags.AddTag(ctx, changeAggregatorLogTag, nil /* value */)
ctx = ca.StartInternal(ctx, changeAggregatorProcName)

spans, err := ca.setupSpansAndFrontier()
Expand Down Expand Up @@ -1237,6 +1244,7 @@ func (cf *changeFrontier) Start(ctx context.Context) {
if cf.spec.JobID != 0 {
ctx = logtags.AddTag(ctx, "job", cf.spec.JobID)
}
ctx = logtags.AddTag(ctx, changeFrontierLogTag, nil /* value */)
// StartInternal called at the beginning of the function because there are
// early returns if errors are detected.
ctx = cf.StartInternal(ctx, changeFrontierProcName)
Expand Down

0 comments on commit e4685a4

Please sign in to comment.