How to use the mergeContext function from raven
Find comprehensive JavaScript raven.mergeContext code examples handpicked from public code repositorys.
54 55 56 57 58 59 60 61 62 63
req.user = req.user || {} const token = req.headers['access-token'] const { id: userId } = jwtDecode(token, { secret }) raven.setContext({}) try { raven.mergeContext({ user: { id: userId }, tags: { component: 'api', platform: toLower(get(req, 'headers.platform')),
3
5
0
+ 3 other calls in file
GitHub: rokid/egg-raven
15 16 17 18 19 20 21 22 23 24
} else { Raven.context(contextRunInBackground) } async function contextRunInBackground () { Raven.mergeContext({ req: ctx.request }) // use app.toAsyncFunction to support both generator function and async function try { await ctx.app.toAsyncFunction(scope)(ctx) ctx.coreLogger.info('[egg:background] task:%s success (%dms)', taskName, Date.now() - start)
0
0
9
+ 3 other calls in file
raven.captureException is the most popular function in raven (228 examples)