Update OpenTracing http package

This commit is contained in:
Bryan Boreham
2021-03-28 16:59:59 +00:00
parent 053afd5689
commit 6a769eee3e
18 changed files with 187 additions and 205 deletions

3
go.mod
View File

@@ -52,7 +52,8 @@ require (
github.com/nats-io/nuid v0.0.0-20160402145409-a5152d67cf63 // indirect
github.com/opencontainers/runc v1.0.0-rc5 // indirect
github.com/openebs/k8s-snapshot-client v0.0.0-20180831100134-a6506305fb16
github.com/opentracing/opentracing-go v1.1.0
github.com/opentracing-contrib/go-stdlib v1.0.0
github.com/opentracing/opentracing-go v1.2.0
github.com/paypal/ionet v0.0.0-20130919195445-ed0aaebc5417
github.com/pborman/uuid v0.0.0-20150824212802-cccd189d45f7
github.com/peterbourgon/diskv v2.0.2-0.20171120014656-2973218375c3+incompatible // indirect

4
go.sum
View File

@@ -210,8 +210,12 @@ github.com/openebs/k8s-snapshot-client v0.0.0-20180831100134-a6506305fb16/go.mod
github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc=
github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9 h1:QsgXACQhd9QJhEmRumbsMQQvBtmdS0mafoVEBplWXEg=
github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w=
github.com/opentracing-contrib/go-stdlib v1.0.0 h1:TBS7YuVotp8myLon4Pv7BtCBzOTo1DeZCld0Z63mW2w=
github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU=
github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs=
github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc=
github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY=
github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
github.com/paypal/ionet v0.0.0-20130919195445-ed0aaebc5417 h1:J6WpKbo9vAJXwOQcWKBsUv/cbHx2yotqFkxfrFT58Zc=

View File

@@ -7,6 +7,7 @@ import (
"io"
"net/http"
"net/http/httptrace"
"net/url"
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/ext"
@@ -33,6 +34,7 @@ type Transport struct {
type clientOptions struct {
operationName string
componentName string
urlTagFunc func(u *url.URL) string
disableClientTrace bool
disableInjectSpanContext bool
spanObserver func(span opentracing.Span, r *http.Request)
@@ -49,6 +51,15 @@ func OperationName(operationName string) ClientOption {
}
}
// URLTagFunc returns a ClientOption that uses given function f
// to set the span's http.url tag. Can be used to change the default
// http.url tag, eg to redact sensitive information.
func URLTagFunc(f func(u *url.URL) string) ClientOption {
return func(options *clientOptions) {
options.urlTagFunc = f
}
}
// ComponentName returns a ClientOption that sets the component
// name for the client-side span.
func ComponentName(componentName string) ClientOption {
@@ -109,6 +120,9 @@ func ClientSpanObserver(f func(span opentracing.Span, r *http.Request)) ClientOp
// }
func TraceRequest(tr opentracing.Tracer, req *http.Request, options ...ClientOption) (*http.Request, *Tracer) {
opts := &clientOptions{
urlTagFunc: func(u *url.URL) string {
return u.String()
},
spanObserver: func(_ opentracing.Span, _ *http.Request) {},
}
for _, opt := range options {
@@ -159,7 +173,7 @@ func (t *Transport) RoundTrip(req *http.Request) (*http.Response, error) {
tracer.start(req)
ext.HTTPMethod.Set(tracer.sp, req.Method)
ext.HTTPUrl.Set(tracer.sp, req.URL.String())
ext.HTTPUrl.Set(tracer.sp, tracer.opts.urlTagFunc(req.URL))
tracer.opts.spanObserver(tracer.sp, req)
if !tracer.opts.disableInjectSpanContext {

View File

@@ -108,6 +108,12 @@ func MiddlewareFunc(tr opentracing.Tracer, h http.HandlerFunc, options ...MWOpti
for _, opt := range options {
opt(&opts)
}
// set component name, use "net/http" if caller does not specify
componentName := opts.componentName
if componentName == "" {
componentName = defaultComponentName
}
fn := func(w http.ResponseWriter, r *http.Request) {
if !opts.spanFilter(r) {
h(w, r)
@@ -117,24 +123,32 @@ func MiddlewareFunc(tr opentracing.Tracer, h http.HandlerFunc, options ...MWOpti
sp := tr.StartSpan(opts.opNameFunc(r), ext.RPCServerOption(ctx))
ext.HTTPMethod.Set(sp, r.Method)
ext.HTTPUrl.Set(sp, opts.urlTagFunc(r.URL))
opts.spanObserver(sp, r)
// set component name, use "net/http" if caller does not specify
componentName := opts.componentName
if componentName == "" {
componentName = defaultComponentName
}
ext.Component.Set(sp, componentName)
opts.spanObserver(sp, r)
sct := &statusCodeTracker{ResponseWriter: w}
r = r.WithContext(opentracing.ContextWithSpan(r.Context(), sp))
defer func() {
ext.HTTPStatusCode.Set(sp, uint16(sct.status))
if sct.status >= http.StatusInternalServerError || !sct.wroteheader {
panicErr := recover()
didPanic := panicErr != nil
if sct.status == 0 && !didPanic {
// Standard behavior of http.Server is to assume status code 200 if one was not written by a handler that returned successfully.
// https://github.com/golang/go/blob/fca286bed3ed0e12336532cc711875ae5b3cb02a/src/net/http/server.go#L120
sct.status = 200
}
if sct.status > 0 {
ext.HTTPStatusCode.Set(sp, uint16(sct.status))
}
if sct.status >= http.StatusInternalServerError || didPanic {
ext.Error.Set(sp, true)
}
sp.Finish()
if didPanic {
panic(panicErr)
}
}()
h(sct.wrappedResponseWriter(), r)

View File

@@ -1,145 +0,0 @@
// +build go1.7,!go1.8
package nethttp
import (
"io"
"net/http"
)
type statusCodeTracker struct {
http.ResponseWriter
status int
wroteheader bool
}
func (w *statusCodeTracker) WriteHeader(status int) {
w.status = status
w.wroteheader = true
w.ResponseWriter.WriteHeader(status)
}
func (w *statusCodeTracker) Write(b []byte) (int, error) {
if !w.wroteheader {
w.wroteheader = true
w.status = 200
}
return w.ResponseWriter.Write(b)
}
// wrappedResponseWriter returns a wrapped version of the original
// ResponseWriter and only implements the same combination of additional
// interfaces as the original. This implementation is based on
// https://github.com/felixge/httpsnoop.
func (w *statusCodeTracker) wrappedResponseWriter() http.ResponseWriter {
var (
hj, i0 = w.ResponseWriter.(http.Hijacker)
cn, i1 = w.ResponseWriter.(http.CloseNotifier)
fl, i3 = w.ResponseWriter.(http.Flusher)
rf, i4 = w.ResponseWriter.(io.ReaderFrom)
)
i2 := false
switch {
case !i0 && !i1 && !i2 && !i3 && !i4:
return struct {
http.ResponseWriter
}{w}
case !i0 && !i1 && !i2 && !i3 && i4:
return struct {
http.ResponseWriter
io.ReaderFrom
}{w, rf}
case !i0 && !i1 && !i2 && i3 && !i4:
return struct {
http.ResponseWriter
http.Flusher
}{w, fl}
case !i0 && !i1 && !i2 && i3 && i4:
return struct {
http.ResponseWriter
http.Flusher
io.ReaderFrom
}{w, fl, rf}
case !i0 && i1 && !i2 && !i3 && !i4:
return struct {
http.ResponseWriter
http.CloseNotifier
}{w, cn}
case !i0 && i1 && !i2 && !i3 && i4:
return struct {
http.ResponseWriter
http.CloseNotifier
io.ReaderFrom
}{w, cn, rf}
case !i0 && i1 && !i2 && i3 && !i4:
return struct {
http.ResponseWriter
http.CloseNotifier
http.Flusher
}{w, cn, fl}
case !i0 && i1 && !i2 && i3 && i4:
return struct {
http.ResponseWriter
http.CloseNotifier
http.Flusher
io.ReaderFrom
}{w, cn, fl, rf}
case i0 && !i1 && !i2 && !i3 && !i4:
return struct {
http.ResponseWriter
http.Hijacker
}{w, hj}
case i0 && !i1 && !i2 && !i3 && i4:
return struct {
http.ResponseWriter
http.Hijacker
io.ReaderFrom
}{w, hj, rf}
case i0 && !i1 && !i2 && i3 && !i4:
return struct {
http.ResponseWriter
http.Hijacker
http.Flusher
}{w, hj, fl}
case i0 && !i1 && !i2 && i3 && i4:
return struct {
http.ResponseWriter
http.Hijacker
http.Flusher
io.ReaderFrom
}{w, hj, fl, rf}
case i0 && i1 && !i2 && !i3 && !i4:
return struct {
http.ResponseWriter
http.Hijacker
http.CloseNotifier
}{w, hj, cn}
case i0 && i1 && !i2 && !i3 && i4:
return struct {
http.ResponseWriter
http.Hijacker
http.CloseNotifier
io.ReaderFrom
}{w, hj, cn, rf}
case i0 && i1 && !i2 && i3 && !i4:
return struct {
http.ResponseWriter
http.Hijacker
http.CloseNotifier
http.Flusher
}{w, hj, cn, fl}
case i0 && i1 && !i2 && i3 && i4:
return struct {
http.ResponseWriter
http.Hijacker
http.CloseNotifier
http.Flusher
io.ReaderFrom
}{w, hj, cn, fl, rf}
default:
return struct {
http.ResponseWriter
}{w}
}
}

View File

@@ -9,21 +9,15 @@ import (
type statusCodeTracker struct {
http.ResponseWriter
status int
wroteheader bool
status int
}
func (w *statusCodeTracker) WriteHeader(status int) {
w.status = status
w.wroteheader = true
w.ResponseWriter.WriteHeader(status)
}
func (w *statusCodeTracker) Write(b []byte) (int, error) {
if !w.wroteheader {
w.wroteheader = true
w.status = 200
}
return w.ResponseWriter.Write(b)
}

View File

@@ -2,8 +2,8 @@ language: go
matrix:
include:
- go: "1.11.x"
- go: "1.12.x"
- go: "1.13.x"
- go: "1.14.x"
- go: "tip"
env:
- LINT=true

View File

@@ -1,6 +1,23 @@
Changes by Version
==================
1.2.0 (2020-07-01)
-------------------
* Restore the ability to reset the current span in context to nil (#231) -- Yuri Shkuro
* Use error.object per OpenTracing Semantic Conventions (#179) -- Rahman Syed
* Convert nil pointer log field value to string "nil" (#230) -- Cyril Tovena
* Add Go module support (#215) -- Zaba505
* Make SetTag helper types in ext public (#229) -- Blake Edwards
* Add log/fields helpers for keys from specification (#226) -- Dmitry Monakhov
* Improve noop impementation (#223) -- chanxuehong
* Add an extension to Tracer interface for custom go context creation (#220) -- Krzesimir Nowak
* Fix typo in comments (#222) -- meteorlxy
* Improve documentation for log.Object() to emphasize the requirement to pass immutable arguments (#219) -- 疯狂的小企鹅
* [mock] Return ErrInvalidSpanContext if span context is not MockSpanContext (#216) -- Milad Irannejad
1.1.0 (2019-03-23)
-------------------

24
vendor/github.com/opentracing/opentracing-go/ext.go generated vendored Normal file
View File

@@ -0,0 +1,24 @@
package opentracing
import (
"context"
)
// TracerContextWithSpanExtension is an extension interface that the
// implementation of the Tracer interface may want to implement. It
// allows to have some control over the go context when the
// ContextWithSpan is invoked.
//
// The primary purpose of this extension are adapters from opentracing
// API to some other tracing API.
type TracerContextWithSpanExtension interface {
// ContextWithSpanHook gets called by the ContextWithSpan
// function, when the Tracer implementation also implements
// this interface. It allows to put extra information into the
// context and make it available to the callers of the
// ContextWithSpan.
//
// This hook is invoked before the ContextWithSpan function
// actually puts the span into the context.
ContextWithSpanHook(ctx context.Context, span Span) context.Context
}

View File

@@ -0,0 +1,17 @@
package ext
import (
"github.com/opentracing/opentracing-go"
"github.com/opentracing/opentracing-go/log"
)
// LogError sets the error=true tag on the Span and logs err as an "error" event.
func LogError(span opentracing.Span, err error, fields ...log.Field) {
Error.Set(span, true)
ef := []log.Field{
log.Event("error"),
log.Error(err),
}
ef = append(ef, fields...)
span.LogFields(ef...)
}

View File

@@ -47,40 +47,40 @@ var (
// Component is a low-cardinality identifier of the module, library,
// or package that is generating a span.
Component = stringTagName("component")
Component = StringTagName("component")
//////////////////////////////////////////////////////////////////////
// Sampling hint
//////////////////////////////////////////////////////////////////////
// SamplingPriority determines the priority of sampling this Span.
SamplingPriority = uint16TagName("sampling.priority")
SamplingPriority = Uint16TagName("sampling.priority")
//////////////////////////////////////////////////////////////////////
// Peer tags. These tags can be emitted by either client-side of
// Peer tags. These tags can be emitted by either client-side or
// server-side to describe the other side/service in a peer-to-peer
// communications, like an RPC call.
//////////////////////////////////////////////////////////////////////
// PeerService records the service name of the peer.
PeerService = stringTagName("peer.service")
PeerService = StringTagName("peer.service")
// PeerAddress records the address name of the peer. This may be a "ip:port",
// a bare "hostname", a FQDN or even a database DSN substring
// like "mysql://username@127.0.0.1:3306/dbname"
PeerAddress = stringTagName("peer.address")
PeerAddress = StringTagName("peer.address")
// PeerHostname records the host name of the peer
PeerHostname = stringTagName("peer.hostname")
PeerHostname = StringTagName("peer.hostname")
// PeerHostIPv4 records IP v4 host address of the peer
PeerHostIPv4 = ipv4Tag("peer.ipv4")
PeerHostIPv4 = IPv4TagName("peer.ipv4")
// PeerHostIPv6 records IP v6 host address of the peer
PeerHostIPv6 = stringTagName("peer.ipv6")
PeerHostIPv6 = StringTagName("peer.ipv6")
// PeerPort records port number of the peer
PeerPort = uint16TagName("peer.port")
PeerPort = Uint16TagName("peer.port")
//////////////////////////////////////////////////////////////////////
// HTTP Tags
@@ -88,46 +88,46 @@ var (
// HTTPUrl should be the URL of the request being handled in this segment
// of the trace, in standard URI format. The protocol is optional.
HTTPUrl = stringTagName("http.url")
HTTPUrl = StringTagName("http.url")
// HTTPMethod is the HTTP method of the request, and is case-insensitive.
HTTPMethod = stringTagName("http.method")
HTTPMethod = StringTagName("http.method")
// HTTPStatusCode is the numeric HTTP status code (200, 404, etc) of the
// HTTP response.
HTTPStatusCode = uint16TagName("http.status_code")
HTTPStatusCode = Uint16TagName("http.status_code")
//////////////////////////////////////////////////////////////////////
// DB Tags
//////////////////////////////////////////////////////////////////////
// DBInstance is database instance name.
DBInstance = stringTagName("db.instance")
DBInstance = StringTagName("db.instance")
// DBStatement is a database statement for the given database type.
// It can be a query or a prepared statement (i.e., before substitution).
DBStatement = stringTagName("db.statement")
DBStatement = StringTagName("db.statement")
// DBType is a database type. For any SQL database, "sql".
// For others, the lower-case database category, e.g. "redis"
DBType = stringTagName("db.type")
DBType = StringTagName("db.type")
// DBUser is a username for accessing database.
DBUser = stringTagName("db.user")
DBUser = StringTagName("db.user")
//////////////////////////////////////////////////////////////////////
// Message Bus Tag
//////////////////////////////////////////////////////////////////////
// MessageBusDestination is an address at which messages can be exchanged
MessageBusDestination = stringTagName("message_bus.destination")
MessageBusDestination = StringTagName("message_bus.destination")
//////////////////////////////////////////////////////////////////////
// Error Tag
//////////////////////////////////////////////////////////////////////
// Error indicates that operation represented by the span resulted in an error.
Error = boolTagName("error")
Error = BoolTagName("error")
)
// ---
@@ -163,48 +163,53 @@ func RPCServerOption(client opentracing.SpanContext) opentracing.StartSpanOption
// ---
type stringTagName string
// StringTagName is a common tag name to be set to a string value
type StringTagName string
// Set adds a string tag to the `span`
func (tag stringTagName) Set(span opentracing.Span, value string) {
func (tag StringTagName) Set(span opentracing.Span, value string) {
span.SetTag(string(tag), value)
}
// ---
type uint32TagName string
// Uint32TagName is a common tag name to be set to a uint32 value
type Uint32TagName string
// Set adds a uint32 tag to the `span`
func (tag uint32TagName) Set(span opentracing.Span, value uint32) {
func (tag Uint32TagName) Set(span opentracing.Span, value uint32) {
span.SetTag(string(tag), value)
}
// ---
type uint16TagName string
// Uint16TagName is a common tag name to be set to a uint16 value
type Uint16TagName string
// Set adds a uint16 tag to the `span`
func (tag uint16TagName) Set(span opentracing.Span, value uint16) {
func (tag Uint16TagName) Set(span opentracing.Span, value uint16) {
span.SetTag(string(tag), value)
}
// ---
type boolTagName string
// BoolTagName is a common tag name to be set to a bool value
type BoolTagName string
// Add adds a bool tag to the `span`
func (tag boolTagName) Set(span opentracing.Span, value bool) {
// Set adds a bool tag to the `span`
func (tag BoolTagName) Set(span opentracing.Span, value bool) {
span.SetTag(string(tag), value)
}
type ipv4Tag string
// IPv4TagName is a common tag name to be set to an ipv4 value
type IPv4TagName string
// Set adds IP v4 host address of the peer as an uint32 value to the `span`, keep this for backward and zipkin compatibility
func (tag ipv4Tag) Set(span opentracing.Span, value uint32) {
func (tag IPv4TagName) Set(span opentracing.Span, value uint32) {
span.SetTag(string(tag), value)
}
// SetString records IP v4 host address of the peer as a .-separated tuple to the `span`. E.g., "127.0.0.1"
func (tag ipv4Tag) SetString(span opentracing.Span, value string) {
func (tag IPv4TagName) SetString(span opentracing.Span, value string) {
span.SetTag(string(tag), value)
}

5
vendor/github.com/opentracing/opentracing-go/go.mod generated vendored Normal file
View File

@@ -0,0 +1,5 @@
module github.com/opentracing/opentracing-go
go 1.14
require github.com/stretchr/testify v1.3.0

7
vendor/github.com/opentracing/opentracing-go/go.sum generated vendored Normal file
View File

@@ -0,0 +1,7 @@
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=

View File

@@ -7,8 +7,13 @@ type contextKey struct{}
var activeSpanKey = contextKey{}
// ContextWithSpan returns a new `context.Context` that holds a reference to
// `span`'s SpanContext.
// the span. If span is nil, a new context without an active span is returned.
func ContextWithSpan(ctx context.Context, span Span) context.Context {
if span != nil {
if tracerWithHook, ok := span.Tracer().(TracerContextWithSpanExtension); ok {
ctx = tracerWithHook.ContextWithSpanHook(ctx, span)
}
}
return context.WithValue(ctx, activeSpanKey, span)
}

View File

@@ -122,16 +122,19 @@ func Float64(key string, val float64) Field {
}
}
// Error adds an error with the key "error" to a Span.LogFields() record
// Error adds an error with the key "error.object" to a Span.LogFields() record
func Error(err error) Field {
return Field{
key: "error",
key: "error.object",
fieldType: errorType,
interfaceVal: err,
}
}
// Object adds an object-valued key:value pair to a Span.LogFields() record
// Please pass in an immutable object, otherwise there may be concurrency issues.
// Such as passing in the map, log.Object may result in "fatal error: concurrent map iteration and map write".
// Because span is sent asynchronously, it is possible that this map will also be modified.
func Object(key string, obj interface{}) Field {
return Field{
key: key,
@@ -140,6 +143,16 @@ func Object(key string, obj interface{}) Field {
}
}
// Event creates a string-valued Field for span logs with key="event" and value=val.
func Event(val string) Field {
return String("event", val)
}
// Message creates a string-valued Field for span logs with key="message" and value=val.
func Message(val string) Field {
return String("message", val)
}
// LazyLogger allows for user-defined, late-bound logging of arbitrary data
type LazyLogger func(fv Encoder)

View File

@@ -1,6 +1,9 @@
package log
import "fmt"
import (
"fmt"
"reflect"
)
// InterleavedKVToFields converts keyValues a la Span.LogKV() to a Field slice
// a la Span.LogFields().
@@ -46,6 +49,10 @@ func InterleavedKVToFields(keyValues ...interface{}) ([]Field, error) {
case float64:
fields[i] = Float64(key, typedVal)
default:
if typedVal == nil || (reflect.ValueOf(typedVal).Kind() == reflect.Ptr && reflect.ValueOf(typedVal).IsNil()) {
fields[i] = String(key, "nil")
continue
}
// When in doubt, coerce to a string
fields[i] = String(key, fmt.Sprint(typedVal))
}

View File

@@ -21,9 +21,9 @@ type noopSpan struct{}
type noopSpanContext struct{}
var (
defaultNoopSpanContext = noopSpanContext{}
defaultNoopSpan = noopSpan{}
defaultNoopTracer = NoopTracer{}
defaultNoopSpanContext SpanContext = noopSpanContext{}
defaultNoopSpan Span = noopSpan{}
defaultNoopTracer Tracer = NoopTracer{}
)
const (
@@ -35,7 +35,7 @@ func (n noopSpanContext) ForeachBaggageItem(handler func(k, v string) bool) {}
// noopSpan:
func (n noopSpan) Context() SpanContext { return defaultNoopSpanContext }
func (n noopSpan) SetBaggageItem(key, val string) Span { return defaultNoopSpan }
func (n noopSpan) SetBaggageItem(key, val string) Span { return n }
func (n noopSpan) BaggageItem(key string) string { return emptyString }
func (n noopSpan) SetTag(key string, value interface{}) Span { return n }
func (n noopSpan) LogFields(fields ...log.Field) {}

4
vendor/modules.txt vendored
View File

@@ -292,10 +292,10 @@ github.com/openebs/k8s-snapshot-client/snapshot/pkg/apis/volumesnapshot/v1
github.com/openebs/k8s-snapshot-client/snapshot/pkg/client/clientset/versioned
github.com/openebs/k8s-snapshot-client/snapshot/pkg/client/clientset/versioned/scheme
github.com/openebs/k8s-snapshot-client/snapshot/pkg/client/clientset/versioned/typed/volumesnapshot/v1
# github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9
# github.com/opentracing-contrib/go-stdlib v1.0.0
github.com/opentracing-contrib/go-stdlib/nethttp
# github.com/opentracing/opentracing-go v1.1.0
## explicit
# github.com/opentracing/opentracing-go v1.2.0
github.com/opentracing/opentracing-go
github.com/opentracing/opentracing-go/ext
github.com/opentracing/opentracing-go/log