Closed pajowu closed 6 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 95.68%. Comparing base (
85f72b7
) to head (ee2adf3
).:exclamation: Current head ee2adf3 differs from pull request most recent head 8ba359a. Consider uploading reports for the commit 8ba359a to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
What does this do?
This pr changes the type hint of
get_route_name
to accept aHttpConnection
instead of aRequest
. All informationget_route_name
needs is already provided by the HttpConnection class, which Request is a subclass of. Changing this to HttpConnection allows also passing a WebSocket insteadWhy do we need it?
This allows developers to use the get_route_name function for getting the name of websocket routes as well, which can be very useful for creating custom metrics, e.g. https://github.com/bugbakery/transcribee/pull/389/files#diff-82bbfd4c38c16c9ba393ea259a91bd7a73077f6edc59368d492fe172ac933625R39
Who is this for?
People who want to create own metrics for websocket routes.