From 9722433f798828c01585f6b6efad0355812358ee Mon Sep 17 00:00:00 2001 From: siyuniu-ms Date: Tue, 21 Feb 2023 14:24:21 -0800 Subject: [PATCH] change readme change instrumentation key to connection string --- AISKU/API.md | 4 ++-- API-reference.md | 4 ++-- README.md | 20 +++++++++---------- docs/SdkLoadFailureSteps.md | 8 ++++---- .../README.md | 6 +++--- .../README.md | 2 +- 6 files changed, 22 insertions(+), 22 deletions(-) diff --git a/AISKU/API.md b/AISKU/API.md index a73de458..741f4f91 100644 --- a/AISKU/API.md +++ b/AISKU/API.md @@ -82,11 +82,11 @@ Parameter | Type | Description `error` | [Error](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) | **Required**
Error object `severityLevel?` | [SeverityLevel (number)](https://github.com/microsoft/ApplicationInsights-JS/blob/master/JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/SeverityLevel.ts) | **Optional**
Severity of the message, ranging from verbose to critical -By default, uncaught browser exceptions are caught by the SDK and reported to the portal. To disable this behavior, insert the following line in the config section below your instrumentation key: +By default, uncaught browser exceptions are caught by the SDK and reported to the portal. To disable this behavior, insert the following line in the config section below your connection string: ```ts { - instrumentationKey: "your instrumentation key", + connectionString: "your connection string", disableExceptionTracking: true } ``` diff --git a/API-reference.md b/API-reference.md index e6d00142..eb59379c 100644 --- a/API-reference.md +++ b/API-reference.md @@ -79,11 +79,11 @@ Parameter | Type | Description `severityLevel?` | [SeverityLevel (number)](https://github.com/microsoft/ApplicationInsights-JS/blob/master/legacy/JavaScript/JavaScriptSDK.Interfaces/Contracts/Generated/SeverityLevel.ts) | **Optional**
Severity of the message, ranging from verbose to critical `properties?` | dictionary | **Optional**
Map of string to any: Additional data used to [filter pages](https://azure.microsoft.com/documentation/articles/app-insights-api-custom-events-metrics/#properties) in the portal. Defaults to empty. -By default, uncaught browser exceptions are caught by the SDK and reported to the portal. To disable this behavior, insert the following line in the config section below your instrumentation key: +By default, uncaught browser exceptions are caught by the SDK and reported to the portal. To disable this behavior, insert the following line in the config section below your connection string: ```ts { - instrumentationKey: "your instrumentation key", + connectionString: "your connection string", disableExceptionTracking: true } ``` diff --git a/README.md b/README.md index 4e306f7e..f5caf782 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ See the [beta](https://github.com/Microsoft/ApplicationInsights-JS/tree/beta) fo ## Getting Started 1. Create an Application Insights resource in Azure by following [these instructions](https://docs.microsoft.com/en-us/azure/application-insights/app-insights-javascript?toc=/azure/azure-monitor/toc.json). -2. Grab the _Instrumentation Key_ (aka "ikey") from the resource you created in - step 1. Later, you'll add it to the `instrumentationKey` setting of the Application Insights JavaScript SDK. +2. Grab the _Connection String_ from the resource you created in + step 1. Later, you'll add it to the `connectionString` setting of the Application Insights JavaScript SDK. 3. Add Application Insights to your app. **There are 2 ways to do this.** - Install via NPM. Then, [set up an instance of Application Insights in your app.](#npm-setup-ignore-if-using-snippet-setup) > *Note:* **Typings are included with this package**, so you do **not** need to install a separate typings package. @@ -59,7 +59,7 @@ See the [beta](https://github.com/Microsoft/ApplicationInsights-JS/tree/beta) fo import { ApplicationInsights } from '@microsoft/applicationinsights-web' const appInsights = new ApplicationInsights({ config: { - instrumentationKey: 'YOUR_INSTRUMENTATION_KEY_GOES_HERE' + connectionString: 'YOUR_CONNECTION_STRING_GOES_HERE' /* ...Other Configuration Options... */ } }); appInsights.loadAppInsights(); @@ -72,7 +72,7 @@ If your app does not use NPM, you can directly instrument your webpages with App ```html ``` @@ -137,7 +137,7 @@ onInit: function (sdk) { }); }, // Once the application insights instance has loaded and initialized this method will be called cfg: { // Application Insights Configuration - instrumentationKey: "YOUR_INSTRUMENTATION_KEY" + connectionString: "YOUR_CONNECTION_STRING" }}); ``` @@ -181,7 +181,7 @@ After JS script has loaded, include the following snippet to initialize Applicat