Skip to content

Commit

Permalink
🚑️ Load insights to let errors be displayed in the console
Browse files Browse the repository at this point in the history
  • Loading branch information
floydnant committed Apr 16, 2023
1 parent 9ba4df9 commit 9b27361
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client-v2/src/app/services/insights.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b27361

Please sign in to comment.