From 5deec264bc117de9c4b5e24827a9cb909ff0b3e5 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sun, 10 May 2020 16:24:34 -0700 Subject: [PATCH] chore: Add request-id to error tracking --- server/app.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/app.js b/server/app.js index 13ef2ba41..297656f59 100644 --- a/server/app.js +++ b/server/app.js @@ -105,6 +105,10 @@ app.on('error', (error, ctx) => { if (process.env.SENTRY_DSN) { Sentry.withScope(function(scope) { + const requestId = ctx.headers['x-request-id']; + if (requestId) { + scope.setTag('request_id', requestId); + } scope.addEventProcessor(function(event) { return Sentry.Handlers.parseRequest(event, ctx.request); });