add ability to pass opentracing.Tracer
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
12
options.go
Normal file
12
options.go
Normal file
@@ -0,0 +1,12 @@
|
||||
package opentracing
|
||||
|
||||
import (
|
||||
"github.com/opentracing/opentracing-go"
|
||||
"go.unistack.org/micro/v3/tracer"
|
||||
)
|
||||
|
||||
type tracerKey struct{}
|
||||
|
||||
func Tracer(ot opentracing.Tracer) tracer.Option {
|
||||
return tracer.SetOption(tracerKey{}, ot)
|
||||
}
|
Reference in New Issue
Block a user