diff --git a/pkg/testutils/lint/lint_test.go b/pkg/testutils/lint/lint_test.go index 641016ddd5fd..39feee411d13 100644 --- a/pkg/testutils/lint/lint_test.go +++ b/pkg/testutils/lint/lint_test.go @@ -731,9 +731,6 @@ func TestLint(t *testing.T) { ":!**/embedded.go", ":!util/timeutil/time.go", ":!util/timeutil/zoneinfo.go", - ":!util/tracing/span.go", - ":!util/tracing/crdbspan.go", - ":!util/tracing/tracer.go", ":!cmd/roachtest/tests/gorm_helpers.go", ) if err != nil { diff --git a/pkg/util/tracing/crdbspan.go b/pkg/util/tracing/crdbspan.go index d5a4533dca82..f21d0cecc405 100644 --- a/pkg/util/tracing/crdbspan.go +++ b/pkg/util/tracing/crdbspan.go @@ -854,7 +854,7 @@ func (s *crdbSpan) getRecordingNoChildrenLocked( // -1 indicates an unfinished Span. For a recording it's better to put some // duration in it, otherwise tools get confused. For example, we export // recordings to Jaeger, and spans with a zero duration don't look nice. - rs.Duration = time.Since(rs.StartTime) + rs.Duration = timeutil.Since(rs.StartTime) rs.Finished = false } else { rs.Finished = true diff --git a/pkg/util/tracing/tracer.go b/pkg/util/tracing/tracer.go index cdb0562704ad..0ae5f02b58d2 100644 --- a/pkg/util/tracing/tracer.go +++ b/pkg/util/tracing/tracer.go @@ -1130,7 +1130,7 @@ child operation: %s, tracer created at: opts.LogTags = opts.Parent.i.crdb.logTags } - startTime := time.Now() + startTime := timeutil.Now() // First, create any external spans that we may need (OpenTelemetry, net/trace). // We do this early so that they are available when we construct the main Span,