Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add data-sentry string to the breadcrumb message #5100

Merged
merged 2 commits into from
Sep 10, 2019
Merged

Add data-sentry string to the breadcrumb message #5100

merged 2 commits into from
Sep 10, 2019

Conversation

fredj
Copy link
Member

@fredj fredj commented Aug 29, 2019

No description provided.

@sbrunner sbrunner added this to the 2.5 milestone Sep 2, 2019
@fredj fredj requested a review from sbrunner September 9, 2019 11:07
const message = target.dataset.sentry;
if (message) {
breadcrumb.message = `${breadcrumb.message} | ${message}`;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we have more information with something like:?

const tags = []

function browse(element) {
    if (element) {
        const message = target.dataset.sentry;
        if (message) {
            tags.append(`${element.tagName}.${message}`);
        } else {
            tags.append(element.tagName);
        }
        browse(element.parentElement);
    }
}

browse(hint.event.target);
if (tags) {
  breadcrumb.message = `${breadcrumb.message} | ${tags.join('-')}`;
}

@fredj fredj merged commit 53ec2c7 into master Sep 10, 2019
@fredj fredj deleted the sentry_debug branch September 10, 2019 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants