Skip to content

Commit

Permalink
kvserver: don't start unrequested verbose logging
Browse files Browse the repository at this point in the history
Previously in three places inside kvserver we blindly start verbose
logging. With the new raft logging this causes a lot of unnecessary
traces to be logged. This change converts them from verbose to
structured logging.

Epic: none

Release note: None
  • Loading branch information
andrewbaptist committed Oct 15, 2024
1 parent 6c381b6 commit 27306e3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/replica_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3210,7 +3210,7 @@ func (r *Replica) followerSendSnapshot(
if sendThreshold > 0 {
var sp *tracing.Span
ctx, sp = tracing.EnsureChildSpan(ctx, r.store.cfg.Tracer(),
"follower snapshot send", tracing.WithRecording(tracingpb.RecordingVerbose))
"follower snapshot send", tracing.WithRecording(tracingpb.RecordingStructured))
sendStart := timeutil.Now()
defer func() {
sendDur := timeutil.Since(sendStart)
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/replicate_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ func (rq *replicateQueue) processOneChangeWithTracing(
) (requeue bool, _ error) {
processStart := timeutil.Now()
ctx, sp := tracing.EnsureChildSpan(ctx, rq.Tracer, "process replica",
tracing.WithRecording(tracingpb.RecordingVerbose))
tracing.WithRecording(tracingpb.RecordingStructured))
defer sp.Finish()

requeue, err := rq.processOneChange(ctx, repl, desc, conf,
Expand Down
2 changes: 1 addition & 1 deletion pkg/kv/kvserver/split_queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func (sq *splitQueue) processAttemptWithTracing(
) (processed bool, _ error) {
processStart := r.Clock().PhysicalTime()
ctx, sp := tracing.EnsureChildSpan(ctx, sq.Tracer, "split",
tracing.WithRecording(tracingpb.RecordingVerbose))
tracing.WithRecording(tracingpb.RecordingStructured))
defer sp.Finish()

processed, err := sq.processAttempt(ctx, r, confReader)
Expand Down

0 comments on commit 27306e3

Please sign in to comment.