diff --git a/go.mod b/go.mod index 68134ea..bd9bfc3 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( github.com/opentracing/opentracing-go v1.2.0 - go.unistack.org/micro/v3 v3.10.27 + go.unistack.org/micro/v3 v3.10.28 ) require github.com/stretchr/testify v1.8.1 // indirect diff --git a/go.sum b/go.sum index 05f4441..0ace5fb 100644 --- a/go.sum +++ b/go.sum @@ -15,6 +15,8 @@ github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKs github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= go.unistack.org/micro/v3 v3.10.27 h1:jluDdhkG9P/nchaNlhLkBmGxUASkV/L+/fuWG5RX1tY= go.unistack.org/micro/v3 v3.10.27/go.mod h1:ALkeXpqChYDjx8KPi7tz9mmIyOnob6nlNswsg8BnZjQ= +go.unistack.org/micro/v3 v3.10.28 h1:/87lGekrmi0/66pioy+Nh8lVUBBYnVqKoHiNYX5OmMI= +go.unistack.org/micro/v3 v3.10.28/go.mod h1:eUgtvbtiiz6te93m0ZdmoecbitWwjdBmmr84srmEIKA= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/opentracing.go b/opentracing.go index 674344a..e1a1ef8 100644 --- a/opentracing.go +++ b/opentracing.go @@ -111,6 +111,10 @@ func (os *otSpan) AddEvent(name string, opts ...tracer.EventOption) { os.span.LogFields(otlog.Event(name)) } +func (os *otSpan) AddLogs(kv ...interface{}) { + os.span.LogKV(kv...) +} + func (os *otSpan) Context() context.Context { return ot.ContextWithSpan(context.Background(), os.span) }