From ab63bbed411231c46bbad4476902e7ed6ff376c2 Mon Sep 17 00:00:00 2001 From: Andra Constantin Date: Tue, 10 Dec 2024 13:45:39 -0500 Subject: [PATCH] condition sessionId trace on consent --- src/backend/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/index.ts b/src/backend/index.ts index d582ee2b7b..2e72a5ec23 100644 --- a/src/backend/index.ts +++ b/src/backend/index.ts @@ -54,9 +54,9 @@ const whiteListedErrorUrls = [ // Create an axios instance to allow for attaching interceptors to it. const axiosInstance = axios.create({ baseURL: apiBaseURL }); axiosInstance.interceptors.request.use((config: InternalAxiosRequestConfig) => { - config.headers.sessionId = getSessionId(); LocalStorage.getCurrentUser()?.otelConsent - ? (config.headers.otelConsent = true) + ? ((config.headers.otelConsent = true), + (config.headers.sessionId = getSessionId())) : (config.headers.otelConsent = false); return config; });