@@ -49,7 +49,7 @@ func (i internalOnly) ReportActiveSpans(name string) []*SpanData {
4949 s .mu .Lock ()
5050 defer s .mu .Unlock ()
5151 for activeSpan := range s .active {
52- if s , ok := activeSpan .internal . (* span ); ok {
52+ if s , ok := activeSpan .(* span ); ok {
5353 out = append (out , s .makeSpanData ())
5454 }
5555 }
@@ -187,7 +187,7 @@ func (i internalOnly) ReportSpansByLatency(name string, minLatency, maxLatency t
187187// bucketed by latency.
188188type spanStore struct {
189189 mu sync.Mutex // protects everything below.
190- active map [* Span ]struct {}
190+ active map [SpanInterface ]struct {}
191191 errors map [int32 ]* bucket
192192 latency []bucket
193193 maxSpansPerErrorBucket int
@@ -196,7 +196,7 @@ type spanStore struct {
196196// newSpanStore creates a span store.
197197func newSpanStore (name string , latencyBucketSize int , errorBucketSize int ) * spanStore {
198198 s := & spanStore {
199- active : make (map [* Span ]struct {}),
199+ active : make (map [SpanInterface ]struct {}),
200200 latency : make ([]bucket , len (defaultLatencies )+ 1 ),
201201 maxSpansPerErrorBucket : errorBucketSize ,
202202 }
@@ -273,15 +273,15 @@ func (s *spanStore) resize(latencyBucketSize int, errorBucketSize int) {
273273}
274274
275275// add adds a span to the active bucket of the spanStore.
276- func (s * spanStore ) add (span * Span ) {
276+ func (s * spanStore ) add (span SpanInterface ) {
277277 s .mu .Lock ()
278278 s .active [span ] = struct {}{}
279279 s .mu .Unlock ()
280280}
281281
282282// finished removes a span from the active set, and adds a corresponding
283283// SpanData to a latency or error bucket.
284- func (s * spanStore ) finished (span * Span , sd * SpanData ) {
284+ func (s * spanStore ) finished (span SpanInterface , sd * SpanData ) {
285285 latency := sd .EndTime .Sub (sd .StartTime )
286286 if latency < 0 {
287287 latency = 0
0 commit comments