From 19880b8f1fb3486649caef65377d0baaaee97a0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Oliver=20S=C3=B8berg?= <82504565+sebassonav@users.noreply.github.com> Date: Fri, 6 Dec 2024 13:44:20 +0100 Subject: [PATCH] Tracke kall fra pensjonselvbetjening (#6580) --- .../kotlin/no/nav/etterlatte/samordning/LoggingPlugins.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/etterlatte-api/src/main/kotlin/no/nav/etterlatte/samordning/LoggingPlugins.kt b/apps/etterlatte-api/src/main/kotlin/no/nav/etterlatte/samordning/LoggingPlugins.kt index 1fb83c697b2..f7b811f23f4 100644 --- a/apps/etterlatte-api/src/main/kotlin/no/nav/etterlatte/samordning/LoggingPlugins.kt +++ b/apps/etterlatte-api/src/main/kotlin/no/nav/etterlatte/samordning/LoggingPlugins.kt @@ -54,6 +54,7 @@ private object UserIdMdcHook : Hook Unit> { } } +private val X_NAV_CALL_ID = "x_Nav-Call-Id" val userIdMdcPlugin: RouteScopedPlugin = createRouteScopedPlugin( name = "UserIdMdcPlugin", @@ -81,6 +82,10 @@ val userIdMdcPlugin: RouteScopedPlugin = "Ukjent" } + val callIdOptional = call.request.headers[X_NAV_CALL_ID] + if (callIdOptional != null) { + MDC.put(X_NAV_CALL_ID, callIdOptional) + } MDC.put(X_USER, user) call.attributes.put(userAttribute, user)