router
router copied to clipboard
Missing http.status.response_code when there is a broken pipe error
Describe the bug
If the caller closes the connection before the router is done sending the response (e.g. broken pipe), the router span never gets tagged with http.status.response_code. Consequently, these are the only requests that do not show any status code in DataDog.
To Reproduce Steps to reproduce the behavior:
- Insert code into a subgraph resolver so that it waits 10 seconds before responding to requests from router
- Send request to router using curl
- Cancel request (ctrl-c) while subgraph is waiting to respond which induces a broken pipe error
- Observe in DataDog that the trace for the above request has no status code
Expected behavior Every trace should have a response status code so that DataDog queries can use the status code as a predicate
Router:
- OS: Amazon Linux 2023
- Version: 1.37.0
Just wondering if status code 499 would be appropriate here? It's non-standard, but widely used because of nginx.
Yes, I think 499 status code would be a good fit and would certainly work for us