Skip to content

Decouple XHR instrumentation from breadcrumbs #2299

Closed
@lobsterkatie

Description

@lobsterkatie

For many types of events, the code to capture them as breadcrumbs is separate from the code to capture any time they error. (For example, addEventListener is wrapped for breadcrumb purposes here, and for exception-catching purposes here. The key difference is the use of wrap in the latter but not the former.) This lets the two types of capturing be turned on or off independently.

For XHR requests, however, we do both in the same spot (for instance here - you can see that we're using wrap even though we're in breadcrumbs.ts, not trycatch.ts). This means there's no way to turn off the capturing of XHR request errors without also turning off XHR breadcrumbs.

Can we fix this for the next major version?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions