From afff597ac35210db45c52f689cee16fb21c0b6f2 Mon Sep 17 00:00:00 2001 From: EddeCCC Date: Wed, 11 Oct 2023 18:41:17 +0200 Subject: [PATCH] refactor addUrlParams() --- src/impl/instrumentation/urlParams.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/impl/instrumentation/urlParams.ts b/src/impl/instrumentation/urlParams.ts index 6e398ac..5ceeb2f 100644 --- a/src/impl/instrumentation/urlParams.ts +++ b/src/impl/instrumentation/urlParams.ts @@ -15,7 +15,8 @@ export function addUrlParams(span: Span, url: string, excludeKeys: string[] = [] const [key, value] = keyValue.split("="); span.setAttribute(key, value); - if(excludeKeys && !excludeKeys.includes(key)) window.BOOMR.addVar(key, value); + // if excludeKey equals null OR key is not included, add var to beacon + if(!excludeKeys || !excludeKeys.includes(key)) window.BOOMR.addVar(key, value); } } }