Skip to content

Commit

Permalink
address reviewer's comment
Browse files Browse the repository at this point in the history
  • Loading branch information
zhexuany committed Jul 17, 2018
1 parent 559fa2b commit 615e243
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions util/tracing/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func (cr CallbackRecorder) RecordSpan(sp basictracer.RawSpan) {
cr(sp)
}

// NewSnowball returns a Span which records directly via the specified
// NewSnowball returns a span which records directly via the specified
// callback. If the given WireSpan is the zero value, a new trace is created;
// otherwise, the created Span is a child.
func NewSnowball(opName string, callback func(sp basictracer.RawSpan)) opentracing.Span {
Expand All @@ -42,7 +42,7 @@ func NewSnowball(opName string, callback func(sp basictracer.RawSpan)) opentraci
return sp
}

// NoopSpan returns a Span which discards all operations.
// NoopSpan returns a span which discards all operations.
func NoopSpan() opentracing.Span {
return (opentracing.NoopTracer{}).StartSpan("DefaultSpan")
}
Expand All @@ -55,7 +55,7 @@ func SpanFromContext(ctx context.Context) (sp opentracing.Span) {
return sp
}

// ChildSpanFromContxt return a non-nil span. If span can be got from ctx, then returned span is
// ChildSpanFromContxt returns a non-nil span. If span can be got from ctx, then returned span is
// a child of such span. Otherwise, returned span is a noop span.
func ChildSpanFromContxt(ctx context.Context, opName string) (sp opentracing.Span) {
if sp := opentracing.SpanFromContext(ctx); sp != nil {
Expand Down
3 changes: 1 addition & 2 deletions util/tracing/tracer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,8 @@ package tracing_test
import (
"testing"

. "github.com/pingcap/check"

"github.com/opentracing/opentracing-go"
. "github.com/pingcap/check"
"github.com/pingcap/tidb/util/tracing"
"golang.org/x/net/context"
)
Expand Down

0 comments on commit 615e243

Please sign in to comment.