Skip to content

Commit

Permalink
Fix ITelemetryItem tags initialisation in sample (#106)
Browse files Browse the repository at this point in the history
This has changed in 3.1.0, see microsoft/ApplicationInsights-JS#2269
  • Loading branch information
KuSh authored Aug 12, 2024
1 parent bd85877 commit fa7a838
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const appInsights = new ApplicationInsights({
appInsights.loadAppInsights();

appInsights.addTelemetryInitializer((env:ITelemetryItem) => {
env.tags = env.tags || [];
env.tags = env.tags || {};
env.tags["ai.cloud.role"] = "<app-role-frontend>";
//custom props
env.data = env.data || {};
Expand Down

0 comments on commit fa7a838

Please sign in to comment.