Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
fixing linting: checking error in tracer injection
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-burrell committed Jun 11, 2020
1 parent 0ea70e7 commit 7530906
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ func (r *oauthProxy) tracingMiddleware(next http.Handler) http.Handler {
serverSpan := opentracing.GlobalTracer().StartSpan(req.Host, ext.RPCServerOption(spanCtx))
defer serverSpan.Finish()
serverSpan.SetTag("uri", req.URL.RequestURI())
opentracing.GlobalTracer().Inject(serverSpan.Context(), opentracing.HTTPHeaders, opentracing.HTTPHeadersCarrier(req.Header))
err := opentracing.GlobalTracer().Inject(serverSpan.Context(), opentracing.HTTPHeaders, opentracing.HTTPHeadersCarrier(req.Header))
if err != nil {
r.log.Error("error injecting tracer", zap.Error(err))
}
next.ServeHTTP(w, req.WithContext(opentracing.ContextWithSpan(req.Context(), serverSpan)))
})
}
Expand Down

0 comments on commit 7530906

Please sign in to comment.