Skip to content

Commit

Permalink
Merge pull request #33 from opentracing/bhs/updates
Browse files Browse the repository at this point in the history
Update per recent OT-go PRs
  • Loading branch information
bensigelman committed Jul 26, 2016
2 parents fb0d4fa + ec3e3ed commit a9458a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ ReferencesLoop:
case opentracing.ChildOfRef,
opentracing.FollowsFromRef:

refMD := ref.Referee.(*SpanContext)
refMD := ref.ReferencedContext.(*SpanContext)
sp.raw.TraceID = refMD.TraceID
sp.raw.SpanID = randomID()
sp.raw.ParentSpanID = refMD.SpanID
Expand Down Expand Up @@ -226,7 +226,7 @@ var Delegator delegatorType

func (t *tracerImpl) Inject(sc opentracing.SpanContext, format interface{}, carrier interface{}) error {
switch format {
case opentracing.TextMap:
case opentracing.TextMap, opentracing.HTTPHeaders:
return t.textPropagator.Inject(sc, carrier)
case opentracing.Binary:
return t.binaryPropagator.Inject(sc, carrier)
Expand All @@ -239,7 +239,7 @@ func (t *tracerImpl) Inject(sc opentracing.SpanContext, format interface{}, carr

func (t *tracerImpl) Extract(format interface{}, carrier interface{}) (opentracing.SpanContext, error) {
switch format {
case opentracing.TextMap:
case opentracing.TextMap, opentracing.HTTPHeaders:
return t.textPropagator.Extract(carrier)
case opentracing.Binary:
return t.binaryPropagator.Extract(carrier)
Expand Down

0 comments on commit a9458a9

Please sign in to comment.