Skip to content

Commit

Permalink
Rename TraceContextFormat => SpanContextFormat (jaegertracing#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
yurishkuro authored Jul 9, 2016
1 parent 6020091 commit c2c44aa
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crossdock/server/tchannel.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func convertOpenTracingSpan(ctx context.Context, builder *tchannel.ContextBuilde
return
}
sc := new(jaeger.SpanContext)
if err := span.Tracer().Inject(span.Context(), jaeger.TraceContextFormat, sc); err != nil {
if err := span.Tracer().Inject(span.Context(), jaeger.SpanContextFormat, sc); err != nil {
return
}
builder.SetExternalSpan(sc.TraceID(), sc.SpanID(), sc.ParentID(), sc.IsSampled())
Expand Down
4 changes: 2 additions & 2 deletions interop.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ import (

type formatKey int

// TraceContextFormat is a constant used as OpenTracing Format.
// SpanContextFormat is a constant used as OpenTracing Format.
// Requires *SpanContext as carrier.
// This format is intended for interop with TChannel or other Zipkin-like tracers.
const TraceContextFormat formatKey = iota
const SpanContextFormat formatKey = iota

type jaegerTraceContextPropagator struct {
tracer *tracer
Expand Down
2 changes: 1 addition & 1 deletion propagation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestSpanPropagator(t *testing.T) {
tests := []struct {
format, carrier, formatName interface{}
}{
{TraceContextFormat, new(SpanContext), "TraceContextFormat"},
{SpanContextFormat, new(SpanContext), "TraceContextFormat"},
{opentracing.Binary, new(bytes.Buffer), "Binary"},
{opentracing.TextMap, tmc, "TextMap"},
}
Expand Down
4 changes: 2 additions & 2 deletions tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ func NewTracer(
t.extractors[opentracing.Binary] = binaryPropagator

interopPropagator := &jaegerTraceContextPropagator{tracer: t}
t.injectors[TraceContextFormat] = interopPropagator
t.extractors[TraceContextFormat] = interopPropagator
t.injectors[SpanContextFormat] = interopPropagator
t.extractors[SpanContextFormat] = interopPropagator

zipkinPropagator := &zipkinPropagator{tracer: t}
t.injectors[ZipkinSpanFormat] = zipkinPropagator
Expand Down

0 comments on commit c2c44aa

Please sign in to comment.