Is your feature request related to a problem? Please describe.
When a Request is processed, I need to log which route is being handled. The Opentelemetry definition of route is very handy:
The matched route, that is, the path template in the format used by the respective server framework.
And they give examples like: /users/:userID?, {controller}/{action}/{id?}
I need this because:
When searching log records, I don't want to search for /user/123 but /user/<id> since I may want to see requests for that route.
Some observability providers like Grafana cloud charge per cardinality, and logging requests with variable parameters can be very expensive.
Due to privacy legistlation like GDPR, identifiable information like user ids need to be removed or masked. Having a way to know if the Request has been matched with a route that has parameters would be great.
Opentelemetry defines http.route as an established convention to log which server route a given request has been matched with.
Describe the solution you'd like
It'd be amazing if Request or Response had something like:
Describe alternatives you've considered
Request doesn't provide information about routes so it would be some laborious manual process for each known route. This would be prone to error.
Is your feature request related to a problem? Please describe.
When a Request is processed, I need to log which route is being handled. The Opentelemetry definition of route is very handy:
And they give examples like:
/users/:userID?
,{controller}/{action}/{id?}
I need this because:
/user/123
but/user/<id>
since I may want to see requests for that route.http.route
as an established convention to log which server route a given request has been matched with.Describe the solution you'd like It'd be amazing if
Request
orResponse
had something like:Describe alternatives you've considered Request doesn't provide information about routes so it would be some laborious manual process for each known route. This would be prone to error.