-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
This have been requested before in #1490.
Quote
All XHR data (such as request body and headers)
But the proposed solution API doesn't work.
Proposed solution
init({
dsn: 'https://some.dsn/123',
beforeBreadcrumb (breadcrumb, hint) {
if (breadcrumb.category === 'xhr') {
// hint.xhr is a whole XHR object that you can use to modify breadcrumb
}
return breadcrumb;
}
})
The hint.xhr is a XMLHttpRequest which to my knowledge doesn't have access to the request data. Only the response data.
I understand this isn't included by default due to the 200kb (as of writing) size limit. However the request data is hugely beneficial when debugging an issue.
Please allow us to also capture the request data in the beforeBreadcrumb hook. And perhaps add a function that can check if the breadcrumb have exceeded the size limit so we can strip less relevant data from the breadcrumb.
Also asked here
Sentry Forum
StackOverflow
swznd, Lydon, Joozty, convenient and a-hyssopus
Metadata
Metadata
Assignees
Labels
No labels