Problem with includePaths / "App Only"

I’m using raven-js to log errors to an on-premise install of Sentry for a web application. I’m setting my ‘includePaths’ property to include both the domain of the site as well as the CDN domain name. Based on the documentation This should whitelist all file paths in the stacktrace that match that regex as being part of my app. When I then look at the app in the Sentry web app it mysteriously shows only shows 2 of the stacktrace frames in the “App Only” tab. I need to switch to the “Full” tab to see all 26 frames.

I inspected the network request to the Sentry API when the error is sent and have confirmed that ‘exception.values[].stacktrace.frames[].in_app’ is set to true for each of the frames I care about. I would expect the “App Only” tab to show all frames where this is true. Am I misunderstanding how this is supposed to work?

Thanks!

Hi, we also have special logic to detect when that flag is not reliable (i.e. if all frames have this flag set, all are set to false). In principle the in_app flag should work for this, yeah. Could you share a concrete event?

Ok, if I set my “includePaths: [‘https://myserver.com/components’]” so that not all frames have it set to true then I get a POST body as seen below and the “App Only” tab does not show up:

“project”: “2”,
“logger”: “ErrorBoundary”,
“platform”: “javascript”,
“request”: {
“headers”: {
“User-Agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36”
},
“url”: “https://myserver.com/
},
“exception”: {
“values”: [{
“type”: “Error”,
“value”: “A new fake error in render”,
“stacktrace”: {
“frames”: [{
“filename”: “”,
“lineno”: null,
“colno”: null,
“function”: “?”,
“in_app”: false
}, {
“filename”: “https://myserver.com/components/dist/@ta/platform.runtime.87e5a4d25a.js”,
“lineno”: 521,
“colno”: 68,
“function”: “?”,
“in_app”: true
}, {
“filename”: “”,
“lineno”: null,
“colno”: null,
“function”: “Array.forEach”,
“in_app”: false
}, {
“filename”: “https://myserver.com/components/dist/@ta/platform.runtime.87e5a4d25a.js”,
“lineno”: 525,
“colno”: 7,
“function”: “?”,
“in_app”: true
}, {
“filename”: “https://myserver.com/js3/src/ta/rollupAmdShim-v22934486216m.js”,
“lineno”: 286,
“colno”: 20,
“function”: “newRequire”,
“in_app”: false
}, {
“filename”: “https://myserver.com/components/dist/@ta/platform.runtime.87e5a4d25a.js”,
“lineno”: 527,
“colno”: 65,
“function”: “?”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39778,
“colno”: 12,
“function”: “render”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39719,
“colno”: 17,
“function”: “legacyRenderSubtreeIntoContainer”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35792,
“colno”: 12,
“function”: “Object.unbatchedUpdates”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39723,
“colno”: 14,
“function”: “?”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39304,
“colno”: 15,
“function”: “ReactRoot…/node_modules/react-dom/cjs/react-dom.development.js.ReactRoot.render”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 36000,
“colno”: 14,
“function”: “Object.updateContainer”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35973,
“colno”: 12,
“function”: “updateContainerAtExpirationTime”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35945,
“colno”: 5,
“function”: “scheduleRootUpdate”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35317,
“colno”: 12,
“function”: “scheduleWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35357,
“colno”: 13,
“function”: “scheduleWorkImpl”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35482,
“colno”: 7,
“function”: “requestWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35582,
“colno”: 5,
“function”: “performSyncWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35605,
“colno”: 9,
“function”: “performWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35684,
“colno”: 24,
“function”: “performWorkOnRoot”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35109,
“colno”: 9,
“function”: “renderRoot”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35078,
“colno”: 26,
“function”: “workLoop”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35049,
“colno”: 16,
“function”: “performUnitOfWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 32213,
“colno”: 16,
“function”: “beginWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 31809,
“colno”: 15,
“function”: “mountIndeterminateComponent”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/brand.footer.0eaaa063c1.js”,
“lineno”: 211,
“colno”: 9,
“function”: “FooterContainer”,
“in_app”: true
}]
}
}],
“mechanism”: {
“type”: “generic”,
“handled”: true
}
},
“transaction”: “https://myserver.com/components/dist/brand.footer.0eaaa063c1.js”,
“trimHeadFrames”: 0,
“tags”: {
“branch”: “MAINLINE”,
“hostName”: “myserver.com”,
“isLoggedInMember”: false
},
“breadcrumbs”: {
“values”: [{
“timestamp”: 1533736274.725,
“category”: “sentry”,
“message”: “Error: A new fake error in render”,
“event_id”: “6bee2633db594680b322dabf62e345a3”,
“level”: “error”
}, {
“timestamp”: 1533736274.754,
“message”: “The above error occurred in the component:\n in FooterContainer (created by DataCacher(FooterContainer))\n in DataCacher(FooterContainer) (created by Connect(DataCacher(FooterContainer)))\n in Connect(DataCacher(FooterContainer))\n in Router (created by Connect(Router))\n in Connect(Router) (created by Root)\n in ApolloProvider (created by Apollo)\n in Apollo (created by Root)\n in Provider (created by Root)\n in Root\n in ErrorBoundary\n\nReact will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.”,
“level”: “error”,
“category”: “console”
}]
},
“environment”: “MAINLINE”,
“release”: 1240828,
“server_name”: “myserver.com”,
“event_id”: “40e874c6224147f4bb38186106d62781”
}

