-
Notifications
You must be signed in to change notification settings - Fork 211
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
Initialization code #104
Comments
Great question. We recently changed the snippet to fix some bugs related to RequireJS/AMD use-cases of the library. Ideally, the snippet will not change very often. The initialization code in the snippet is so long because we support the full API before the full implementation is downloaded. e.g. var _rollbarConfig = {accessToken: '54321'};
// Snippet goes here...
// Creates a child notifier and sends a message with a different access token
// before the "full" rollbar implementation is downloaded.
var tmp = window.Rollbar.scope({custom: 'field'});
tmp.configure({accessToken: '...'});
tmp.error('Hello world'); I'm assuming you are referring to https://github.com/davewasmer/ember-cli-rollbar/blob/master/index.js#L23 when you say, "I have to manually update every time...". One way to get around this would be to add rollbar.js as a submodule and have a build step copy I hope that answers your question. Also, thanks for building and maintaining this lib! 😄 |
Thanks for the quick response @coryvirok. Makes sense now. I'll probably keep it as is (the |
Just curious - is there any reason why you run a decent amount of initialization code before the library even loads (the snippet that is copy/paste from the app)?
I maintain ember-cli-rollbar, and since the snippet seems to use private APIs in the library, it's a bit more onerous for me to keep up with changes. I have to manually update every time there is a new version, rather than simply fetching whatever version the user wants.
Hopefully that question makes sense 😄
The text was updated successfully, but these errors were encountered: