As spanName can be customized with SpanNameFormatter, so the spanName may not be the same with http.route, e.g. the spanName can be GET /users/:id, but the http.route is /users/:id.
This PR using c.FullPath() to set http.route attribute in otelgin to keep http.route not affected by SpanNameFormatter.
As
spanName
can be customized withSpanNameFormatter
, so thespanName
may not be the same withhttp.route
, e.g. thespanName
can beGET /users/:id
, but thehttp.route
is/users/:id
. This PR usingc.FullPath()
to sethttp.route
attribute inotelgin
to keephttp.route
not affected bySpanNameFormatter
.