I use GraphQL and instead of breadcrumbs like:
XHR | POST https://{my_domain}/graphql [200]
XHR | POST https://{my_domain}/graphql [200]
XHR | POST https://{my_domain}/graphql [200]
I wanted to have something more meaningful, so I added custom beforeBreadcrumb
:
beforeBreadcrumb(breadcrumb, hint) {
if (breadcrumb.category === 'xhr') {
let message = getXhrBreadcrumbMessage(hint);
if (message) {
breadcrumb.message = message;
}
}
return breadcrumb;
}
The getXhrBreadcrumbMessage
does the magic and I see that a proper message is sent to Sentry, e.g.:
message: "⮃ query user [200]"
message: "⮃ query books [200]"
message: "⮃ mutation reviewBook [200]"
But Sentry’s interface seems to ignore the message for the XHR breadcrumb and still shows cryptic “POST https://{my_domain}/graphql [200]” on the list of breadcrumbs.
I did that for ui.click
to have nicer messages but no luck with XHR
Is it generally not possible to override the message for XHR?