add ability to pass opentracing.Tracer

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2023-01-17 08:43:04 +03:00
parent 1566ccf0d8
commit b7b6d50dc6
3 changed files with 29 additions and 7 deletions

12
options.go Normal file
View 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)
}