My team is paying for, and using the sentry.io hosted version of this product.
We often find that Sentry's preference for grouping exceptions by Stack Trace is ill-suited to our use cases.
As an example, in our JS-side exception logging, our stack trace will almost always include a reference to the active URL (we use client-side routing, so this lives in JS-client state). This is an issue, because many URLs include user-generated IDs or other dynamic properties. Therefore for many classes of exceptions, the Stack Trace is almost guaranteed to be unique on every single instance.
Merging issues is useful, but in cases like the above, we may end up with thousands of unique instances of the same issue before we can catch and resolve it.
I'm sure there are a lot of approaches to this. Here are some of my ideas:
Here are some sample stack traces. Note that the only difference occurs in the very last line:
InvariantViolation: HandwritingPanelWithConfig was mounted for a problem type other than LatexAnswer
at call([native code])
at InvariantViolation(./ms-utils/appLogging/index.jsx:14:34)
at B(/static/cache/r2630/build/ms-pages/Work-369d6831b8229c055c35.js:1:61354)
at rg(../node_modules/react-dom/cjs/react-dom.production.min.js:133:308)
at d(../node_modules/react-dom/cjs/react-dom.production.min.js:161:87)
at f(../node_modules/react-dom/cjs/react-dom.production.min.js:161:414)
at g(../node_modules/react-dom/cjs/react-dom.production.min.js:162:149)
at m(../node_modules/react-dom/cjs/react-dom.production.min.js:169:88)
at w(../node_modules/react-dom/cjs/react-dom.production.min.js:168:412)
at rc(../node_modules/react-dom/cjs/react-dom.production.min.js:171:345)
at tc(../node_modules/react-dom/cjs/react-dom.production.min.js:54:262)
at vd(../node_modules/react-dom/cjs/react-dom.production.min.js:71:249)
at je([native code])
at wrapped(../node_modules/raven-js/src/raven.js:360:1)
at nrWrapper(/work/AdaptiveWorkout-****2329-****31:6:11782)
InvariantViolation: HandwritingPanelWithConfig was mounted for a problem type other than LatexAnswer
at call([native code])
at InvariantViolation(./ms-utils/appLogging/index.jsx:14:34)
at B(/static/cache/r2630/build/ms-pages/Work-369d6831b8229c055c35.js:1:61354)
at rg(../node_modules/react-dom/cjs/react-dom.production.min.js:132:491)
at d(../node_modules/react-dom/cjs/react-dom.production.min.js:161:87)
at f(../node_modules/react-dom/cjs/react-dom.production.min.js:161:414)
at g(../node_modules/react-dom/cjs/react-dom.production.min.js:162:149)
at m(../node_modules/react-dom/cjs/react-dom.production.min.js:169:88)
at w(../node_modules/react-dom/cjs/react-dom.production.min.js:168:412)
at rc(../node_modules/react-dom/cjs/react-dom.production.min.js:171:345)
at tc(../node_modules/react-dom/cjs/react-dom.production.min.js:54:262)
at vd(../node_modules/react-dom/cjs/react-dom.production.min.js:71:249)
at je([native code])
at wrapped(../node_modules/raven-js/src/raven.js:360:1)
at nrWrapper(/work/FastTrackWorkout-****66:6:11782)
We are also a paying customer and have the exact same issue.
Maybe you can look into https://blog.sentry.io/2018/01/18/setting-up-custom-fingerprints.
We are having the same issue, and it appears that the issue is because we have New Relic browser installed as well.
the nrWrapper is an inline script, so it includes the URL of the page, meaning we get an issue for every page.
Can we please get a way to ignore the URL of an inline script when grouping? or some way for Sentry to work nicer with new relic?
This is how we solved it:
Sentry.init({
...other config...,
integrations: [
new Sentry.Integrations.RewriteFrames({
iteratee: function (frame) {
// This is un-related to ignoring NewRelic, but good to have to show the "App Only" thing in Sentry
frame.in_app = frame.filename.includes(window.location.hostname) && !frame.filename.includes('/vendor.');
// This stops NewRelic from causing the stack trace to be different on every single page.
if (/nrWrapper/.test(frame.function)) {
frame.filename = '?';
frame.lineno = 0;
frame.colno = 0;
frame.in_app = false;
}
return frame;
}
})
],
)
Most helpful comment
This is how we solved it: