Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const setExtraContext = (state, action) => {
actions = [action, ...actions].slice(0, 100); // last 100 actions
const context = contextWithoutPrivateData(state, actions);
Raven.setExtraContext(context);
};
RavenJS.captureMessage('Broken!');
RavenJS.captureMessage('Broken!', {tags: { key: "value" }});
RavenJS.showReportDialog({
eventId: 0815,
dsn:'1337asdf',
user: {
name: 'DefenitelyTyped',
email: 'df@ts.ms'
}
});
RavenJS.setTagsContext({ key: "value" });
RavenJS.setExtraContext({ foo: "bar" });
setExtraContext(extra) {
Raven.setExtraContext(extra);
}
_initializeSentry() {
const environment = getEnvironment();
const context = {
environment,
release: this._browser.runtime.getManifest().version,
};
if (environment !== 'development') {
Raven.config('https://119c2693bc2a4ed18052ef40ce4adc3c@sentry.io/1218490', context).install();
Raven.setExtraContext(context);
}
}
public async setExtraContext(extra?: { [key: string]: any }) {
Raven.setExtraContext(extra);
return this;
}