Skip to content

Commit a7b0f9a

Browse files
authored
Add comment
1 parent 0e9821c commit a7b0f9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Hosting/Hosting/src/Internal/HostingMetrics.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ public void RequestEnd(string protocol, string scheme, string method, string? ro
6969
tags.Add("http.response.status_code", GetBoxedStatusCode(statusCode));
7070
if (route != null)
7171
{
72-
var httpRoute = (route == string.Empty) ? "/" : route;
72+
// An empty route ("") is valid and equivalent to "/" hence it's normalized for metrics
73+
var httpRoute = route == string.Empty ? "/" : route;
7374
tags.Add("http.route", httpRoute);
7475
}
7576

0 commit comments

Comments
 (0)