How to use the context function from raven

Find comprehensive JavaScript raven.context code examples handpicked from public code repositorys.

10
11
12
13
14
15
16
17
18
19
20
    Raven.config(process.env.SENTRY_DSN).install();
};


function raven_report(e, context_opts) {
    if(process.env.SENTRY_DSN) {
        Raven.context(function () {
            if(context_opts) {
                Raven.setContext(context_opts);
            };

fork icon38
star icon63
watch icon0

11
12
13
14
15
16
17
18
19
20
/* istanbul ignore next */
const taskName = scope.name || scope._name || eggUtils.getCalleeFromStack(true)
if (domain.active) {
  contextRunInBackground()
} else {
  Raven.context(contextRunInBackground)
}

async function contextRunInBackground () {
  Raven.mergeContext({ req: ctx.request })
fork icon0
star icon0
watch icon9