-
-
Notifications
You must be signed in to change notification settings - Fork 238
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
Capture HTTP Response Body for SentryHttpClient
#2220
Comments
hey, what did you have in mind where you want this information to show up in the sentry product? |
@buenaflor Here is what I'm thinking (based on the accepted RFC linked above): Each request made through Our use-case is that when an HTTP request fails, we don't just want to know which request failed, but we want to see the entire trace of requests and responses that led up to the failing request. Does this make sense? Thanks! |
Another possible way to capture + present this information could be Breadcrumbs (which I believe already support outgoing HTTP requests, but doesn't include request body or response data) |
@sumanthratna if I understand correctly, you're looking for our Dio integration, which does exactly what you're looking for when using Dio. If you use a different HTTP library, we'd be interested to know. |
@kahest I think you're confusing the To get the most out of the http integrations, you have to set the following options:
These options work for both, the Please be aware, that this is essentially a privacy and security nightmare, since you would be able to see users PII and their username/password. Please also be aware, that this only works when the request actually fails. |
@ueman ah yes, you're totally right, thanks :) |
Thanks! I set these options and I now see Request Body and Request Headers under my Sentry Issues. However, I don't see Response body. I skimmed through the Dart SDK source code and it looks like edit: edit: shouldn't sentry-dart/dart/lib/src/http_client/failed_request_client.dart Lines 212 to 216 in 178baee
|
@kahest @ueman re: maxResponseBodySize, see #624 which proposes this feature and #1557 which implements it, only for Dio. I couldn't find a corresponding PR for the Is my understanding correct that the Sentry Dart SDK should be updated to implement |
Yeah, seems like you're correct. A note for the future implementer: |
SentryHttpClient
SentryHttpClient
Problem Statement
I would like to automatically capture the following information for all outgoing requests made by
SentryHttpClient
:This should be opt-in, similar to
networkDetailAllowUrls
in the JavaScript SDK: https://docs.sentry.io/platforms/javascript/session-replay/configuration/#network-detailsSolution Brainstorm
https://github.com/getsentry/rfcs/blob/main/text/0022-response-context.md
Are you willing to submit a PR?
Yes
The text was updated successfully, but these errors were encountered: