Skip to content

Commit

Permalink
tracing: improve comment on otSpan
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
tbg committed Oct 28, 2020
1 parent e79dbcf commit b00e688
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions pkg/util/tracing/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,15 @@ func (s *crdbSpan) isRecording() bool {
return s != nil && atomic.LoadInt32(&s.recording) != 0
}

// otSpan is an span for an external opentracing compatible tracer
// such as lightstep, zipkin, jaeger, etc.
type otSpan struct {
// TODO(tbg): see if we can lose the shadowTr here and rely on shadowSpan.Tracer().
// Probably not - but worth checking.
// TODO(tbg): consider renaming 'shadow' -> 'ot' or 'external'.
// shadowTr is the shadowTracer this span was created from. We need
// to hold on to it separately because shadowSpan.Tracer() returns
// the wrapper tracer directly and we lose the ability to find out
// what tracer it is. This is important when deriving children from
// this span, as we want to avoid mixing different tracers, which
// would otherwise be the result of cluster settings changed.
shadowTr *shadowTracer
shadowSpan opentracing.Span
}
Expand Down

0 comments on commit b00e688

Please sign in to comment.