docs/changelog/v4.md
Sentry SDK v4 is no longer supported. We recommend migrating to the latest version of the SDK. You can start by
migrating from v4 of the SDK to v5 by following the migration guide.
SENTRY_RELEASE and SENTRY_ENVIRONMENT if presenttslib_1__default regression and add additional tests around itinit has been called in an onload callbackinboundFilter methodsinit calls have been changed to "latest wins" instead of "ignore all after first"flush method which currently is an alias for closeoptions.dsn is undefined when calling init we try to load it from process.env.SENTRY_DSNflush and close on Sentry.*sentry to express error handler response which contains the event_id of the errorDOMError and DOMException should be error level eventsdecycle util functiondecycle util functionwrap method to hide internal Sentry flagsfill util<unlabeled> event for unhandledRejectioncaptureEvent, prefer sendEvent for transports. sendEvent now takes a string (body)
instead of Event object.RequestBuffer to PromiseBuffer, also introduce limitframeContextLines, if set to 0 we do not provide source code pre/post context, default is
7 lines pre/postserialize method to prevent circular referencesReportingObserver integration to "pluggable" making it an opt-in integrationpath / fs for store.tswithScope in Ember integration instead of manual pushPop/popScope callsEmber integration (#1696)LinkedErrors integration to send exceptions in correct order and take main exception into the
limit countaddGlobalEventProcessorInboundFilters integration so that it reads and merge configuration from the init call as wellbundlerSafeRequire renamed to dynamicRequire now takes two arguments, first is should be module, second
request / moduleName.Integration interface.parseRequest on Handlers.domain in getCurrentHub in try/catch - Fixed #1670addBreadcrumb sync internally, beforeBreadcrumb is now only syncconsole guard in beforeBreadcrumbClient. This means that when binding a new Client to the Hub the client
itself can decide which integration should run.reason is not availabledetail.reason for promise rejectionsReportDialogOptionsrun function that makes this hub the current global oneforceLoad and onLoad function to be compatible with loader APIblacklistUrl/whitelistUrl debug modeevent_id for user-facing logs@sentry/core and reexposed through browser/nodeThis is the release of our new SDKs, @sentry/browser, @sentry/node. While there are too many changes to list for
this release, we will keep a consistent changelog for upcoming new releases. raven-js (our legacy JavaScript/Browser
SDK) and raven (our legacy Node.js SDK) will still reside in this repo, but they will receive their own changelog.
We generally guide people to use our new SDKs from this point onward. The migration should be straightforward if you were only using the basic features of our previous SDKs.
raven-js and raven will both still receive bugfixes but all the new features implemented will only work in the new
SDKs. The new SDKs are completely written in TypeScript, which means all functions, classes and properties are typed.
Here are some examples of how the new SDKs work. Please note that the API for all JavaScript SDKs is the same.
Old:
Raven.config('___PUBLIC_DSN___', {
release: '1.3.0',
}).install();
New:
Sentry.init({
dsn: '___PUBLIC_DSN___',
release: '1.3.0',
});
Old:
Raven.setTagsContext({ key: 'value' });
New:
Sentry.configureScope(scope => {
scope.setTag('key', 'value');
});
Old:
try {
throwingFunction();
} catch (e) {
Raven.captureException(e, { extra: { debug: false } });
}
New:
try {
throwingFunction();
} catch (e) {
Sentry.withScope(scope => {
scope.setExtra('debug', false);
Sentry.captureException(e);
});
}
Old:
Raven.captureMessage('test', 'info', { extra: { debug: false } });
New:
Sentry.withScope(scope => {
scope.setExtra('debug', false);
Sentry.captureMessage('test', 'info');
});
Old:
Raven.captureBreadcrumb({
message: 'Item added to shopping cart',
category: 'action',
data: {
isbn: '978-1617290541',
cartSize: '3',
},
});
New:
Sentry.addBreadcrumb({
message: 'Item added to shopping cart',
category: 'action',
data: {
isbn: '978-1617290541',
cartSize: '3',
},
});