Skip to content

Custom breadcrumb message data based on DOM element #3015

@swelham

Description

@swelham

I can see this has been raised some time ago in these three issues (#577 #576 #783) which seem to indicate an implementation was being considered. I wasn't able to find anything in the docs about this though, other than creating my own implementation using the beforeBreadcrumb hook.

With css utility class frameworks becoming more popular, I would like to bring this issue up again for review. We're using tailwindcss and having the class names come through in the breadcrumb history provides almost no assistance in debugging or reproducing the error.

For example we will see things like this.

Screenshot 2020-10-29 at 09 20 11

To remedy this I have had to implement our own custom code that inspects the target element and pulls some data from its attributes to get a more actionable log in sentry. I feel like having a standard data attribute (or being able to specify one) would provide a generic solution to this problem, falling back onto class names if the attribute doesn't exist.

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