Shouldn't the AspNetCore instrumentation ensure a leading slash on 'http.route' values? #5391
-
AspNetCore instrumentation will generate [Route("api/[controller]")]
public class CustomersController
{
[HttpGet("{customerId}")]
public string GetName(int customerId)...
} Generates an
Shouldn't that be:
Instead? I'm having a hard time finding an authoritative source for this but there is a mention of what seems to be the same thing over here:
The reason I ask this question is that in our current setup, we actually have inconsistency here due to controller attribute routing, vs other middlewares such as GraphQL, Healthchecks, SignalR hubs, which we all start with the leading slash, eg:
As we are currently still relying on legacy AspNetCore 2.2 on .NET Full Framework, these middlewares don't actually produce any I now want to make sure I'm not introducing a future inconsistency into our observability if I prepend a slash or not on those cases. The only other piece of "evidence" I've found is the
But other methods, such as the ones used for Minimal API, don't rely on And others still, have both forms available:
Which one of the following is true?
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Same issue here: Similar issue: https://github.com/open-telemetry/opentelemetry-dotnet/issues/4439 |
Beta Was this translation helpful? Give feedback.
@julealgon Thanks for raising this. I have tagged someone from ASP.NET Core team to see if this is intentional on the issue. Let's continue the discussion there.