New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exceptions in/before app route init hook are not reported #164
Comments
Basically, sentry should be the first thing that's loaded in the app, to make sure any issues loading are identified |
While I agree in theory, this is somewhat hard to achieve since the service and the config are only available after the app has booted. |
I'm going to try hacking around with putting this addon's code in app.js... maybe just transform my service into a global wrapper around raven/sentry... although the most bulletproof way to handle this is load raven from the cdn, (in case there's an issue loading our app code), and then I guess in the index.html, put configuration/initialization stuff... |
What do you think is the best way to go about this @Turbo87? |
I don't know, I'm on vacation right now. Will think about it when I get back :) |
While I started to screw around with putting the ravenjs cdn tags in the index.html and then considered forking this addon and making it reference the global window.Raven, it seems the best thing to do is to just set a few things up manually according to these instructions in the readme for ember-cli-deploy-sentry: https://github.com/dschmidt/ember-cli-deploy-sentry#manual-integration-with-raven-js At the end of the day I don't understand why this addon can't run before app.js starts. Or at the very least, add an initialization hook could be called inside app.js to get things booted+configured properly, before any custom application logic executes. (Could even pass in the config, which I think is imported in app.js by default) (psssst: resources failing to load prior to this point in app.js will not necessarily be detected, if you need to detect resources failing to load and try re-loading any css+js files, lmk I'd be happy to work with you in some capacity) I think something could be inserted into the index.html's |
using the CDN makes an additional HTTP request and makes your app depend on a third-party server. for some users this is not an option, so we explicitly removed that option in one of the last releases. most of the time it's a lot easier to just bundle the most recent version of their client in your |
If I try calling captureException in or before the application route init hook, before isRavenUsable becomes true, the error will not be reported to sentry. I'll need to store calls in a que in my logging service, and then flush the que once isRavenUsable becomes true. I tried observing isRavenUsable, but that is not firing. I am not too sure what to do other than not use this addon, or try and fix this addon, but not sure where I'd start for that.. when exactly is raven setup?
The text was updated successfully, but these errors were encountered: