-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Display Request and Response Bodies in Sentry Dashboard #3960
Comments
hi @romankulykov, thanks for the feedback!
Beware that if you read the response body in the |
Problem Statement
Description:
It would be extremely helpful to have the ability to view the request body and response body of API calls directly in the Sentry dashboard. This feature could provide critical insights for debugging issues involving backend communication.
Use Case:
• When an error happens, developers could see the request body (data sent to the backend) and the response body (data received from the backend) in the issue details.
• This would help in diagnosing problems caused by malformed requests, unexpected server responses, or API contract violations.
Expected Behavior:
• An option to enable capturing of request body and response body in the Sentry SDK.
• In the Sentry dashboard, this data would appear in the issue details under a new section, such as “API Details” or “Request/Response Data.”
• Sensitive information like passwords, tokens, or personally identifiable information (PII) should be masked or excluded for security.
Implementation Suggestion:
For Android, this functionality might be achievable through OkHttp. By implementing an interceptor, it is possible to capture the request and response bodies during API calls. These captured data could then be passed to Sentry as custom metadata or breadcrumbs. If such a solution already exists, guidance or examples in the documentation would be highly appreciated.
Questions:
• Is there currently a way to capture and display request and response bodies using Sentry?
• Could this functionality be added as part of Sentry’s SDKs or configured via breadcrumbs or custom events?
• Are there any workarounds or best practices to achieve this behavior until such a feature exists?
Solution Brainstorm
No response
The text was updated successfully, but these errors were encountered: