Add URL information to MakeInternalAPI

This commit is contained in:
Andrew Morgan 2018-07-23 16:53:28 +01:00
parent 9606dd8ca1
commit 6649f77076

View file

@ -87,6 +87,12 @@ func MakeInternalAPI(tracer opentracing.Tracer, metricsName string, f func(*http
span = tracer.StartSpan(metricsName, ext.RPCServerOption(clientContext))
}
defer span.Finish()
ext.HTTPUrl.Set(span, req.URL.String())
ext.HTTPMethod.Set(span, req.Method)
// TODO: Do we need to do the NewStatusCodeResponseWriter stuff?
req = req.WithContext(opentracing.ContextWithSpan(req.Context(), span))
h.ServeHTTP(w, req)
}