Closed joshkel closed 1 year ago
Hey, thanks for writing in! I think this is a worthwhile change. Not sure if we want to change serializeAttribute
(to avoid breaking changes as much as possible), perhaps we introduce another option? I'll backlog for now, but PRs are welcome!
Closing - PRs welcome :)
I'm working on making our application's Sentry's
ui.click
breadcrumbs more useful, but I'm running into some challenges, because the framework we're using (Material-UI) creates long lists of class names that quickly exceedMAX_OUTPUT_LEN
. Here's an example from what I was working on today:I was hoping that
div#MyInterestingListItem
would show up in the breadcrumbs if the user clicks the innerspan
orp
, but the class lists are so long that I instead see little more than thespan
orp
.I saw that I can customize the Breadcrumbs integration by passing my own
serializeAttribute
list, but that doesn't seem to suffice: if none of the attributes I list are found, then Sentry falls back to including the class list after all.Would it be worthwhile to add an option to never include classes? Or would it be worthwhile to change the behavior of
serializeAttribute
so that, if it's specified and results in an empty list, Sentry accepts that instead of falling back to['id', 'class']
? (In an ideal world, perhaps, Sentry could summarize the class list and only include "interesting" DOM nodes. However, figuring out reliable logic for summarizing arbitrary class names and filtering interesting DOM notes does not at all seem practical.)