Summary
Ability to filter breadcrumbs generated
Type
Feature
Description
Right now you can enable/disable breadcrumbs based on type that is awesome.
I would like the ability to have interceptor when breadcrumb is added.
_Why_
/sockjs-node/info that I also would like to filter out.Note: At this moment I'm filtering breadcrumbs using beforeSend, but this has the limitation that I can have a maximum of 40 breadcrumbs and I will loose what is important.
Hi @darkyndy, we're implementing onBreadcrumb callbacks in the next major version. This should give you exactly what you want.
Nice to hear that is on the priorities.
Could I help with coding for this feature?
It's actually already on the v7 branch, but it's a part of a large ongoing refactor which will be released at some point in the new year. Thanks though!
I'd love to explore opening this again. I do like the onBreadcrumb event listener, but it would be great if they could contain actual events attached to the callback.
The use case is that we want to be able to filter out any data that has a specific data attribute on it or a parent element (our use case is to hide PII). With the current implementation, we are given the selector, but it only gives us class/id information about the element and sometimes that "click" on an element triggers a change of classes so the selector that is provided no longer matches the element that was clicked on.
I'm thinking that it could be added without affecting the API (no breaking changes) if it is provided as a secondary argument.
Most helpful comment
I'd love to explore opening this again. I do like the
onBreadcrumbevent listener, but it would be great if they could contain actual events attached to the callback.The use case is that we want to be able to filter out any data that has a specific data attribute on it or a parent element (our use case is to hide PII). With the current implementation, we are given the selector, but it only gives us class/id information about the element and sometimes that "click" on an element triggers a change of classes so the selector that is provided no longer matches the element that was clicked on.
I'm thinking that it could be added without affecting the API (no breaking changes) if it is provided as a secondary argument.