Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function setContext(isBackground, context) {
console.log('setting context:', isBackground, context);
cachedContext = context;
GATracker.set('userId', context.reportingUUID);
GATracker.set('dimension1', context.tags.hasFullVersion ? 'full' : 'free');
GATracker.set('dimension2', context.tags.isDeveloper ? 'yes' : 'no');
GATracker.set('dimension5', context.tags.licenseState);
Raven.setUserContext(context.user);
context.tags.isBackground = isBackground; // eslint-disable-line no-param-reassign
Raven.setTagsContext(context.tags);
}
function setContext(isBackground, context) {
console.log('setting context:', isBackground, context);
cachedContext = context;
GATracker.set('userId', context.reportingUUID);
GATracker.set('dimension1', context.tags.hasFullVersion ? 'full' : 'free');
GATracker.set('dimension2', context.tags.isDeveloper ? 'yes' : 'no');
Raven.setUserContext(context.user);
context.tags.isBackground = isBackground; // eslint-disable-line no-param-reassign
Raven.setTagsContext(context.tags);
}
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
import Raven from 'raven-js';
if (process.env.ENABLE_SENTRY) {
Raven.config('https://f7710348f19c4a0f8f8cd83ea0aa343f@sentry.io/1259561', {
release: process.env.GIT_REVISION, // use git revision as release? {{process.env.GIT_REVISION}}
environment: 'development-test',
tags: {
module: process.env.NAME,
},
}).install();
if (game) {
Raven.setTagsContext({
shard: game.shardID,
});
Raven.setUserContext({
id: game.selfPlayerState.characterID,
});
}
setTimeout(() => {
Raven.setTagsContext({
shard: game.shardID,
});
Raven.setUserContext({
id: game.selfPlayerState.characterID,
});
}, 1000);
}
ROW_MODE,
COLUMN_MODE,
MESSAGE_VIEW_MODE,
CONVERSATION_VIEW_MODE,
CLIENT_TYPE,
MAX_SIZE_SCREENSHOT
} from '../../constants';
import CONFIG from '../../config';
import { getOS, getBrowser, getDevice } from '../../../helpers/browser';
import { toBase64 } from '../../../helpers/fileHelper';
import { downSize, toBlob } from '../../../helpers/imageHelper';
Raven.config(CONFIG.sentry.sentry, {
release: CONFIG.sentry.release
}).install();
Raven.setTagsContext({
appVersion: CONFIG.app_version
});
/* @ngInject */
function bugReportApi(
Report,
$state,
addressesModel,
authentication,
gettextCatalog,
networkActivityTracker,
notification
) {
const MAP_MODE = {
layout: {
[ROW_MODE]: 'row',
componentDidMount() {
if (window.location.host.includes('expo.io')) {
Raven.config('https://6501f7d527764d85b045b0ce31927c75@sentry.io/191351').install();
const build_date = new Date(process.env.BUILD_TIMESTAMP || 0).toUTCString();
Raven.setTagsContext({ build_date });
Segment.getInstance().identify({ build_date });
}
if (this.state.wasUpgraded) {
Segment.getInstance().logEvent('LOADED_UNSUPPORTED_VERSION', {
requestedVersion: this.state.initialSdkVersion,
snackId: this.props.match.params.id,
});
}
// @ts-ignore
this._snackSessionWorker = new Worker('../workers/snack-session.worker', { type: 'module' });
this._snack = create(this._snackSessionWorker);
this._initializeSnackSession();
id: '123'
});
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" });
public async setTagsContext(tags?: { [key: string]: any }) {
Raven.setTagsContext(tags);
return this;
}
loadRavenData: function() {
let profile = context.profile;
let userContext = {
id: profile.get("user"),
email: profile.get("email"),
username: profile.get("username")
};
if (context.hasEmulatedSession()) {
userContext.emulated = true;
userContext.emulator = context.getEmulator();
}
Raven.setUserContext(userContext);
Raven.setTagsContext(window.SENTRY_TAGS);
},
export function clearRavenLoginType() {
Raven.setTagsContext({ loginType: undefined });
}