You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
I'm getting something similar as OpenTelemetry Status Code is 0 when Serilog Request logging reports it as a 302.
I don't have replication steps at the moment.
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.
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: