Skip to content

Commit

Permalink
tracing: make trace and span ids redactable
Browse files Browse the repository at this point in the history
The trace and span ids can be used for out of band tracing. We don't
want those to be redacted.

Epic: none

Release note: None
  • Loading branch information
andrewbaptist committed Oct 18, 2024
1 parent 85f57fb commit fe09e92
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/testutils/lint/passes/redactcheck/redactcheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@ func runAnalyzer(pass *analysis.Pass) (interface{}, error) {
"WorkKind": {},
"QueueKind": {},
},
"github.com/cockroachdb/cockroach/pkg/util/tracing/tracingpb": {
"TraceID": {},
"SpanID": {},
},
"github.com/cockroachdb/cockroach/pkg/util/hlc": {
"ClockTimestamp": {},
"LegacyTimestamp": {},
Expand Down
4 changes: 4 additions & 0 deletions pkg/util/tracing/tracingpb/recorded_span.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ const (
// TraceID is a probabilistically-unique id, shared by all spans in a trace.
type TraceID uint64

func (TraceID) SafeValue() {}

// SpanID is a probabilistically-unique span id.
type SpanID uint64

func (SpanID) SafeValue() {}

// Recording represents a group of RecordedSpans rooted at a fixed root span, as
// returned by GetRecording. Spans are sorted by StartTime.
type Recording []RecordedSpan
Expand Down

0 comments on commit fe09e92

Please sign in to comment.