Skip to content

Commit

Permalink
adds return obj to handler
Browse files Browse the repository at this point in the history
Signed-off-by: Afzal Ansari <afzal442@gmail.com>
  • Loading branch information
afzal442 committed Jul 10, 2023
1 parent 48b60c1 commit 37357a5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion examples/hotrod/pkg/tracing/http.go
Expand Up @@ -46,7 +46,6 @@ func (c *HTTPClient) GetJSON(ctx context.Context, url string, out interface{}) e
if err != nil {
return err
}
req = req.WithContext(ctx)

res, err := c.Client.Do(req)

Check failure

Code scanning / CodeQL

Uncontrolled data used in network request Critical

The
URL
of this request depends on a
user-provided value
.
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion examples/hotrod/pkg/tracing/mux.go
Expand Up @@ -47,7 +47,7 @@ type TracedServeMux struct {
func (tm *TracedServeMux) Handle(pattern string, handler http.Handler) {
tm.logger.Bg().Debug("registering traced handler", zap.String("endpoint", pattern))

otelhttp.WithRouteTag(pattern, handler)
handler = otelhttp.WithRouteTag(pattern, handler)

middleware := otelhttp.NewHandler(handler, pattern,
otelhttp.WithTracerProvider(tm.tracer))
Expand Down

0 comments on commit 37357a5

Please sign in to comment.