Raven.js 2.0.0 now transmits error reports to the Sentry server using HTTP POST, unlike previous versions which used HTTP GET. This means that exception data is no longer limited by browsers’ URI character length limits, putting an end to 417 HTTP errors (URI too long), and allowing developers to transmit additional
extra data fields without worry.
Note that if you are using Sentry On-Premise, you must be using Sentry server v8 in order for HTTP POST requests to work.
To give you complete stack traces in all browsers, Raven.js 2.0.0 extends browser built-ins like
addEventListener in order to automatically wrap and capture errors from your functions. We’ve found this gives better stack trace results in Safari 9.x and earlier, Internet Explorer 10, and even the new Microsoft Edge.
We’ve removed these plugins because they’re no longer necessary – by more aggressively wrapping browser built-ins, we’re removed the need to have dedicated plugins for some libraries. You’ll still get the same full stack traces from errors triggered inside jQuery and/or Backbone applications as before, but without the need to declare additional plugin dependencies.
This means that if you were previously using a “plugin” variant from the Raven CDN, e.g.
You’ll now only need the following in 2.0.0:
The Angular error tracking, Ember error tracking, and React error tracking plugins are still available because these frameworks provide their own global error handler hook for framework-specific errors and warnings.
However, if you use these plugins via CommonJS (either using Browserify or Webpack), the API for including them has changed:
var Raven = require('raven-js'); Raven .config('YOUR DSN') .addPlugin(require('raven-js/plugins/angular')) .install();
If you load raven-js and plugins directly from our CDN, don’t worry – you don’t have to change anything.
Despite most of the changes above being transparent to users, the reason we’re labeling this version 2.0.0 is because the Raven.js project is now following Semver (Semantic Versioning). Any future incompatible API changes will constitute a new major version (e.g. 3.0.0). So you can feel confident that pinning to “^2.0.0” won’t accidentally cause your build to download an incompatible version of Raven.js.
As always, Raven.js can be served directly from our CDN:
Or installed using npm (and bundled with Browserify or Webpack):
$ npm install firstname.lastname@example.org
That about covers what’s new in this version. As always, we appreciate your feedback and concerns.