If I set my “includePaths:[‘https://myserver.com’]” like I originally stated my problem (that being both my web server and CDN path in dev) most all frames are set to true and “App Only” shows up but with stuff I don’t care about primarily. I really want to see the “FooterContainer” portion of the stack trace.

{
“project”: “2”,
“logger”: “ErrorBoundary”,
“platform”: “javascript”,
“request”: {
“headers”: {
“User-Agent”: “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36”
},
“url”: “https://myserver.com/
},
“exception”: {
“values”: [{
“type”: “Error”,
“value”: “A new fake error in render”,
“stacktrace”: {
“frames”: [{
“filename”: “”,
“lineno”: null,
“colno”: null,
“function”: “?”,
“in_app”: false
}, {
“filename”: “https://myserver.com/components/dist/@ta/platform.runtime.87e5a4d25a.js”,
“lineno”: 521,
“colno”: 68,
“function”: “?”,
“in_app”: true
}, {
“filename”: “”,
“lineno”: null,
“colno”: null,
“function”: “Array.forEach”,
“in_app”: false
}, {
“filename”: “https://myserver.com/components/dist/@ta/platform.runtime.87e5a4d25a.js”,
“lineno”: 525,
“colno”: 7,
“function”: “?”,
“in_app”: true
}, {
“filename”: “https://myserver.com/js3/src/ta/rollupAmdShim-v22934486216m.js”,
“lineno”: 286,
“colno”: 20,
“function”: “newRequire”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/platform.runtime.87e5a4d25a.js”,
“lineno”: 527,
“colno”: 65,
“function”: “?”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39778,
“colno”: 12,
“function”: “render”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39719,
“colno”: 17,
“function”: “legacyRenderSubtreeIntoContainer”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35792,
“colno”: 12,
“function”: “Object.unbatchedUpdates”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39723,
“colno”: 14,
“function”: “?”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 39304,
“colno”: 15,
“function”: “ReactRoot…/node_modules/react-dom/cjs/react-dom.development.js.ReactRoot.render”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 36000,
“colno”: 14,
“function”: “Object.updateContainer”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35973,
“colno”: 12,
“function”: “updateContainerAtExpirationTime”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35945,
“colno”: 5,
“function”: “scheduleRootUpdate”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35317,
“colno”: 12,
“function”: “scheduleWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35357,
“colno”: 13,
“function”: “scheduleWorkImpl”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35482,
“colno”: 7,
“function”: “requestWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35582,
“colno”: 5,
“function”: “performSyncWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35605,
“colno”: 9,
“function”: “performWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35684,
“colno”: 24,
“function”: “performWorkOnRoot”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35109,
“colno”: 9,
“function”: “renderRoot”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35078,
“colno”: 26,
“function”: “workLoop”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 35049,
“colno”: 16,
“function”: “performUnitOfWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 32213,
“colno”: 16,
“function”: “beginWork”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/@ta/common.global.5919f9defd.js”,
“lineno”: 31809,
“colno”: 15,
“function”: “mountIndeterminateComponent”,
“in_app”: true
}, {
“filename”: “https://myserver.com/components/dist/brand.footer.0eaaa063c1.js”,
“lineno”: 211,
“colno”: 9,
“function”: “FooterContainer”,
“in_app”: true
}]
}
}],
“mechanism”: {
“type”: “generic”,
“handled”: true
}
},
“transaction”: “https://myserver.com/components/dist/brand.footer.0eaaa063c1.js”,
“trimHeadFrames”: 0,
“tags”: {
“branch”: “MAINLINE”,
“hostName”: “myserver.com”,
“isLoggedInMember”: false
},
“breadcrumbs”: {
“values”: [{
“timestamp”: 1533736915.139,
“category”: “sentry”,
“message”: “Error: A new fake error in render”,
“event_id”: “a1c909bce0c74edfa591276527a50d06”,
“level”: “error”
}, {
“timestamp”: 1533736915.173,
“message”: “The above error occurred in the component:\n in FooterContainer (created by DataCacher(FooterContainer))\n in DataCacher(FooterContainer) (created by Connect(DataCacher(FooterContainer)))\n in Connect(DataCacher(FooterContainer))\n in Router (created by Connect(Router))\n in Connect(Router) (created by Root)\n in ApolloProvider (created by Apollo)\n in Apollo (created by Root)\n in Provider (created by Root)\n in Root\n in ErrorBoundary\n\nReact will try to recreate this component tree from scratch using the error boundary you provided, ErrorBoundary.”,
“level”: “error”,
“category”: “console”
}]
},
“environment”: “MAINLINE”,
“release”: 1240828,
“server_name”: “myserver.com”,
“event_id”: “4e9a05e6159a46a4a5564f0224a969c3”
}

Bump

@bourds Hi, sorry for the delay. Your first event payload (with includePaths: myserver.com/components) looks pretty good. Could you share the corresponding event how it’s rendered in sentry?

Thanks