From 9b273610db94b1becedbb001bab9a77c79c60c17 Mon Sep 17 00:00:00 2001 From: Floyd Haremsa Date: Sun, 16 Apr 2023 17:58:01 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=EF=B8=8F=20Load=20insights=20to=20?= =?UTF-8?q?let=20errors=20be=20displayed=20in=20the=20console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client-v2/src/app/services/insights.service.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client-v2/src/app/services/insights.service.ts b/client-v2/src/app/services/insights.service.ts index 36d7e05a..d7896dc0 100644 --- a/client-v2/src/app/services/insights.service.ts +++ b/client-v2/src/app/services/insights.service.ts @@ -18,9 +18,9 @@ export class InsightsService { if (environment.CONTEXT != 'Production') console.info('Insights enabled:', enableInsights, enableInsights ? `with role: ${role}` : '') - if (!enableInsights) return + this.appInsights.loadAppInsights() // insights need to be loaded, in order to display errors correctly - this.appInsights.loadAppInsights() + if (!enableInsights) return this.appInsights.addTelemetryInitializer(envelope => { if (envelope.tags) envelope.tags['ai.cloud.role'] = role