-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ASP.NET http.route appears to be incorrect when exception handlers are invoked #5556
Comments
@tyler-boyd I think this was fixed by: #5135 Would you mind trying 1.7.1 or newer and report back? |
Ah and you also mentioned that you're using See comment in the release notes.
You'll need to update to ASP.NET Core 8.0.2+ |
Thanks for the quick replies, I didn't see that linked issue because I was searching for Updating to the latest version of these libraries did the trick, I should have tried that before opening an issue 🙂 Thanks again! |
Bug Report
List of all OpenTelemetry NuGet
packages and version that you are
using (e.g.
OpenTelemetry 1.0.2
):OpenTelemetry 1.7.0
OpenTelemetry.Instrumentation.AspNetCore 1.7.0
Runtime version (e.g.
net462
,net48
,netcoreapp3.1
,net6.0
etc. You canfind this information from the
*.csproj
file):Symptom
A clear and concise description of what the bug is.
What is the expected behavior?
http.route
should always be populated, regardless of if the route handler threw an exception or not.What is the actual behavior?
http.route
is only populated when there's no exception; the tag is null when an exception occurs.Reproduce
In lieu of a reproduction repo, I can point to the likely cause, which is a discrepancy between how the metrics instrumentation handles http.route compared to the tracing instrumentation.
opentelemetry-dotnet/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInMetricsListener.cs
Lines 90 to 96 in 84bdeb3
context.Features.Get<IExceptionHandlerPathFeature>()?.Endpoint
first, falling back tocontext.GetEndpoint()
opentelemetry-dotnet/src/OpenTelemetry.Instrumentation.AspNetCore/Implementation/HttpInListener.cs
Lines 246 to 252 in 84bdeb3
context.GetEndpoint()
I'd assume the metrics way is correct, but am not positive 🤷♂️
The text was updated successfully, but these errors were encountered: