1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/vendor/github.com/moby/buildkit/util/tracing/multispan.go
Akihiro Suda 837b9c6214 bump up buildkit
Signed-off-by: Akihiro Suda <suda.akihiro@lab.ntt.co.jp>
2018-10-05 18:33:03 +09:00

22 lines
442 B
Go

package tracing
import (
opentracing "github.com/opentracing/opentracing-go"
)
// MultiSpan allows shared tracing to multiple spans.
// TODO: This is a temporary solution and doesn't really support shared tracing yet. Instead the first always wins.
type MultiSpan struct {
opentracing.Span
}
func NewMultiSpan() *MultiSpan {
return &MultiSpan{}
}
func (ms *MultiSpan) Add(s opentracing.Span) {
if ms.Span == nil {
ms.Span = s
}
}