-
Notifications
You must be signed in to change notification settings - Fork 762
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
Cancelled Requests Fail to Report Correct Status Code #3600
Comments
This has purposely been removed in the following fix: #2904 |
@DavidStevensWillow That PR is talking about SpanStatus and seems to say nothing about the StatusCode. |
I'm getting something similar as OpenTelemetry Status Code is 0 when Serilog Request logging reports it as a 302. Edit: also noting that the status code is Error. |
This issue was marked stale due to lack of activity and will be closed in 7 days. Commenting will instruct the bot to automatically remove the label. This bot runs once per day. |
Closed as inactive. Feel free to reopen if this issue is still a concern. |
Bug Report
Runtime version: net6.0
Symptom
When a client cancels a request, I want to be able to set a 499 'Client Closed Request' status code for logging/telemetry purposes and shortcut the ASP.NET middle-ware pipeline to save time. This is described further in Andrew Lock's blog post here:
https://andrewlock.net/using-cancellationtokens-in-asp-net-core-minimal-apis/
What is the expected behavior?
I expect Open Telemetry to log the correct status code in
http.status_code
, so I can view telemetry and see all cancelled 499 responses.What is the actual behavior?
A status code of zero is logged by Open Telemetry while Serilog is correctly logging 499.
Reproduce
Add this controller to an open telemetry project with a console exporter.
The text was updated successfully, but these errors were encountered: