Skip to content

Commit

Permalink
Add receiver names to TraceContext methods (#1136)
Browse files Browse the repository at this point in the history
Otherwise, they are no aligned together on godoc.

Co-authored-by: Tyler Yahn <[email protected]>
  • Loading branch information
rakyll and MrAlias authored Sep 8, 2020
1 parent 9ad4824 commit b0f978c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/trace/trace_context_propagator.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func DefaultHTTPPropagator() propagation.HTTPPropagator {
return TraceContext{}
}

func (TraceContext) Inject(ctx context.Context, supplier propagation.HTTPSupplier) {
func (tc TraceContext) Inject(ctx context.Context, supplier propagation.HTTPSupplier) {
tracestate := ctx.Value(tracestateKey)
if state, ok := tracestate.(string); tracestate != nil && ok {
supplier.Set(tracestateHeader, state)
Expand Down Expand Up @@ -79,7 +79,7 @@ func (tc TraceContext) Extract(ctx context.Context, supplier propagation.HTTPSup
return ContextWithRemoteSpanContext(ctx, sc)
}

func (TraceContext) extract(supplier propagation.HTTPSupplier) SpanContext {
func (tc TraceContext) extract(supplier propagation.HTTPSupplier) SpanContext {
h := supplier.Get(traceparentHeader)
if h == "" {
return EmptySpanContext()
Expand Down Expand Up @@ -147,6 +147,6 @@ func (TraceContext) extract(supplier propagation.HTTPSupplier) SpanContext {
return sc
}

func (TraceContext) GetAllKeys() []string {
func (tc TraceContext) GetAllKeys() []string {
return []string{traceparentHeader, tracestateHeader}
}

0 comments on commit b0f978c

Please sign in to comment.