getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.87k stars 1.55k forks source link

Render More Attributes (ng-*) #576

Closed mitsuhiko closed 6 years ago

mitsuhiko commented 8 years ago

Current rendering:

div.well.ng-scope > div.ng-scope > div > button.btn.btn-lg.btn-primary

For angular and others it would be nice to include some attributes like ng-click and friends:

div.well.ng-scope > div.ng-scope > div > button.btn.btn-lg.btn-primary[ng-click="uploadFile()"]

Originally reported here: https://github.com/getsentry/sentry/issues/3220

mitsuhiko commented 8 years ago

See also https://github.com/getsentry/raven-js/issues/577

takahashi64 commented 7 years ago

Hi there. For complex UI, the click breadcrumbs don't have enough detail - can you not include the XPATH of the element that is clicked? Otherwise its sometimes not possible to work out which element was clicked.

bradleypriest commented 6 years ago

Running into this myself, we'd love to be able to add the ember component name, or input HTML name to the breadcrumb.

What about leaving the default and exposing a config somewhere?

These would all give us the power.

adamreisnz commented 6 years ago

I'd like to chime in here as well. Instead of adding Angular or Ember or whatever framework specific data, I would prefer a custom tag, e.g. data-sentry-id="Some text here" which would give us the most control over how to identify certain elements. The classnames currently don't give us any useful information, and we don't use ID's for elements. Adding ng- stuff won't help either because there's so much of it in the codebase.

kamilogorek commented 6 years ago

I'll close this one for now, as we're aware of this missing piece and we'll be revisiting how this thing is working in the next major version.

Ref: https://github.com/getsentry/raven-js/issues/783 Ref: https://github.com/getsentry/raven-js/issues/577