-
-
Notifications
You must be signed in to change notification settings - Fork 225
Proposal: Response interface (analogous to the Request interface) #401
Comments
it has been a topic already, I'll discuss it internally, thanks. |
the idea is that we add a new the data structure could be the same as the Request interface https://develop.sentry.dev/sdk/event-payloads/request/ the UI should render nicely as it does for the Request interface using the Contexts for the http type allows having multiple names eg request, response, etc... since a service might do a request to different services etc. after everything being done, we could soft deprecate the |
What if I want to have a request and a response? |
thats not a problem, similar to https://develop.sentry.dev/sdk/event-payloads/contexts/#example and type=os |
https://github.com/getsentry/rfcs/blob/main/text/0022-response-context.md |
It would be nice if an event has a
response
interface, just like therequest
interface.An application makes a request and gets a response. This response can lead to crashes, by having data with which the application cannot work. Just knowing the
request
isn't as helpful as having theresponse
as well.This is especially useful for integrations like getsentry/sentry-dart#473 where HTTP requests can be captured as an exception if the status code is considered "bad". Example: Imaging you want to catch every status code from 400 to 499 as an exception and send it to Sentry. The responses from 400 to 499 often include hints on what's wrong with the request (wrong combination of parameter or whatnot). This information is lost because responses aren't recorded.
This in turn makes this kind of events hard to fix.
Having responses can be useful in non server applications such as mobile or desktop apps, but also for micro-services and servers which communicate via HTTP.
cc @bruno-garcia and @marandaneto because they wanted to hear my insights and learnings from getsentry/sentry-dart#473
The text was updated successfully, but these errors were encountered: