Remove usage of ocstatus package
This changes the tracing package to accept an error on SetStatus, which is really what we always want anyway. This also decouples the trace package from opencensus.
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
|
||||
"github.com/virtual-kubelet/virtual-kubelet/log"
|
||||
"go.opencensus.io/trace"
|
||||
)
|
||||
|
||||
type nopTracer struct{}
|
||||
@@ -15,9 +14,9 @@ func (nopTracer) StartSpan(ctx context.Context, _ string) (context.Context, Span
|
||||
|
||||
type nopSpan struct{}
|
||||
|
||||
func (nopSpan) End() {}
|
||||
func (nopSpan) SetStatus(trace.Status) {}
|
||||
func (nopSpan) Logger() log.Logger { return nil }
|
||||
func (nopSpan) End() {}
|
||||
func (nopSpan) SetStatus(error) {}
|
||||
func (nopSpan) Logger() log.Logger { return nil }
|
||||
|
||||
func (nopSpan) WithField(ctx context.Context, _ string, _ interface{}) context.Context { return ctx }
|
||||
func (nopSpan) WithFields(ctx context.Context, _ log.Fields) context.Context { return ctx }
|
||||
|
||||
Reference in New Issue
Block a user