diff --git a/pkg/jobs/registry.go b/pkg/jobs/registry.go index 66a7fadb2ab9..899d7ccdd67e 100644 --- a/pkg/jobs/registry.go +++ b/pkg/jobs/registry.go @@ -44,6 +44,7 @@ import ( "github.com/cockroachdb/errors" "github.com/cockroachdb/errors/oserror" "github.com/cockroachdb/logtags" + "github.com/cockroachdb/redact" ) // adoptedJobs represents a the epoch and cancelation of a job id being run @@ -1641,8 +1642,7 @@ func (r *Registry) stepThroughStateMachine( return errors.NewAssertionErrorWithWrappedErrf(jobErr, "job %d: resuming with non-nil error", job.ID()) } - resumeCtx := logtags.AddTag(ctx, "job", - fmt.Sprintf("%s id=%d", jobType, job.ID())) + resumeCtx := logtags.AddTag(ctx, "job", redact.Sprintf("%s id=%d", jobType, job.ID())) // Adding all tags as pprof labels (including the one we just added for job // type and id). resumeCtx, undo := pprofutil.SetProfilerLabelsFromCtxTags(resumeCtx)