Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

Commit

Permalink
Fix some usage examples (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
cce authored and yurishkuro committed May 6, 2017
1 parent 1949ddb commit eaaf4e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions propagation.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,18 +72,18 @@ const (
//
// For Tracer.Extract(): the carrier must be a `TextMapReader`.
//
// See HTTPHeaderCarrier for an implementation of both TextMapWriter
// See HTTPHeadersCarrier for an implementation of both TextMapWriter
// and TextMapReader that defers to an http.Header instance for storage.
// For example, Inject():
//
// carrier := opentracing.HTTPHeadersCarrier(httpReq.Header)
// err := span.Tracer().Inject(
// span, opentracing.HTTPHeaders, carrier)
// span.Context(), opentracing.HTTPHeaders, carrier)
//
// Or Extract():
//
// carrier := opentracing.HTTPHeadersCarrier(httpReq.Header)
// span, err := tracer.Extract(
// clientContext, err := tracer.Extract(
// opentracing.HTTPHeaders, carrier)
//
HTTPHeaders
Expand Down Expand Up @@ -144,15 +144,15 @@ func (c TextMapCarrier) Set(key, val string) {
//
// Example usage for server side:
//
// carrier := opentracing.HttpHeadersCarrier(httpReq.Header)
// spanContext, err := tracer.Extract(opentracing.HttpHeaders, carrier)
// carrier := opentracing.HTTPHeadersCarrier(httpReq.Header)
// clientContext, err := tracer.Extract(opentracing.HTTPHeaders, carrier)
//
// Example usage for client side:
//
// carrier := opentracing.HTTPHeadersCarrier(httpReq.Header)
// err := tracer.Inject(
// span.Context(),
// opentracing.HttpHeaders,
// opentracing.HTTPHeaders,
// carrier)
//
type HTTPHeadersCarrier http.Header
Expand Down
2 changes: 1 addition & 1 deletion tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ type Tracer interface {
// sp := tracer.StartSpan(
// "GetFeed",
// opentracing.ChildOf(parentSpan.Context()),
// opentracing.Tag("user_agent", loggedReq.UserAgent),
// opentracing.Tag{"user_agent", loggedReq.UserAgent},
// opentracing.StartTime(loggedReq.Timestamp),
// )
//
Expand Down

0 comments on commit eaaf4e1

Please sign in to comment.