@@ -64,21 +64,21 @@ class MockInsights {
6464
6565 /**
6666 * Sets up the Application Insights abstraction layer. This method configures the telemetry client
67- * based on the provided key , creating either a full Application Insights client or a console-based fallback wrapper.
67+ * based on the provided connection string , creating either a full Application Insights client or a console-based fallback wrapper.
6868 *
69- * @param {string | null } [key =null] - Application Insights instrumentation key . If null, undefined, or 'mock', uses
70- * console-based logging. Default is `null`
69+ * @param {string | null } [connectionString =null] - Application Insights connection string . If null, undefined, or
70+ * 'mock', uses console-based logging. Default is `null`
7171 * @param {boolean } [echo=false] - Whether to echo telemetry to both console and Application Insights client when both
7272 * are available. Default is `false`
7373 * @returns {void }
7474 */
75- static setup ( key = null , echo = false ) {
75+ static setup ( connectionString = null , echo = false ) {
7676 // exit if we are already setup
7777 if ( _client instanceof MockInsights ) return
78- if ( ! key || key === 'mock' ) {
78+ if ( ! connectionString || connectionString === 'mock' ) {
7979 _client = new MockInsights ( )
8080 } else {
81- appInsights . setup ( key ) . setAutoCollectPerformance ( false ) . setAutoCollectDependencies ( true ) . start ( )
81+ appInsights . setup ( connectionString ) . setAutoCollectPerformance ( false ) . setAutoCollectDependencies ( true ) . start ( )
8282 if ( echo ) {
8383 _client = new MockInsights ( appInsights . defaultClient )
8484 } else {
0 commit comments