Skip to content

Commit

Permalink
docs: make comment uniform;
Browse files Browse the repository at this point in the history
  • Loading branch information
riandyrn committed Sep 17, 2024
1 parent 5d28ff7 commit 28126d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (tw traceware) ServeHTTP(w http.ResponseWriter, r *http.Request) {
ctx, span := tw.tracer.Start(ctx, spanName, spanOpts...)
defer span.End()

// put trace_id to response header only when [WithTraceIDResponseHeader] is used
// put trace_id to response header only when `WithTraceIDResponseHeader` is used
if len(tw.traceIDResponseHeaderKey) > 0 && span.SpanContext().HasTraceID() {
w.Header().Add(tw.traceIDResponseHeaderKey, span.SpanContext().TraceID().String())
w.Header().Add(tw.traceSampledResponseHeaderKey, strconv.FormatBool(span.SpanContext().IsSampled()))
Expand Down

0 comments on commit 28126d9

Please sign in to comment.