Skip to content

Commit

Permalink
restore: add a tracing span for each restore span
Browse files Browse the repository at this point in the history
Release note: none.
Epic: none.
  • Loading branch information
dt committed Feb 23, 2024
1 parent 34c96ec commit f7ded79
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/ccl/backupccl/restore_data_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/util/protoutil"
"github.com/cockroachdb/cockroach/pkg/util/quotapool"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/cockroach/pkg/util/tracing"
"github.com/cockroachdb/errors"
"github.com/cockroachdb/logtags"
gogotypes "github.com/gogo/protobuf/types"
Expand Down Expand Up @@ -511,6 +512,8 @@ func (rd *restoreDataProcessor) runRestoreWorkers(
ctx := logtags.AddTag(ctx, "restore-span", entry.ProgressIdx)
ctx, undo := pprofutil.SetProfilerLabelsFromCtxTags(ctx)
defer undo()
ctx, sp := tracing.ChildSpan(ctx, "restore.processRestoreSpanEntry")
defer sp.Finish()

var res *resumeEntry
for {
Expand Down

0 comments on commit f7ded79

Please sign in to comment.