From 6649f77076eb75e94f317086d3b9d8e24f8e9605 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Mon, 23 Jul 2018 16:53:28 +0100 Subject: [PATCH] Add URL information to MakeInternalAPI --- src/github.com/matrix-org/dendrite/common/httpapi.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/github.com/matrix-org/dendrite/common/httpapi.go b/src/github.com/matrix-org/dendrite/common/httpapi.go index 2c2637df..327b4d33 100644 --- a/src/github.com/matrix-org/dendrite/common/httpapi.go +++ b/src/github.com/matrix-org/dendrite/common/httpapi.go @@ -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) }