Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add receiver names to TraceContext methods #1136

Merged
merged 2 commits into from
Sep 8, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}
}