Skip to content

Commit

Permalink
Merge pull request #134594 from rafiss/backport23.2-134347
Browse files Browse the repository at this point in the history
release-23.2: jobs: don't redact job ID in log tags
  • Loading branch information
rafiss authored Nov 8, 2024
2 parents f3ba201 + 9a848ee commit a13ff5f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/jobs/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"github.com/cockroachdb/errors"
"github.com/cockroachdb/errors/oserror"
"github.com/cockroachdb/logtags"
"github.com/cockroachdb/redact"
)

// adoptedJobs represents the epoch and cancellation of a job id being run by
Expand Down Expand Up @@ -1697,8 +1698,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)
Expand Down

0 comments on commit a13ff5f

Please sign in to comment.