Skip to content

[Improvement] breadcrumbCallback - allow to capture more XHR data than method and url #1490

@alekbarszczewski

Description

@alekbarszczewski

Current behaviour

Only method and url of XHR are captured, and those are only data available inside breadcrumbCallback.

Expected behaviour

All XHR data (such as request body and headers) should be available inside breadcrumbCallback (though not all captured by sentry by default).

Use case

When using GraphQL api I end up with all XHR breadcrumbs look same like this:

xhr | POST https://api.myapp.com/graphql [200]
xhr | POST https://api.myapp.com/graphql [200]
xhr | POST https://api.myapp.com/graphql [200]
...
xhr | POST https://api.myapp.com/graphql [200]

Would be nice to be able to also capture GraphQL query name for example.
It's not possible right now since request body is not available inside breadcrumbCallback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions