From 2969370669605c37548780dd9d22f2ca4698b65d Mon Sep 17 00:00:00 2001 From: Elio Struyf Date: Fri, 5 Jan 2018 16:09:30 +0100 Subject: [PATCH] Telemetry changes --- CHANGELOG.md | 1 + docs/documentation/docs/about/release-notes.md | 1 + src/common/appInsights/index.ts | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5bfe1c411..740167601 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## 1.1.2 - Fix for WebPartTitle control to inherit color +- Improved telemetry with some object checks ## 1.1.1 diff --git a/docs/documentation/docs/about/release-notes.md b/docs/documentation/docs/about/release-notes.md index 5bfe1c411..740167601 100644 --- a/docs/documentation/docs/about/release-notes.md +++ b/docs/documentation/docs/about/release-notes.md @@ -3,6 +3,7 @@ ## 1.1.2 - Fix for WebPartTitle control to inherit color +- Improved telemetry with some object checks ## 1.1.1 diff --git a/src/common/appInsights/index.ts b/src/common/appInsights/index.ts index 1e8886e96..55fd1fab1 100644 --- a/src/common/appInsights/index.ts +++ b/src/common/appInsights/index.ts @@ -5,7 +5,9 @@ import {Environment,EnvironmentType} from "@microsoft/sp-core-library"; AppInsights.downloadAndSetup({ instrumentationKey: "9f59b81e-d2ed-411e-a961-8bcf3f7f04d0" }); // Remove operation name from the telemetry -AppInsights.context.operation.name = null; +if (AppInsights.context && AppInsights.context.operation && AppInsights.context.operation.name) { + AppInsights.context.operation.name = null; +} export function track(componentName: string, properties: any = {}): void { AppInsights.trackEvent(componentName, {