mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 03:13:11 -06:00
Add URL information to MakeInternalAPI
This commit is contained in:
parent
9606dd8ca1
commit
6649f77076
|
|
@ -87,6 +87,12 @@ func MakeInternalAPI(tracer opentracing.Tracer, metricsName string, f func(*http
|
||||||
span = tracer.StartSpan(metricsName, ext.RPCServerOption(clientContext))
|
span = tracer.StartSpan(metricsName, ext.RPCServerOption(clientContext))
|
||||||
}
|
}
|
||||||
defer span.Finish()
|
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))
|
req = req.WithContext(opentracing.ContextWithSpan(req.Context(), span))
|
||||||
h.ServeHTTP(w, req)
|
h.ServeHTTP(w, req)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue