Repository: microsoft/ApplicationInsights-node.js
Pull request #1175 (2023-08-02 17:30:57)

[Shim] Add Auto-Collection Methods, TelemetryClient, and Config
* Add auto-collection methods
* Add global applicationinsights to handle shim import compatibility
* Fix initialization of `setup()` and `start()` so customers can use `client.config` before running `start()`
* Implement `config` properties to set corresponding values on the Azure Monitor Client
* Add tests for the `client.config`


Patch:
diff --git a/applicationinsights.ts b/applicationinsights.ts
new file mode 100644
index 0000000..57fa1ed
--- /dev/null
+++ b/applicationinsights.ts
@@ -0,0 +1,14 @@
+export { 
+    setup,
+    start,
+    getCorrelationContext,
+    startOperation,
+    wrapWithCorrelationContext,
+    Configuration,
+    defaultClient,
+    Contracts, 
+    DistributedTracingModes,
+    HttpRequest,
+    TelemetryClient,
+    dispose,
+} from "./src/shim/shim-applicationinsights";
\ No newline at end of file
diff --git a/package-lock.json b/package-lock.json
index e83e6f4..f8334ca 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -100,15 +100,16 @@
       }
     },
     "node_modules/@azure/core-auth": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.4.0.tgz",
-      "integrity": "sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==",
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz",
+      "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==",
       "dependencies": {
         "@azure/abort-controller": "^1.0.0",
+        "@azure/core-util": "^1.1.0",
         "tslib": "^2.2.0"
       },
       "engines": {
-        "node": ">=12.0.0"
+        "node": ">=14.0.0"
       }
     },
     "node_modules/@azure/core-client": {
@@ -129,9 +130,9 @@
       }
     },
     "node_modules/@azure/core-rest-pipeline": {
-      "version": "1.11.0",
-      "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.11.0.tgz",
-      "integrity": "sha512-nB4KXl6qAyJmBVLWA7SakT4tzpYZTCk4pvRBeI+Ye0WYSOrlTqlMhc4MSS/8atD3ufeYWdkN380LLoXlUUzThw==",
+      "version": "1.12.0",
+      "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.0.tgz",
+      "integrity": "sha512-+MnSB0vGZjszSzr5AW8z93/9fkDu2RLtWmAN8gskURq7EW2sSwqy8jZa0V26rjuBVkwhdA3Hw8z3VWoeBUOw+A==",
       "dependencies": {
         "@azure/abort-controller": "^1.0.0",
         "@azure/core-auth": "^1.4.0",
@@ -159,9 +160,9 @@
       }
     },
     "node_modules/@azure/core-util": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.3.2.tgz",
-      "integrity": "sha512-2bECOUh88RvL1pMZTcc6OzfobBeWDBf5oBbhjIhT1MV9otMVWCzpOJkkiKtrnO88y5GGBelgY8At73KGAdbkeQ==",
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.4.0.tgz",
+      "integrity": "sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==",
       "dependencies": {
         "@azure/abort-controller": "^1.0.0",
         "tslib": "^2.2.0"
@@ -454,17 +455,89 @@
       }
     },
     "node_modules/@babel/code-frame": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz",
-      "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz",
+      "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==",
       "dev": true,
       "dependencies": {
-        "@babel/highlight": "^7.22.5"
+        "@babel/highlight": "^7.22.10",
+        "chalk": "^2.4.2"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
+    "node_modules/@babel/code-frame/node_modules/ansi-styles": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+      "dev": true,
+      "dependencies": {
+        "color-convert": "^1.9.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/@babel/code-frame/node_modules/chalk": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+      "dev": true,
+      "dependencies": {
+        "ansi-styles": "^3.2.1",
+        "escape-string-regexp": "^1.0.5",
+        "supports-color": "^5.3.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/@babel/code-frame/node_modules/color-convert": {
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+      "dev": true,
+      "dependencies": {
+        "color-name": "1.1.3"
+      }
+    },
+    "node_modules/@babel/code-frame/node_modules/color-name": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+      "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+      "dev": true
+    },
+    "node_modules/@babel/code-frame/node_modules/escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+      "dev": true,
+      "engines": {
+        "node": ">=0.8.0"
+      }
+    },
+    "node_modules/@babel/code-frame/node_modules/has-flag": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+      "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+      "dev": true,
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/@babel/code-frame/node_modules/supports-color": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+      "dev": true,
+      "dependencies": {
+        "has-flag": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
     "node_modules/@babel/compat-data": {
       "version": "7.22.9",
       "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.22.9.tgz",
@@ -475,21 +548,21 @@
       }
     },
     "node_modules/@babel/core": {
-      "version": "7.22.9",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz",
-      "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz",
+      "integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==",
       "dev": true,
       "dependencies": {
         "@ampproject/remapping": "^2.2.0",
-        "@babel/code-frame": "^7.22.5",
-        "@babel/generator": "^7.22.9",
-        "@babel/helper-compilation-targets": "^7.22.9",
+        "@babel/code-frame": "^7.22.10",
+        "@babel/generator": "^7.22.10",
+        "@babel/helper-compilation-targets": "^7.22.10",
         "@babel/helper-module-transforms": "^7.22.9",
-        "@babel/helpers": "^7.22.6",
-        "@babel/parser": "^7.22.7",
+        "@babel/helpers": "^7.22.10",
+        "@babel/parser": "^7.22.10",
         "@babel/template": "^7.22.5",
-        "@babel/traverse": "^7.22.8",
-        "@babel/types": "^7.22.5",
+        "@babel/traverse": "^7.22.10",
+        "@babel/types": "^7.22.10",
         "convert-source-map": "^1.7.0",
         "debug": "^4.1.0",
         "gensync": "^1.0.0-beta.2",
@@ -514,12 +587,12 @@
       }
     },
     "node_modules/@babel/generator": {
-      "version": "7.22.9",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz",
-      "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz",
+      "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==",
       "dev": true,
       "dependencies": {
-        "@babel/types": "^7.22.5",
+        "@babel/types": "^7.22.10",
         "@jridgewell/gen-mapping": "^0.3.2",
         "@jridgewell/trace-mapping": "^0.3.17",
         "jsesc": "^2.5.1"
@@ -529,9 +602,9 @@
       }
     },
     "node_modules/@babel/helper-compilation-targets": {
-      "version": "7.22.9",
-      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz",
-      "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz",
+      "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==",
       "dev": true,
       "dependencies": {
         "@babel/compat-data": "^7.22.9",
@@ -542,9 +615,6 @@
       },
       "engines": {
         "node": ">=6.9.0"
-      },
-      "peerDependencies": {
-        "@babel/core": "^7.0.0"
       }
     },
     "node_modules/@babel/helper-compilation-targets/node_modules/semver": {
@@ -673,27 +743,27 @@
       }
     },
     "node_modules/@babel/helpers": {
-      "version": "7.22.6",
-      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz",
-      "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz",
+      "integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==",
       "dev": true,
       "dependencies": {
         "@babel/template": "^7.22.5",
-        "@babel/traverse": "^7.22.6",
-        "@babel/types": "^7.22.5"
+        "@babel/traverse": "^7.22.10",
+        "@babel/types": "^7.22.10"
       },
       "engines": {
         "node": ">=6.9.0"
       }
     },
     "node_modules/@babel/highlight": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz",
-      "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz",
+      "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==",
       "dev": true,
       "dependencies": {
         "@babel/helper-validator-identifier": "^7.22.5",
-        "chalk": "^2.0.0",
+        "chalk": "^2.4.2",
         "js-tokens": "^4.0.0"
       },
       "engines": {
@@ -772,9 +842,9 @@
       }
     },
     "node_modules/@babel/parser": {
-      "version": "7.22.7",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz",
-      "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
+      "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
       "dev": true,
       "bin": {
         "parser": "bin/babel-parser.js"
@@ -798,19 +868,19 @@
       }
     },
     "node_modules/@babel/traverse": {
-      "version": "7.22.8",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz",
-      "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz",
+      "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==",
       "dev": true,
       "dependencies": {
-        "@babel/code-frame": "^7.22.5",
-        "@babel/generator": "^7.22.7",
+        "@babel/code-frame": "^7.22.10",
+        "@babel/generator": "^7.22.10",
         "@babel/helper-environment-visitor": "^7.22.5",
         "@babel/helper-function-name": "^7.22.5",
         "@babel/helper-hoist-variables": "^7.22.5",
         "@babel/helper-split-export-declaration": "^7.22.6",
-        "@babel/parser": "^7.22.7",
-        "@babel/types": "^7.22.5",
+        "@babel/parser": "^7.22.10",
+        "@babel/types": "^7.22.10",
         "debug": "^4.1.0",
         "globals": "^11.1.0"
       },
@@ -828,9 +898,9 @@
       }
     },
     "node_modules/@babel/types": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz",
-      "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
+      "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
       "dev": true,
       "dependencies": {
         "@babel/helper-string-parser": "^7.22.5",
@@ -866,9 +936,9 @@
       }
     },
     "node_modules/@eslint/eslintrc": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz",
-      "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==",
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz",
+      "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==",
       "dev": true,
       "dependencies": {
         "ajv": "^6.12.4",
@@ -889,9 +959,9 @@
       }
     },
     "node_modules/@eslint/js": {
-      "version": "8.44.0",
-      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz",
-      "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==",
+      "version": "8.46.0",
+      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz",
+      "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==",
       "dev": true,
       "engines": {
         "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -1053,9 +1123,9 @@
       }
     },
     "node_modules/@jridgewell/resolve-uri": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
-      "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+      "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
       "dev": true,
       "engines": {
         "node": ">=6.0.0"
@@ -1077,21 +1147,15 @@
       "dev": true
     },
     "node_modules/@jridgewell/trace-mapping": {
-      "version": "0.3.18",
-      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
-      "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
+      "version": "0.3.19",
+      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
+      "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
       "dev": true,
       "dependencies": {
-        "@jridgewell/resolve-uri": "3.1.0",
-        "@jridgewell/sourcemap-codec": "1.4.14"
+        "@jridgewell/resolve-uri": "^3.1.0",
+        "@jridgewell/sourcemap-codec": "^1.4.14"
       }
     },
-    "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": {
-      "version": "1.4.14",
-      "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
-      "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
-      "dev": true
-    },
     "node_modules/@mapbox/node-pre-gyp": {
       "version": "1.0.11",
       "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
@@ -1749,9 +1813,9 @@
       "integrity": "sha512-dKkr1bTxbEsFlh2ARpKzcaAmsYixqt9UyCdoEZk8rHyE4iQYcDCyvSjDSf7JUWJHlJiTtbIoQjxKh6ViywqDAg=="
     },
     "node_modules/@types/sinon": {
-      "version": "10.0.15",
-      "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz",
-      "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==",
+      "version": "10.0.16",
+      "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz",
+      "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==",
       "dev": true,
       "dependencies": {
         "@types/sinonjs__fake-timers": "*"
@@ -2193,9 +2257,9 @@
       "dev": true
     },
     "node_modules/browserslist": {
-      "version": "4.21.9",
-      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz",
-      "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==",
+      "version": "4.21.10",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz",
+      "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==",
       "dev": true,
       "funding": [
         {
@@ -2212,9 +2276,9 @@
         }
       ],
       "dependencies": {
-        "caniuse-lite": "^1.0.30001503",
-        "electron-to-chromium": "^1.4.431",
-        "node-releases": "^2.0.12",
+        "caniuse-lite": "^1.0.30001517",
+        "electron-to-chromium": "^1.4.477",
+        "node-releases": "^2.0.13",
         "update-browserslist-db": "^1.0.11"
       },
       "bin": {
@@ -2263,9 +2327,9 @@
       }
     },
     "node_modules/caniuse-lite": {
-      "version": "1.0.30001517",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz",
-      "integrity": "sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==",
+      "version": "1.0.30001519",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz",
+      "integrity": "sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==",
       "dev": true,
       "funding": [
         {
@@ -2590,9 +2654,9 @@
       }
     },
     "node_modules/electron-to-chromium": {
-      "version": "1.4.473",
-      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.473.tgz",
-      "integrity": "sha512-aVfC8+440vGfl06l8HKKn8/PD5jRfSnLkTTD65EFvU46igbpQRri1gxSzW9/+TeUlwYzrXk1sw867T96zlyECA==",
+      "version": "1.4.486",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.486.tgz",
+      "integrity": "sha512-9zn9/2lbMGY/mFhoUymD9ODYdLY3zjUW/IW9ihU/sJVeIlD70m2aAb86S35aRGF+iwqLuQP25epruayZjKNjBw==",
       "dev": true
     },
     "node_modules/emoji-regex": {
@@ -2629,27 +2693,27 @@
       }
     },
     "node_modules/eslint": {
-      "version": "8.45.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz",
-      "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==",
+      "version": "8.46.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz",
+      "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==",
       "dev": true,
       "dependencies": {
         "@eslint-community/eslint-utils": "^4.2.0",
-        "@eslint-community/regexpp": "^4.4.0",
-        "@eslint/eslintrc": "^2.1.0",
-        "@eslint/js": "8.44.0",
+        "@eslint-community/regexpp": "^4.6.1",
+        "@eslint/eslintrc": "^2.1.1",
+        "@eslint/js": "^8.46.0",
         "@humanwhocodes/config-array": "^0.11.10",
         "@humanwhocodes/module-importer": "^1.0.1",
         "@nodelib/fs.walk": "^1.2.8",
-        "ajv": "^6.10.0",
+        "ajv": "^6.12.4",
         "chalk": "^4.0.0",
         "cross-spawn": "^7.0.2",
         "debug": "^4.3.2",
         "doctrine": "^3.0.0",
         "escape-string-regexp": "^4.0.0",
-        "eslint-scope": "^7.2.0",
-        "eslint-visitor-keys": "^3.4.1",
-        "espree": "^9.6.0",
+        "eslint-scope": "^7.2.2",
+        "eslint-visitor-keys": "^3.4.2",
+        "espree": "^9.6.1",
         "esquery": "^1.4.2",
         "esutils": "^2.0.2",
         "fast-deep-equal": "^3.1.3",
@@ -2768,9 +2832,9 @@
       }
     },
     "node_modules/eslint-visitor-keys": {
-      "version": "3.4.1",
-      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
-      "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
+      "version": "3.4.2",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz",
+      "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==",
       "dev": true,
       "engines": {
         "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -2780,9 +2844,9 @@
       }
     },
     "node_modules/eslint/node_modules/eslint-scope": {
-      "version": "7.2.1",
-      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz",
-      "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==",
+      "version": "7.2.2",
+      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
+      "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
       "dev": true,
       "dependencies": {
         "esrecurse": "^4.3.0",
@@ -3454,9 +3518,9 @@
       }
     },
     "node_modules/is-core-module": {
-      "version": "2.12.1",
-      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
-      "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
+      "version": "2.13.0",
+      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz",
+      "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==",
       "dependencies": {
         "has": "^1.0.3"
       },
@@ -4921,11 +4985,11 @@
       "dev": true
     },
     "node_modules/resolve": {
-      "version": "1.22.2",
-      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
-      "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
+      "version": "1.22.4",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz",
+      "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==",
       "dependencies": {
-        "is-core-module": "^2.11.0",
+        "is-core-module": "^2.13.0",
         "path-parse": "^1.0.7",
         "supports-preserve-symlinks-flag": "^1.0.0"
       },
@@ -5669,11 +5733,12 @@
       }
     },
     "@azure/core-auth": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.4.0.tgz",
-      "integrity": "sha512-HFrcTgmuSuukRf/EdPmqBrc5l6Q5Uu+2TbuhaKbgaCpP2TfAeiNaQPAadxO+CYBRHGUzIDteMAjFspFLDLnKVQ==",
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/@azure/core-auth/-/core-auth-1.5.0.tgz",
+      "integrity": "sha512-udzoBuYG1VBoHVohDTrvKjyzel34zt77Bhp7dQntVGGD0ehVq48owENbBG8fIgkHRNUBQH5k1r0hpoMu5L8+kw==",
       "requires": {
         "@azure/abort-controller": "^1.0.0",
+        "@azure/core-util": "^1.1.0",
         "tslib": "^2.2.0"
       }
     },
@@ -5692,9 +5757,9 @@
       }
     },
     "@azure/core-rest-pipeline": {
-      "version": "1.11.0",
-      "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.11.0.tgz",
-      "integrity": "sha512-nB4KXl6qAyJmBVLWA7SakT4tzpYZTCk4pvRBeI+Ye0WYSOrlTqlMhc4MSS/8atD3ufeYWdkN380LLoXlUUzThw==",
+      "version": "1.12.0",
+      "resolved": "https://registry.npmjs.org/@azure/core-rest-pipeline/-/core-rest-pipeline-1.12.0.tgz",
+      "integrity": "sha512-+MnSB0vGZjszSzr5AW8z93/9fkDu2RLtWmAN8gskURq7EW2sSwqy8jZa0V26rjuBVkwhdA3Hw8z3VWoeBUOw+A==",
       "requires": {
         "@azure/abort-controller": "^1.0.0",
         "@azure/core-auth": "^1.4.0",
@@ -5716,9 +5781,9 @@
       }
     },
     "@azure/core-util": {
-      "version": "1.3.2",
-      "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.3.2.tgz",
-      "integrity": "sha512-2bECOUh88RvL1pMZTcc6OzfobBeWDBf5oBbhjIhT1MV9otMVWCzpOJkkiKtrnO88y5GGBelgY8At73KGAdbkeQ==",
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/@azure/core-util/-/core-util-1.4.0.tgz",
+      "integrity": "sha512-eGAyJpm3skVQoLiRqm/xPa+SXi/NPDdSHMxbRAz2lSprd+Zs+qrpQGQQ2VQ3Nttu+nSZR4XoYQC71LbEI7jsig==",
       "requires": {
         "@azure/abort-controller": "^1.0.0",
         "tslib": "^2.2.0"
@@ -5949,12 +6014,71 @@
       }
     },
     "@babel/code-frame": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz",
-      "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz",
+      "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==",
       "dev": true,
       "requires": {
-        "@babel/highlight": "^7.22.5"
+        "@babel/highlight": "^7.22.10",
+        "chalk": "^2.4.2"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "3.2.1",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+          "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+          "dev": true,
+          "requires": {
+            "color-convert": "^1.9.0"
+          }
+        },
+        "chalk": {
+          "version": "2.4.2",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+          "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "^3.2.1",
+            "escape-string-regexp": "^1.0.5",
+            "supports-color": "^5.3.0"
+          }
+        },
+        "color-convert": {
+          "version": "1.9.3",
+          "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+          "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+          "dev": true,
+          "requires": {
+            "color-name": "1.1.3"
+          }
+        },
+        "color-name": {
+          "version": "1.1.3",
+          "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+          "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+          "dev": true
+        },
+        "escape-string-regexp": {
+          "version": "1.0.5",
+          "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+          "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+          "dev": true
+        },
+        "has-flag": {
+          "version": "3.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+          "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "5.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+          "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+          "dev": true,
+          "requires": {
+            "has-flag": "^3.0.0"
+          }
+        }
       }
     },
     "@babel/compat-data": {
@@ -5964,21 +6088,21 @@
       "dev": true
     },
     "@babel/core": {
-      "version": "7.22.9",
-      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.9.tgz",
-      "integrity": "sha512-G2EgeufBcYw27U4hhoIwFcgc1XU7TlXJ3mv04oOv1WCuo900U/anZSPzEqNjwdjgffkk2Gs0AN0dW1CKVLcG7w==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.22.10.tgz",
+      "integrity": "sha512-fTmqbbUBAwCcre6zPzNngvsI0aNrPZe77AeqvDxWM9Nm+04RrJ3CAmGHA9f7lJQY6ZMhRztNemy4uslDxTX4Qw==",
       "dev": true,
       "requires": {
         "@ampproject/remapping": "^2.2.0",
-        "@babel/code-frame": "^7.22.5",
-        "@babel/generator": "^7.22.9",
-        "@babel/helper-compilation-targets": "^7.22.9",
+        "@babel/code-frame": "^7.22.10",
+        "@babel/generator": "^7.22.10",
+        "@babel/helper-compilation-targets": "^7.22.10",
         "@babel/helper-module-transforms": "^7.22.9",
-        "@babel/helpers": "^7.22.6",
-        "@babel/parser": "^7.22.7",
+        "@babel/helpers": "^7.22.10",
+        "@babel/parser": "^7.22.10",
         "@babel/template": "^7.22.5",
-        "@babel/traverse": "^7.22.8",
-        "@babel/types": "^7.22.5",
+        "@babel/traverse": "^7.22.10",
+        "@babel/types": "^7.22.10",
         "convert-source-map": "^1.7.0",
         "debug": "^4.1.0",
         "gensync": "^1.0.0-beta.2",
@@ -5995,21 +6119,21 @@
       }
     },
     "@babel/generator": {
-      "version": "7.22.9",
-      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz",
-      "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.10.tgz",
+      "integrity": "sha512-79KIf7YiWjjdZ81JnLujDRApWtl7BxTqWD88+FFdQEIOG8LJ0etDOM7CXuIgGJa55sGOwZVwuEsaLEm0PJ5/+A==",
       "dev": true,
       "requires": {
-        "@babel/types": "^7.22.5",
+        "@babel/types": "^7.22.10",
         "@jridgewell/gen-mapping": "^0.3.2",
         "@jridgewell/trace-mapping": "^0.3.17",
         "jsesc": "^2.5.1"
       }
     },
     "@babel/helper-compilation-targets": {
-      "version": "7.22.9",
-      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.9.tgz",
-      "integrity": "sha512-7qYrNM6HjpnPHJbopxmb8hSPoZ0gsX8IvUS32JGVoy+pU9e5N0nLr1VjJoR6kA4d9dmGLxNYOjeB8sUDal2WMw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.10.tgz",
+      "integrity": "sha512-JMSwHD4J7SLod0idLq5PKgI+6g/hLD/iuWBq08ZX49xE14VpVEojJ5rHWptpirV2j020MvypRLAXAO50igCJ5Q==",
       "dev": true,
       "requires": {
         "@babel/compat-data": "^7.22.9",
@@ -6111,24 +6235,24 @@
       "dev": true
     },
     "@babel/helpers": {
-      "version": "7.22.6",
-      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.6.tgz",
-      "integrity": "sha512-YjDs6y/fVOYFV8hAf1rxd1QvR9wJe1pDBZ2AREKq/SDayfPzgk0PBnVuTCE5X1acEpMMNOVUqoe+OwiZGJ+OaA==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.22.10.tgz",
+      "integrity": "sha512-a41J4NW8HyZa1I1vAndrraTlPZ/eZoga2ZgS7fEr0tZJGVU4xqdE80CEm0CcNjha5EZ8fTBYLKHF0kqDUuAwQw==",
       "dev": true,
       "requires": {
         "@babel/template": "^7.22.5",
-        "@babel/traverse": "^7.22.6",
-        "@babel/types": "^7.22.5"
+        "@babel/traverse": "^7.22.10",
+        "@babel/types": "^7.22.10"
       }
     },
     "@babel/highlight": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz",
-      "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz",
+      "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==",
       "dev": true,
       "requires": {
         "@babel/helper-validator-identifier": "^7.22.5",
-        "chalk": "^2.0.0",
+        "chalk": "^2.4.2",
         "js-tokens": "^4.0.0"
       },
       "dependencies": {
@@ -6191,9 +6315,9 @@
       }
     },
     "@babel/parser": {
-      "version": "7.22.7",
-      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz",
-      "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.10.tgz",
+      "integrity": "sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==",
       "dev": true
     },
     "@babel/template": {
@@ -6208,19 +6332,19 @@
       }
     },
     "@babel/traverse": {
-      "version": "7.22.8",
-      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz",
-      "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.10.tgz",
+      "integrity": "sha512-Q/urqV4pRByiNNpb/f5OSv28ZlGJiFiiTh+GAHktbIrkPhPbl90+uW6SmpoLyZqutrg9AEaEf3Q/ZBRHBXgxig==",
       "dev": true,
       "requires": {
-        "@babel/code-frame": "^7.22.5",
-        "@babel/generator": "^7.22.7",
+        "@babel/code-frame": "^7.22.10",
+        "@babel/generator": "^7.22.10",
         "@babel/helper-environment-visitor": "^7.22.5",
         "@babel/helper-function-name": "^7.22.5",
         "@babel/helper-hoist-variables": "^7.22.5",
         "@babel/helper-split-export-declaration": "^7.22.6",
-        "@babel/parser": "^7.22.7",
-        "@babel/types": "^7.22.5",
+        "@babel/parser": "^7.22.10",
+        "@babel/types": "^7.22.10",
         "debug": "^4.1.0",
         "globals": "^11.1.0"
       },
@@ -6234,9 +6358,9 @@
       }
     },
     "@babel/types": {
-      "version": "7.22.5",
-      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz",
-      "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==",
+      "version": "7.22.10",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.10.tgz",
+      "integrity": "sha512-obaoigiLrlDZ7TUQln/8m4mSqIW2QFeOrCQc9r+xsaHGNoplVNYlRVpsfE8Vj35GEm2ZH4ZhrNYogs/3fj85kg==",
       "dev": true,
       "requires": {
         "@babel/helper-string-parser": "^7.22.5",
@@ -6260,9 +6384,9 @@
       "dev": true
     },
     "@eslint/eslintrc": {
-      "version": "2.1.0",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz",
-      "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==",
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz",
+      "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==",
       "dev": true,
       "requires": {
         "ajv": "^6.12.4",
@@ -6277,9 +6401,9 @@
       }
     },
     "@eslint/js": {
-      "version": "8.44.0",
-      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz",
-      "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==",
+      "version": "8.46.0",
+      "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz",
+      "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==",
       "dev": true
     },
     "@humanwhocodes/config-array": {
@@ -6400,9 +6524,9 @@
       }
     },
     "@jridgewell/resolve-uri": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz",
-      "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==",
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+      "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
       "dev": true
     },
     "@jridgewell/set-array": {
@@ -6418,21 +6542,13 @@
       "dev": true
     },
     "@jridgewell/trace-mapping": {
-      "version": "0.3.18",
-      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz",
-      "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==",
+      "version": "0.3.19",
+      "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",
+      "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",
       "dev": true,
       "requires": {
-        "@jridgewell/resolve-uri": "3.1.0",
-        "@jridgewell/sourcemap-codec": "1.4.14"
-      },
-      "dependencies": {
-        "@jridgewell/sourcemap-codec": {
-          "version": "1.4.14",
-          "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz",
-          "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==",
-          "dev": true
-        }
+        "@jridgewell/resolve-uri": "^3.1.0",
+        "@jridgewell/sourcemap-codec": "^1.4.14"
       }
     },
     "@mapbox/node-pre-gyp": {
@@ -6919,9 +7035,9 @@
       "integrity": "sha512-dKkr1bTxbEsFlh2ARpKzcaAmsYixqt9UyCdoEZk8rHyE4iQYcDCyvSjDSf7JUWJHlJiTtbIoQjxKh6ViywqDAg=="
     },
     "@types/sinon": {
-      "version": "10.0.15",
-      "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.15.tgz",
-      "integrity": "sha512-3lrFNQG0Kr2LDzvjyjB6AMJk4ge+8iYhQfdnSwIwlG88FUOV43kPcQqDZkDa/h3WSZy6i8Fr0BSjfQtB1B3xuQ==",
+      "version": "10.0.16",
+      "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.16.tgz",
+      "integrity": "sha512-j2Du5SYpXZjJVJtXBokASpPRj+e2z+VUhCPHmM6WMfe3dpHu6iVKJMU6AiBcMp/XTAYnEj6Wc1trJUWwZ0QaAQ==",
       "dev": true,
       "requires": {
         "@types/sinonjs__fake-timers": "*"
@@ -7221,14 +7337,14 @@
       "dev": true
     },
     "browserslist": {
-      "version": "4.21.9",
-      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz",
-      "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==",
+      "version": "4.21.10",
+      "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.10.tgz",
+      "integrity": "sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ==",
       "dev": true,
       "requires": {
-        "caniuse-lite": "^1.0.30001503",
-        "electron-to-chromium": "^1.4.431",
-        "node-releases": "^2.0.12",
+        "caniuse-lite": "^1.0.30001517",
+        "electron-to-chromium": "^1.4.477",
+        "node-releases": "^2.0.13",
         "update-browserslist-db": "^1.0.11"
       }
     },
@@ -7262,9 +7378,9 @@
       "dev": true
     },
     "caniuse-lite": {
-      "version": "1.0.30001517",
-      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz",
-      "integrity": "sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==",
+      "version": "1.0.30001519",
+      "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz",
+      "integrity": "sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==",
       "dev": true
     },
     "chalk": {
@@ -7501,9 +7617,9 @@
       }
     },
     "electron-to-chromium": {
-      "version": "1.4.473",
-      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.473.tgz",
-      "integrity": "sha512-aVfC8+440vGfl06l8HKKn8/PD5jRfSnLkTTD65EFvU46igbpQRri1gxSzW9/+TeUlwYzrXk1sw867T96zlyECA==",
+      "version": "1.4.486",
+      "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.486.tgz",
+      "integrity": "sha512-9zn9/2lbMGY/mFhoUymD9ODYdLY3zjUW/IW9ihU/sJVeIlD70m2aAb86S35aRGF+iwqLuQP25epruayZjKNjBw==",
       "dev": true
     },
     "emoji-regex": {
@@ -7531,27 +7647,27 @@
       "dev": true
     },
     "eslint": {
-      "version": "8.45.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz",
-      "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==",
+      "version": "8.46.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz",
+      "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==",
       "dev": true,
       "requires": {
         "@eslint-community/eslint-utils": "^4.2.0",
-        "@eslint-community/regexpp": "^4.4.0",
-        "@eslint/eslintrc": "^2.1.0",
-        "@eslint/js": "8.44.0",
+        "@eslint-community/regexpp": "^4.6.1",
+        "@eslint/eslintrc": "^2.1.1",
+        "@eslint/js": "^8.46.0",
         "@humanwhocodes/config-array": "^0.11.10",
         "@humanwhocodes/module-importer": "^1.0.1",
         "@nodelib/fs.walk": "^1.2.8",
-        "ajv": "^6.10.0",
+        "ajv": "^6.12.4",
         "chalk": "^4.0.0",
         "cross-spawn": "^7.0.2",
         "debug": "^4.3.2",
         "doctrine": "^3.0.0",
         "escape-string-regexp": "^4.0.0",
-        "eslint-scope": "^7.2.0",
-        "eslint-visitor-keys": "^3.4.1",
-        "espree": "^9.6.0",
+        "eslint-scope": "^7.2.2",
+        "eslint-visitor-keys": "^3.4.2",
+        "espree": "^9.6.1",
         "esquery": "^1.4.2",
         "esutils": "^2.0.2",
         "fast-deep-equal": "^3.1.3",
@@ -7576,9 +7692,9 @@
       },
       "dependencies": {
         "eslint-scope": {
-          "version": "7.2.1",
-          "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz",
-          "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==",
+          "version": "7.2.2",
+          "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
+          "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
           "dev": true,
           "requires": {
             "esrecurse": "^4.3.0",
@@ -7653,9 +7769,9 @@
       }
     },
     "eslint-visitor-keys": {
-      "version": "3.4.1",
-      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz",
-      "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==",
+      "version": "3.4.2",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz",
+      "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==",
       "dev": true
     },
     "espree": {
@@ -8143,9 +8259,9 @@
       }
     },
     "is-core-module": {
-      "version": "2.12.1",
-      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz",
-      "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==",
+      "version": "2.13.0",
+      "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz",
+      "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==",
       "requires": {
         "has": "^1.0.3"
       }
@@ -9244,11 +9360,11 @@
       "dev": true
     },
     "resolve": {
-      "version": "1.22.2",
-      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz",
-      "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==",
+      "version": "1.22.4",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz",
+      "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==",
       "requires": {
-        "is-core-module": "^2.11.0",
+        "is-core-module": "^2.13.0",
         "path-parse": "^1.0.7",
         "supports-preserve-symlinks-flag": "^1.0.0"
       }
diff --git a/src/index.ts b/src/index.ts
index c401100..1596ae4 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,6 +1,5 @@
 // Copyright (c) Microsoft Corporation.
 // Licensed under the MIT license.
-
 export { TelemetryClient } from "./shim/telemetryClient";
 export { ApplicationInsightsOptions } from "./types";
 export { KnownSeverityLevel } from "./declarations/generated";
@@ -15,4 +14,7 @@ export {
 
 // To support previous versions of Beta, will be removed before GA release
 export { ApplicationInsightsClient } from "./applicationInsightsClient";
-export { ApplicationInsightsConfig } from "./applicationInsightsConfig";
\ No newline at end of file
+export { ApplicationInsightsConfig } from "./applicationInsightsConfig";
+
+// To support the shim
+export * from "../applicationinsights";
\ No newline at end of file
diff --git a/src/shim/NodeClient.ts b/src/shim/NodeClient.ts
new file mode 100644
index 0000000..86ccb48
--- /dev/null
+++ b/src/shim/NodeClient.ts
@@ -0,0 +1,34 @@
+import { Logger } from "./logging";
+import { Contracts, TelemetryClient } from "./shim-applicationinsights";
+
+class NodeClient extends TelemetryClient {
+    /**
+     * Log RequestTelemetry from HTTP request and response. This method will log immediately without waiting for request completion
+     * and it requires duration parameter to be specified on NodeHttpRequestTelemetry object.
+     * Use trackNodeHttpRequest function to log the telemetry after request completion
+     * @param telemetry Object encapsulating incoming request, response and duration information
+     */
+    public trackNodeHttpRequestSync(telemetry: Contracts.NodeHttpRequestTelemetry) {
+        Logger.getInstance().warn("trackNodeHttpRequestSync is not implemented and is a no-op.");
+    }
+    
+    /**
+     * Log RequestTelemetry from HTTP request and response. This method will `follow` the request to completion.
+     * Use trackNodeHttpRequestSync function to log telemetry immediately without waiting for request completion
+     * @param telemetry Object encapsulating incoming request and response information
+     */
+    public trackNodeHttpRequest(telemetry: Contracts.NodeHttpRequestTelemetry) {
+        Logger.getInstance().warn("trackNodeHttpRequest is not implemented and is a no-op.");
+    }
+    
+    /**
+     * Log DependencyTelemetry from outgoing HTTP request. This method will instrument the outgoing request and append
+     * the specified headers and will log the telemetry when outgoing request is complete
+     * @param telemetry Object encapsulating outgoing request information
+     */
+    public trackNodeHttpDependency(telemetry: Contracts.NodeHttpRequestTelemetry) {
+        Logger.getInstance().warn("trackNodeHttpDependency is not implemented and is a no-op.");
+    }
+}
+
+export = NodeClient;
diff --git a/src/shim/configuration/config.ts b/src/shim/configuration/config.ts
new file mode 100644
index 0000000..5f537e4
--- /dev/null
+++ b/src/shim/configuration/config.ts
@@ -0,0 +1,148 @@
+import { DistributedTracingModes, IConfig, IDisabledExtendedMetrics, IWebInstrumentationConfig } from "../types";
+import http = require("http");
+import https = require("https");
+import azureCoreAuth = require("@azure/core-auth");
+import { Logger } from "../logging";
+import constants = require("../../declarations/constants");
+
+class config implements IConfig {
+
+    public static ENV_azurePrefix = "APPSETTING_"; // Azure adds this prefix to all environment variables
+    public static ENV_iKey = "APPINSIGHTS_INSTRUMENTATIONKEY"; // This key is provided in the readme
+    public static legacy_ENV_iKey = "APPINSIGHTS_INSTRUMENTATION_KEY";
+    public static ENV_profileQueryEndpoint = "APPINSIGHTS_PROFILE_QUERY_ENDPOINT";
+    public static ENV_quickPulseHost = "APPINSIGHTS_QUICKPULSE_HOST";
+
+    public endpointUrl: string;
+    public maxBatchSize: number;
+    public maxBatchIntervalMs: number;
+    public disableAppInsights: boolean;
+    public samplingPercentage: number;
+    public correlationIdRetryIntervalMs: number;
+    public correlationHeaderExcludedDomains: string[];
+    public proxyHttpUrl: string;
+    public proxyHttpsUrl: string;
+    public httpAgent: http.Agent;
+    public httpsAgent: https.Agent;
+    public ignoreLegacyHeaders: boolean;
+    public aadTokenCredential?: azureCoreAuth.TokenCredential;
+    public enableAutoCollectConsole: boolean;
+    public enableLoggerErrorToTrace: boolean;
+    public enableAutoCollectExceptions: boolean;
+    public enableAutoCollectPerformance: boolean;
+    public enableAutoCollectExternalLoggers: boolean;
+    public enableAutoCollectPreAggregatedMetrics: boolean;
+    public enableAutoCollectHeartbeat: boolean;
+    public enableAutoCollectRequests: boolean;
+    public enableAutoCollectDependencies: boolean;
+    public enableAutoDependencyCorrelation: boolean;
+    public enableAutoCollectIncomingRequestAzureFunctions: boolean;
+    public enableSendLiveMetrics: boolean;
+    public enableUseDiskRetryCaching: boolean;
+    public enableUseAsyncHooks: boolean;
+    public distributedTracingMode: DistributedTracingModes;
+
+    public enableAutoCollectExtendedMetrics: boolean | IDisabledExtendedMetrics;
+    public enableResendInterval: number;
+    public enableMaxBytesOnDisk: number;
+    public enableInternalDebugLogging: boolean;
+    public enableInternalWarningLogging: boolean;
+    public disableAllExtendedMetrics: boolean;
+    public disableStatsbeat: boolean; // TODO: Implement this as a way to shutoff statsbeat
+    public extendedMetricDisablers: string;
+    public quickPulseHost: string; // TODO: This is not noted in the README
+    public enableWebInstrumentation: boolean;
+    public webInstrumentationConfig: IWebInstrumentationConfig[];
+    public webInstrumentationSrc: string;
+    public noPatchModules: string;
+    public noHttpAgentKeepAlive: boolean;
+    
+    // To Be deprecated.
+    public enableAutoWebSnippetInjection: boolean;
+
+    public correlationId: string; // TODO: Should be private NOTE: This is not noted in the README
+    private _connectionString: string;
+    private _endpointBase: string = constants.DEFAULT_BREEZE_ENDPOINT;
+
+    private _instrumentationKey: string;
+    public _webInstrumentationConnectionString: string;
+
+    // Added to maintain parity between JSON config and setting manually in the shim
+    public noDiagnosticChannel: boolean;
+
+    constructor(setupString?: string) {
+        this.instrumentationKey = setupString;
+
+        this.maxBatchSize = this.maxBatchSize || 250;
+        this.maxBatchIntervalMs = this.maxBatchIntervalMs || 15000;
+        this.disableAppInsights = this.disableAppInsights || false;
+        this.samplingPercentage = this.samplingPercentage || 100;
+        this.correlationIdRetryIntervalMs = this.correlationIdRetryIntervalMs || 30 * 1000;
+        // this.enableWebInstrumentation = this.enableWebInstrumentation || this.enableAutoWebSnippetInjection || false;
+        this.webInstrumentationConfig = this.webInstrumentationConfig || null;
+        // this.enableAutoWebSnippetInjection = this.enableWebInstrumentation;
+        this.correlationHeaderExcludedDomains =
+            this.correlationHeaderExcludedDomains ||
+            [
+                "*.core.windows.net",
+                "*.core.chinacloudapi.cn",
+                "*.core.cloudapi.de",
+                "*.core.usgovcloudapi.net",
+                "*.core.microsoft.scloud",
+                "*.core.eaglex.ic.gov"
+            ];
+
+        this.ignoreLegacyHeaders = true;
+        this.webInstrumentationConnectionString = this.webInstrumentationConnectionString || this._webInstrumentationConnectionString || "";
+        this.webSnippetConnectionString = this.webInstrumentationConnectionString;
+    }
+
+    public set instrumentationKey(iKey: string) {
+        if (!config._validateInstrumentationKey(iKey)) {
+            Logger.getInstance().warn("An invalid instrumentation key was provided. There may be resulting telemetry loss", this.instrumentationKey);
+        }
+        this._instrumentationKey = iKey;
+    }
+
+    public get instrumentationKey(): string {
+        return this._instrumentationKey;
+    }
+
+    public set webSnippetConnectionString(connectionString: string) {
+        this._webInstrumentationConnectionString = connectionString;
+    }
+
+    public get webSnippetConnectionString(): string {
+        return this._webInstrumentationConnectionString;
+    }
+
+    public set webInstrumentationConnectionString(connectionString: string) {
+        this._webInstrumentationConnectionString = connectionString;
+    }
+
+    public get webInstrumentationConnectionString() {
+        return this._webInstrumentationConnectionString;
+    }
+
+    /**
+    * Validate UUID Format
+    * Specs taken from breeze repo
+    * The definition of a VALID instrumentation key is as follows:
+    * Not none
+    * Not empty
+    * Every character is a hex character [0-9a-f]
+    * 32 characters are separated into 5 sections via 4 dashes
+    * First section has 8 characters
+    * Second section has 4 characters
+    * Third section has 4 characters
+    * Fourth section has 4 characters
+    * Fifth section has 12 characters
+    */
+    private static _validateInstrumentationKey(iKey: string): boolean {
+        const UUID_Regex = "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$";
+        const regexp = new RegExp(UUID_Regex);
+        return regexp.test(iKey);
+    }
+}
+
+export = config;
\ No newline at end of file
diff --git a/src/shim/context.ts b/src/shim/context.ts
index d550e81..b60f1fe 100644
--- a/src/shim/context.ts
+++ b/src/shim/context.ts
@@ -1,12 +1,14 @@
-﻿export class Context {
-    public keys: any;
+﻿import ContextTagKeys = require("./util/contextTagKeys");
+
+export class Context {
+    public keys: ContextTagKeys;
     public tags: { [key: string]: string };
     public static DefaultRoleName = "Web";
     public static appVersion: { [path: string]: string } = {};
     public static sdkVersion: string = null;
 
     constructor(packageJsonPath?: string) {
-        this.keys = {};
+        this.keys = new ContextTagKeys();
         this.tags = <{ [key: string]: string }>{};
     }
 }
diff --git a/src/shim/applicationinsights.ts b/src/shim/shim-applicationinsights.ts
similarity index 76%
rename from src/shim/applicationinsights.ts
rename to src/shim/shim-applicationinsights.ts
index df1df18..627a811 100644
--- a/src/shim/applicationinsights.ts
+++ b/src/shim/shim-applicationinsights.ts
@@ -1,15 +1,15 @@
 import * as http from "http";
 import { DiagLogLevel, SpanContext } from "@opentelemetry/api";
-
 import { CorrelationContextManager } from "./correlationContextManager";
 import * as azureFunctionsTypes from "@azure/functions";
 import { Span } from "@opentelemetry/sdk-trace-base";
 import { Logger } from "./logging";
-import { ICorrelationContext, HttpRequest } from "./types";
+import { ICorrelationContext, HttpRequest, DistributedTracingModes } from "./types";
 import { TelemetryClient } from "./telemetryClient";
 import * as Contracts from "../declarations/contracts";
-import { ApplicationInsightsOptions, ExtendedMetricType } from "../types";
-import { DistributedTracingModes } from "../shim/types";
+import { ApplicationInsightsOptions } from "../types";
+import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http";
+import ConfigHelper = require("./util/configHelper");
 
 // We export these imports so that SDK users may use these classes directly.
 // They're exposed using "export import" so that types are passed along as expected
@@ -20,6 +20,11 @@ export { Contracts, DistributedTracingModes, HttpRequest, TelemetryClient };
  * with its own configuration, use `new TelemetryClient(instrumentationKey?)`.
  */
 export let defaultClient: TelemetryClient;
+
+/**
+ * Flag to let the TelemetryClient know that setup has been called from the shim
+ */
+export let _setupCalled = false;
 // export let liveMetricsClient: QuickPulseStateManager;
 
 
@@ -37,6 +42,7 @@ let _options: ApplicationInsightsOptions;
  * and start the SDK.
  */
 export function setup(setupString?: string) {
+    _setupCalled = true;
     // Save the setup string and create a config to modify with other functions in this file
     _setupString = setupString;
     if (!_options) {
@@ -44,6 +50,7 @@ export function setup(setupString?: string) {
     } else {
         Logger.getInstance().info("Cannot run applicationinsights.setup() more than once.");
     }
+    defaultClient = new TelemetryClient(_options);
     return Configuration;
 }
 
@@ -54,12 +61,13 @@ export function setup(setupString?: string) {
  * @returns {ApplicationInsights} this class
  */
 export function start() {
-    if (!defaultClient) {
-        // Creates a new TelemetryClient that uses the _config we configure via the other functions in this file
-        defaultClient = new TelemetryClient(_options);
-    } else {
-        Logger.getInstance().info("Cannot run applicationinsights.start() more than once.");
+    // Creates a new TelemetryClient that uses the _config we configure via the other functions in this file
+    const httpOptions: HttpInstrumentationConfig | undefined = _options?.instrumentationOptions?.http;
+    if (httpOptions?.ignoreIncomingRequestHook && httpOptions?.ignoreOutgoingRequestHook) {
+        _options.instrumentationOptions.http.enabled = false;
+        Logger.getInstance().info("Both ignoreIncomingRequestHook and ignoreOutgoingRequestHook are set to true. Disabling http instrumentation.");
     }
+    defaultClient.start(_options);
     return Configuration;
 }
 
@@ -124,9 +132,11 @@ export class Configuration {
      */
     public static setAutoCollectConsole(value: boolean, collectConsoleLog = false) {
         if (_options) {
-            _options.logInstrumentations.bunyan.enabled = value;
-            _options.logInstrumentations.winston.enabled = value;
-            _options.logInstrumentations.console.enabled = collectConsoleLog;
+            _options.logInstrumentations = {
+                bunyan: { enabled: value },
+                winston: { enabled: value },
+                console: { enabled: collectConsoleLog },
+            }
         }
         return Configuration;
     }
@@ -150,21 +160,7 @@ export class Configuration {
      * @returns {Configuration} this class
      */
     public static setAutoCollectPerformance(value: boolean, collectExtendedMetrics: any) {
-        if (_options) {
-            _options.enableAutoCollectPerformance = value;
-            if (typeof collectExtendedMetrics === "object") {
-                _options.extendedMetrics = { ...collectExtendedMetrics }
-            }
-            if (collectExtendedMetrics === "boolean") {
-                if (!collectExtendedMetrics) {
-                    _options.extendedMetrics = {
-                        [ExtendedMetricType.gc]: true,
-                        [ExtendedMetricType.heap]: true,
-                        [ExtendedMetricType.loop]: true
-                    }
-                }
-            }
-        }
+        ConfigHelper.setAutoCollectPerformance(_options, value, collectExtendedMetrics);
         return Configuration;
     }
 
@@ -190,13 +186,24 @@ export class Configuration {
         return Configuration;
     }
 
+    /**
+     * Sets the state of Web snippet injection
+     * @param value if true Web snippet will try to be injected in server response
+     * @param WebSnippetConnectionString if provided, Web snippet injection will use this ConnectionString. Default to use the connectionString in Node.js app initialization.
+     * @returns {Configuration} this class
+     */
+    public static enableWebInstrumentation(value: boolean, WebSnippetConnectionString?: string) {
+        Logger.getInstance().info("Web snippet injection is not implemented and this method is a no-op.");
+        return Configuration;
+    }
+
     /**
      * Sets the state of request tracking (enabled by default)
      * @param value if true requests will be sent to Application Insights
      * @returns {Configuration} this class
      */
     public static setAutoCollectRequests(value: boolean) {
-        // TODO: Implement this
+        ConfigHelper.setAutoCollectRequests(_options, value);
         return Configuration;
     }
 
@@ -206,7 +213,7 @@ export class Configuration {
      * @returns {Configuration} this class
      */
     public static setAutoCollectDependencies(value: boolean) {
-        // TODO: Implement this
+        ConfigHelper.setAutoCollectDependencies(_options, value);
         return Configuration;
     }
 
@@ -217,7 +224,12 @@ export class Configuration {
      * @returns {Configuration} this class
      */
     public static setAutoDependencyCorrelation(value: boolean, useAsyncHooks?: boolean) {
-        // TODO: Implement this
+        if (!value) {
+            CorrelationContextManager.disable();
+        }
+        if (useAsyncHooks === false) {
+            Logger.getInstance().warn("The use of non async hooks is no longer supported.");
+        }
         return Configuration;
     }
 
@@ -231,6 +243,12 @@ export class Configuration {
      * @param maxBytesOnDisk The maximum size (in bytes) that the created temporary directory for cache events can grow to, before caching is disabled.
      * @returns {Configuration} this class
      */
+    public static setUseDiskRetryCaching(value: boolean, resendInterval?: number, maxBytesOnDisk?: number) {
+        if (defaultClient) {
+            defaultClient.setUseDiskRetryCaching(value, resendInterval, maxBytesOnDisk);
+        }
+        return Configuration;
+    }
 
     /**
      * Enables debug and warning Logger for AppInsights itself.
@@ -238,7 +256,7 @@ export class Configuration {
      * @param enableWarningLogger if true, enables warning Logger
      * @returns {Configuration} this class
      */
-    public static setInternalLogger(enableDebugLogger = false, enableWarningLogger = true) {
+    public static setInternalLogging(enableDebugLogger = false, enableWarningLogger = true) {
         if (enableDebugLogger) {
             Logger.getInstance().updateLogLevel(DiagLogLevel.DEBUG);
             return Configuration;
@@ -252,6 +270,16 @@ export class Configuration {
         return Configuration;
     }
 
+    /**
+     * Enable automatic incoming request tracking when using Azure Functions
+     * @param value if true auto collection of incoming requests will be enabled
+     * @returns {Configuration} this class
+     */
+    public static setAutoCollectIncomingRequestAzureFunctions(value: boolean) {
+        Logger.getInstance().info("Auto collect incoming request is not implemented and this method is a no-op.");
+        return Configuration;
+    }
+
     /**
      * Enables communication with Application Insights Live Metrics.
      * @param enable if true, enables communication with the live metrics service
diff --git a/src/shim/telemetryClient.ts b/src/shim/telemetryClient.ts
index b94f4e9..847f43f 100644
--- a/src/shim/telemetryClient.ts
+++ b/src/shim/telemetryClient.ts
@@ -4,7 +4,7 @@
 import { LogRecord } from "@opentelemetry/api-logs";
 import { LogRecord as SDKLogRecord } from "@opentelemetry/sdk-logs";
 import { AzureMonitorOpenTelemetryClient } from "@azure/monitor-opentelemetry";
-import { Attributes, context, SpanKind, SpanOptions, SpanStatusCode } from "@opentelemetry/api";
+import { Attributes, context, DiagLogLevel, SpanKind, SpanOptions, SpanStatusCode } from "@opentelemetry/api";
 import { IdGenerator, RandomIdGenerator } from "@opentelemetry/sdk-trace-base";
 import { SemanticAttributes } from "@opentelemetry/semantic-conventions";
 import * as Contracts from "../declarations/contracts";
@@ -14,16 +14,20 @@ import { Logger } from "./logging";
 import { Util } from "./util";
 import { AutoCollectConsole } from "./autoCollection/console";
 import { AutoCollectExceptions, parseStack } from "./autoCollection/exceptions";
-import { ApplicationInsightsOptions } from "../types";
+import { ApplicationInsightsOptions, ExtendedMetricType } from "../types";
 import { InternalConfig } from "./configuration/internal";
-
+import { IConfig } from "../shim/types";
+import Config = require("./configuration/config");
+import { dispose, Configuration, _setupCalled } from "./shim-applicationinsights";
+import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http";
+import ConfigHelper = require("./util/configHelper");
 
 /**
  * Application Insights telemetry client provides interface to track telemetry items, register telemetry initializers and
  * and manually trigger immediate sending (flushing)
  */
 export class TelemetryClient {
-    private readonly _internalConfig: InternalConfig;
+    private _internalConfig: InternalConfig;
     private _options: ApplicationInsightsOptions;
     private _client: AzureMonitorOpenTelemetryClient;
     private _console: AutoCollectConsole;
@@ -31,12 +35,17 @@ export class TelemetryClient {
     private _idGenerator: IdGenerator;
     public context: Context;
     public commonProperties: { [key: string]: string }; // TODO: Add setter so Resources are updated
+    public config: IConfig;
 
     /**
      * Constructs a new client of the client
      * @param setupString the Connection String or Instrumentation Key to use (read from environment variable if not specified)
      */
     constructor(input?: string | ApplicationInsightsOptions) {
+        // If the user does not pass a new connectionString, use the one defined in the _options
+        const config = new Config(typeof(input) === "string" ? input : input?.azureMonitorExporterConfig?.connectionString);
+        this.config = config;
+
         this.commonProperties = {};
         this.context = new Context();
         if (input) {
@@ -46,14 +55,212 @@ export class TelemetryClient {
                 // TODO: Add Support for iKey as well
                 this._options = {
                     azureMonitorExporterConfig: {
-                        connectionString: input
-                    }
+                        connectionString: input,
+                    },
                 };
             }
         }
-        // Internal config with extra configuration not available in Azure Monitor Distro
-        this._internalConfig = new InternalConfig(this._options);
+        // If not running the shim, we should start the AzureMonitorClient as a part of the constructor
+        if (!_setupCalled) {
+            this.start();
+        }
+    }
+
+    /**
+     * Parse the config property to set the appropriate values on the ApplicationInsightsOptions
+     * @param input 
+     */
+    private _parseConfig(input?: ApplicationInsightsOptions) {
+        // If we have a defined input (in the case that we are initializing from the start method) then we should use that
+        if (input) {
+            this._options = input;
+        }
+
+        const resendInterval: number | undefined = this.config.enableResendInterval;
+        if (this.config.disableAppInsights) {
+            dispose();
+        }
+
+        if (this.config.instrumentationKey && this.config.endpointUrl) {
+            this._options.azureMonitorExporterConfig.connectionString = `InstrumentationKey=${this.config.instrumentationKey};IngestionEndpoint=${this.config.endpointUrl}`;
+        }
+
+        this._options.samplingRatio = this.config.samplingPercentage ? (this.config.samplingPercentage / 100) : 1;
+
+        this._options.instrumentationOptions = {
+            http: {
+                ...input?.instrumentationOptions?.http,
+                ignoreOutgoingUrls: this.config.correlationHeaderExcludedDomains,
+            } as HttpInstrumentationConfig,
+        }
+
+        if (this.config.aadTokenCredential) {
+            this._options.azureMonitorExporterConfig.aadTokenCredential = this.config.aadTokenCredential;
+        }
+
+        if (typeof(this.config.enableAutoCollectConsole) === "boolean") {
+            const setting: boolean = this.config.enableAutoCollectConsole;
+            this._options.logInstrumentations = {
+                ...this._options.logInstrumentations,
+                console: { enabled: setting },
+            }
+        }
+
+        if (typeof(this.config.enableAutoCollectExceptions) === "boolean") {
+            this._options.enableAutoCollectExceptions = this.config.enableAutoCollectExceptions;
+        }
+
+        if (typeof(this.config.enableAutoCollectDependencies) === "boolean") {
+            ConfigHelper.setAutoCollectDependencies(this._options, this.config.enableAutoCollectDependencies);
+        }
+
+        if (typeof(this.config.enableAutoCollectRequests) === "boolean") {
+            ConfigHelper.setAutoCollectRequests(this._options, this.config.enableAutoCollectRequests);
+        }
+
+        if (typeof(this.config.enableAutoCollectPerformance) === "boolean") {
+            ConfigHelper.setAutoCollectPerformance(this._options, this.config.enableAutoCollectPerformance);
+        }
+
+        if (typeof(this.config.enableAutoCollectExternalLoggers) === "boolean") {
+            this._options.logInstrumentations = {
+                ...this._options.logInstrumentations,
+                winston: { enabled: this.config.enableAutoCollectExternalLoggers },
+                bunyan: { enabled: this.config.enableAutoCollectExternalLoggers },
+            }
+        }
+
+        if (typeof(this.config.enableAutoCollectPreAggregatedMetrics) === "boolean") {
+            this._options.enableAutoCollectStandardMetrics = this.config.enableAutoCollectPreAggregatedMetrics;
+        }
+
+        if (typeof(this.config.enableAutoCollectHeartbeat) === "boolean") {
+            Configuration.setAutoCollectHeartbeat(this.config.enableAutoCollectHeartbeat);
+        }
+
+        if (typeof(this.config.enableAutoDependencyCorrelation) === "boolean") {
+            Configuration.setAutoDependencyCorrelation(this.config.enableAutoDependencyCorrelation);
+        }
+
+        if (typeof(this.config.enableAutoCollectIncomingRequestAzureFunctions) === "boolean") {
+            Configuration.setAutoCollectIncomingRequestAzureFunctions(this.config.enableAutoCollectIncomingRequestAzureFunctions);
+        }
+
+        if (typeof(this.config.enableSendLiveMetrics) === "boolean") {
+            Configuration.setSendLiveMetrics(this.config.enableSendLiveMetrics);
+        }
+
+        if (typeof(this.config.enableUseDiskRetryCaching) === "boolean") {
+            Configuration.setUseDiskRetryCaching(this.config.enableUseDiskRetryCaching);
+        }
+
+        if (this.config.enableUseAsyncHooks === false) {
+            Logger.getInstance().warn("The use of non async hooks is no longer supported.");
+        }
+
+        if (typeof(this.config.distributedTracingMode) === "boolean") {
+            Configuration.setDistributedTracingMode(this.config.distributedTracingMode);
+        }
 
+        if (typeof(this.config.enableAutoCollectExtendedMetrics) === "boolean") {
+            const setting = this.config.enableAutoCollectExtendedMetrics;
+            this._options.extendedMetrics = {
+                [ExtendedMetricType.gc]: setting,
+                [ExtendedMetricType.heap]: setting,
+                [ExtendedMetricType.loop]: setting,
+            }
+        }
+
+        if (this.config.enableResendInterval) {
+            Configuration.setUseDiskRetryCaching(true, this.config.enableResendInterval);
+        }
+
+        if (this.config.enableMaxBytesOnDisk) {
+            Configuration.setUseDiskRetryCaching(true, resendInterval, this.config.enableMaxBytesOnDisk);
+        }
+
+        if (typeof(this.config.enableInternalDebugLogging) === "boolean") {
+            if (this.config.enableInternalDebugLogging) {
+                Logger.getInstance().updateLogLevel(DiagLogLevel.DEBUG);
+            }
+        }
+
+        if (typeof(this.config.enableInternalWarningLogging) === "boolean") {
+            if (this.config.enableInternalWarningLogging) {
+                Logger.getInstance().updateLogLevel(DiagLogLevel.WARN);
+            }
+        }
+
+        // Disable or enable all extended metrics
+        if (this.config.disableAllExtendedMetrics === true) {
+            for (const type in this._options.extendedMetrics) {
+                this._options.extendedMetrics[type] = false;
+            }
+            this._options.extendedMetrics = {
+                [ExtendedMetricType.gc]: false,
+                [ExtendedMetricType.heap]: false,
+                [ExtendedMetricType.loop]: false,
+            };
+        }
+
+        if (typeof(this.config.disableStatsbeat) === "boolean") {
+            Logger.getInstance().warn("The disableStatsbeat configuration option is deprecated.");
+        }
+
+        if (this.config.extendedMetricDisablers) {
+            const disabler = this.config.extendedMetricDisablers;
+            this._options.extendedMetrics[disabler] = false;
+        }
+
+        if (this.config.ignoreLegacyHeaders === false) {
+            Logger.getInstance().warn("LegacyHeaders are not supported by the shim.");
+        }
+
+        if (this.config.proxyHttpUrl || this.config.proxyHttpsUrl) {
+            const proxyUrl = new URL(this.config.proxyHttpsUrl || this.config.proxyHttpUrl);
+            this._options.azureMonitorExporterConfig.proxyOptions = {
+                host: proxyUrl.hostname,
+                port: Number(proxyUrl.port),
+            }
+        }
+
+        if (this.config.maxBatchSize) {
+            Logger.getInstance().warn("The maxBatchSize configuration option is not supported by the shim.");
+        }
+
+        if (this.config.maxBatchIntervalMs) {
+            this._options.otlpTraceExporterConfig = { ...this._options.otlpTraceExporterConfig, timeoutMillis: this.config.maxBatchIntervalMs };
+            this._options.otlpMetricExporterConfig = { ...this._options.otlpMetricExporterConfig, timeoutMillis: this.config.maxBatchIntervalMs };
+            this._options.otlpLogExporterConfig = { ...this._options.otlpLogExporterConfig, timeoutMillis: this.config.maxBatchIntervalMs };
+        }
+
+        if (this.config.correlationIdRetryIntervalMs) {
+            Logger.getInstance().warn("The correlationIdRetryIntervalMs configuration option is not supported by the shim.");
+        }
+
+        if (this.config.enableLoggerErrorToTrace) {
+            Logger.getInstance().warn("The enableLoggerErrorToTrace configuration option is not supported by the shim.");
+        }
+
+        if (this.config.httpAgent || this.config.httpsAgent) {
+            Logger.getInstance().warn("The httpAgent and httpsAgent configuration options are not supported by the shim.");
+        }
+
+        if (this.config.enableWebInstrumentation || this.config.webInstrumentationConfig || this.config.webInstrumentationSrc || this.config.webInstrumentationConnectionString) {
+            Logger.getInstance().warn("The webInstrumentation configuration options are not supported by the shim.");
+        }
+    }
+    
+    /**
+     * Starts automatic collection of telemetry. Prior to calling start no telemetry will be collected
+     * @param input Set of options to configure the Azure Monitor Client
+     */
+    public start(input?: ApplicationInsightsOptions) {
+        // Only parse config if we're running the shim
+        if (_setupCalled) {
+            this._parseConfig(input);
+        }
+        this._internalConfig = new InternalConfig(this._options);
         this._client = new AzureMonitorOpenTelemetryClient(this._options);
         this._console = new AutoCollectConsole(this);
         if (this._internalConfig.enableAutoCollectExceptions) {
@@ -307,7 +514,7 @@ export class TelemetryClient {
             contextObjects?: { [name: string]: any }
         ) => boolean
     ) {
-        throw new Error("Not implemented");
+        Logger.getInstance().warn("addTelemetryProcessor is not supported in ApplicationInsights any longer.");
     }
 
     /*
@@ -436,4 +643,16 @@ export class TelemetryClient {
         const record = this._telemetryToLogRecord(telemetry, baseType, baseData);
         return record;
     }
+
+    public trackNodeHttpRequestSync(telemetry: Contracts.NodeHttpRequestTelemetry) {
+        Logger.getInstance().warn("trackNodeHttpRequestSync is not implemented and is a no-op. Please use trackRequest instead.");
+    }
+
+    public trackNodeHttpRequest(telemetry: Contracts.NodeHttpRequestTelemetry) {
+        Logger.getInstance().warn("trackNodeHttpRequest is not implemented and is a no-op. Please use trackRequest instead.");
+    }
+
+    public trackNodeHttpDependency(telemetry: Contracts.NodeHttpRequestTelemetry) {
+        Logger.getInstance().warn("trackNodeHttpDependency is not implemented and is a no-op. Please use trackDependency instead.");
+    }
 }
diff --git a/src/shim/types.ts b/src/shim/types.ts
index 1a14613..78d3cb9 100644
--- a/src/shim/types.ts
+++ b/src/shim/types.ts
@@ -1,6 +1,10 @@
 // Copyright (c) Microsoft Corporation.
 // Licensed under the MIT license.
 
+import { TokenCredential } from "@azure/core-auth";
+import * as http from "http";
+import https = require("https");
+
 export enum DistributedTracingModes {
     /**
      * Send Application Insights correlation headers
@@ -103,3 +107,245 @@ export interface TraceContext {
     | null
     | undefined;
 }
+
+/**
+ * Subset of Connection String fields which this SDK can parse. Lower-typecased to
+ * allow for case-insensitivity across field names
+ * @type ConnectionStringKey
+ */
+export interface ConnectionString {
+    instrumentationkey?: string;
+    ingestionendpoint?: string;
+    liveendpoint?: string;
+    location?: string;
+    endpointsuffix?: string;
+
+    // Note: this is a node types backcompat equivalent to
+    // type ConnectionString = { [key in ConnectionStringKey]?: string }
+}
+
+export type ConnectionStringKey = "instrumentationkey" | "ingestionendpoint" | "liveendpoint" | "location"| "endpointsuffix";
+
+export interface IBaseConfig {
+    /** Application Insights resource instrumentation key */
+    instrumentationKey: string;
+    /** The ingestion endpoint to send telemetry payloads to */
+    endpointUrl: string;
+    /** The maximum number of telemetry items to include in a payload to the ingestion endpoint (Default 250) */
+    maxBatchSize: number;
+    /** The maximum amount of time to wait for a payload to reach maxBatchSize (Default 15000) */
+    maxBatchIntervalMs: number;
+    /** A flag indicating if telemetry transmission is disabled (Default false) */
+    disableAppInsights: boolean;
+    /** The percentage of telemetry items tracked that should be transmitted (Default 100) */
+    samplingPercentage: number;
+    /** The time to wait before retrying to retrieve the id for cross-component correlation (Default 30000) */
+    correlationIdRetryIntervalMs: number;
+    /** A list of domains to exclude from cross-component header injection */
+    correlationHeaderExcludedDomains: string[];
+    /** A proxy server for SDK HTTP traffic (Optional, Default pulled from `http_proxy` environment variable) */
+    proxyHttpUrl: string;
+    /** A proxy server for SDK HTTPS traffic (Optional, Default pulled from `https_proxy` environment variable) */
+    proxyHttpsUrl: string;
+    /** Disable including legacy headers in outgoing requests, x-ms-request-id */
+    ignoreLegacyHeaders: boolean;
+    /**
+     * Sets the distributed tracing modes. If W3C mode is enabled, W3C trace context
+     * headers (traceparent/tracestate) will be parsed in all incoming requests, and included in outgoing
+     * requests. In W3C mode, existing back-compatibility AI headers will also be parsed and included.
+     * Enabling W3C mode will not break existing correlation with other Application Insights instrumented
+     * services. Default=AI
+    */
+    distributedTracingMode: DistributedTracingModes;
+    /**
+     * Sets the state of console
+     * if true logger activity will be sent to Application Insights
+     */
+    enableAutoCollectExternalLoggers: boolean;
+    /**
+     * Sets the state of logger tracking (enabled by default for third-party loggers only)
+     * if true, logger autocollection will include console.log calls (default false)
+     */
+    enableAutoCollectConsole: boolean;
+    /**
+     * Sets tracking error logs from loggers (console, bunyan, winston) as traces. If true errors will be returned as traces
+     */
+    enableLoggerErrorToTrace: boolean;
+    /**
+     * Sets the state of exception tracking (enabled by default)
+     * if true uncaught exceptions will be sent to Application Insights
+     */
+    enableAutoCollectExceptions: boolean;
+    /**
+     * Sets the state of performance tracking (enabled by default)
+     * if true performance counters will be collected every second and sent to Application Insights
+     */
+    enableAutoCollectPerformance: boolean;
+    /**
+     * Sets the state of performance tracking (enabled by default)
+     * if true, extended metrics counters will be collected every minute and sent to Application Insights
+     */
+    enableAutoCollectExtendedMetrics: boolean | IDisabledExtendedMetrics;
+    /**
+     * Sets the state of pre aggregated metrics tracking (enabled by default)
+     * if true pre aggregated metrics will be collected every minute and sent to Application Insights
+     */
+    enableAutoCollectPreAggregatedMetrics: boolean;
+    /**
+     * Sets the state of request tracking (enabled by default)
+     * if true HeartBeat metric data will be collected every 15 minutes and sent to Application Insights
+     */
+    enableAutoCollectHeartbeat: boolean;
+    /**
+     * Sets the state of request tracking (enabled by default)
+     * if true requests will be sent to Application Insights
+     */
+    enableAutoCollectRequests: boolean;
+    /**
+     * Sets the state of dependency tracking (enabled by default)
+     * if true dependencies will be sent to Application Insights
+     */
+    enableAutoCollectDependencies: boolean;
+    /**
+     * Sets the state of automatic dependency correlation (enabled by default)
+     * if true dependencies will be correlated with requests
+     */
+    enableAutoDependencyCorrelation: boolean;
+    /**
+     * Sets the state of automatic dependency correlation (enabled by default)
+     * if true, forces use of experimental async_hooks module to provide correlation. If false, instead uses only patching-based techniques. If left blank, the best option is chosen for you based on your version of Node.js.
+     */
+    enableUseAsyncHooks: boolean;
+    /**
+     * Enable or disable disk-backed retry caching to cache events when client is offline (enabled by default)
+     * Note that this method only applies to the default client. Disk-backed retry caching is disabled by default for additional clients.
+     * For enable for additional clients, use client.channel.setUseDiskRetryCaching(true).
+     * These cached events are stored in your system or user's temporary directory and access restricted to your user when possible.
+     * enableUseDiskRetryCaching if true events that occured while client is offline will be cached on disk
+     * enableResendInterval The wait interval for resending cached events.
+     * enableMaxBytesOnDisk The maximum size (in bytes) that the created temporary directory for cache events can grow to, before caching is disabled.
+     */
+    enableUseDiskRetryCaching: boolean;
+    enableResendInterval: number;
+    enableMaxBytesOnDisk: number;
+    /**
+     * Enables debug and warning logging for AppInsights itself.
+     * if true, enables debug logging
+     */
+    enableInternalDebugLogging: boolean;
+    /**
+     * Enables debug and warning logging for AppInsights itself.
+     * if true, enables warning logging
+     */
+    enableInternalWarningLogging: boolean;
+    /**
+    * Enables communication with Application Insights Live Metrics.
+    * if true, enables communication with the live metrics service
+    */
+    enableSendLiveMetrics: boolean;
+    /**
+    * Disable all environment variables set
+    */
+    disableAllExtendedMetrics: boolean;
+    /**
+    * Disable individual environment variables set. eg. "extendedMetricDisablers": "..."
+    */
+    extendedMetricDisablers: string;
+    /**
+    * Disable Statsbeat
+    */
+    disableStatsbeat: boolean;
+    /**
+    * Live Metrics custom host
+    */
+    quickPulseHost: string;
+    /**
+     * @deprecated, please use enableWebInstrumentation instead
+     * Enable web snippet auto html injection, default to false, this config is NOT exposed in documentation after version 2.3.5
+     */
+    enableAutoWebSnippetInjection?: boolean;
+    /**
+     * @deprecated, Please use webInstrumentationConnectionString instead
+     * Application Insights resource connection string for web snippet, this config is NOT exposed in documentation after version 2.3.5
+     * Note: if no valid connection string is provided here, web snippet will use the connection string during initializing Nodejs SDK
+     */
+    webSnippetConnectionString?: string;
+    /**
+     * Enable web instrumentation and automatic monitoring, default to false
+     */
+    enableWebInstrumentation: boolean;
+    /**
+    * Enable automatic incoming request tracking when running in Azure Functions
+    */
+    enableAutoCollectIncomingRequestAzureFunctions: boolean;
+    /**
+    * Application Insights resource connection string for web instrumentation and automatic monitoring
+    * Note: if no VALID connection string is provided here, web instrumentation will use the connection string during initializing Nodejs SDK
+    */
+    webInstrumentationConnectionString?: string;
+    /**
+     * Application Insights web Instrumentation config
+     * NOTE: if no config is provided here, web instrumentation will use default values
+     * IMPORTANT NOTE: please convert any functions and objects to double-quoted strings, otherwise they will be skipped.
+     * For example: if you want to pass in a function: function() { return 'hi'; },
+     * you SHOULD wrap it in double-quoted string: "function () {\n  return \"hi\";\n}"
+     * see more Application Insights web Instrumentation config details at: https://github.com/microsoft/ApplicationInsights-JS#configuration
+     */
+    webInstrumentationConfig?: IWebInstrumentationConfig[];
+    /**
+    * Application Insights web Instrumentation CDN url
+    * NOTE: this config can be changed from env variable: APPLICATIONINSIGHTS_WEB_INSTRUMENTATION_SOURCE or Json Config: webInstrumentationSrc
+    * If no resouce is provided here, default CDN endpoint: https://js.monitor.azure.com/scripts/b/ai will be used
+    * see more details at: https://github.com/microsoft/ApplicationInsights-JS
+    */
+    webInstrumentationSrc?: string;
+}
+
+export interface IConfig extends IBaseConfig {
+    /** AAD TokenCredential to use to authenticate the app */
+    aadTokenCredential?: TokenCredential;
+
+    /** An http.Agent to use for SDK HTTP traffic (Optional, Default undefined) */
+    httpAgent: http.Agent;
+
+    /** An https.Agent to use for SDK HTTPS traffic (Optional, Default undefined) */
+    httpsAgent: https.Agent;
+}
+
+export interface IEnvironmentConfig {
+    /** Connection String used to send telemetry payloads to */
+    connectionString: string;
+    /**
+    * In order to track context across asynchronous calls,
+    * some changes are required in third party libraries such as mongodb and redis.
+    * By default ApplicationInsights will use diagnostic-channel-publishers to monkey-patch some of these libraries.
+    * This property is to disable the feature.
+    * Note that by setting this flag, events may no longer be correctly associated with the right operation.
+    */
+    noDiagnosticChannel: boolean;
+    /**
+    * Disable individual monkey-patches.
+    * Set `noPatchModules` to a comma separated list of packages to disable.
+    * e.g. `"noPatchModules": "console,redis"` to avoid patching the console and redis packages.
+    * The following modules are available: `azuresdk, bunyan, console, mongodb, mongodb-core, mysql, redis, winston, pg`, and `pg-pool`.
+    */
+    noPatchModules: string;
+    /**
+    * HTTPS without a passed in agent
+    */
+    noHttpAgentKeepAlive: boolean;
+}
+
+export interface IJsonConfig extends IBaseConfig, IEnvironmentConfig { }
+
+export interface IWebInstrumentationConfig {
+    /**
+     * Name of Application Insights web Instrumentation config to be changed
+     * see more Application Insights web Instrumentation config details at: https://github.com/microsoft/ApplicationInsights-JS#configuration
+     */
+    name: string;
+    /**
+    * value provided to replace the default config value above
+    */
+    value: string | boolean | number;
+}
\ No newline at end of file
diff --git a/src/shim/util/configHelper.ts b/src/shim/util/configHelper.ts
new file mode 100644
index 0000000..8aab205
--- /dev/null
+++ b/src/shim/util/configHelper.ts
@@ -0,0 +1,77 @@
+import { HttpInstrumentationConfig } from "@opentelemetry/instrumentation-http";
+import { ApplicationInsightsOptions, ExtendedMetricType } from "../../types";
+import * as http from "http";
+
+export function setAutoCollectPerformance(options: ApplicationInsightsOptions, value: boolean, collectExtendedMetrics?: any) {
+    if (options) {
+        options.enableAutoCollectPerformance = value;
+        if (typeof collectExtendedMetrics === "object") {
+            options.extendedMetrics = { ...collectExtendedMetrics }
+        }
+        if (collectExtendedMetrics === "boolean" || !collectExtendedMetrics) {
+            options.extendedMetrics = {
+                [ExtendedMetricType.gc]: value,
+                [ExtendedMetricType.heap]: value,
+                [ExtendedMetricType.loop]: value,
+            }
+        }
+    }
+}
+
+export function setAutoCollectRequests(options: ApplicationInsightsOptions, value: boolean) {
+    if (options) {
+        if (value === false) {
+            options.instrumentationOptions = {
+                http: {
+                    ...options.instrumentationOptions?.http,
+                    enabled: true,
+                    // eslint-disable-next-line @typescript-eslint/no-unused-vars
+                    ignoreIncomingRequestHook: (request: http.RequestOptions) => true,
+                } as HttpInstrumentationConfig
+            };
+        } else {
+            options.instrumentationOptions = {
+                http: {
+                    ...options.instrumentationOptions?.http,
+                    enabled: true,
+                    // eslint-disable-next-line @typescript-eslint/no-unused-vars
+                    ignoreIncomingRequestHook: (request: http.RequestOptions) => false,
+                } as HttpInstrumentationConfig
+            };
+        }
+    }
+}
+
+export function setAutoCollectDependencies(options: ApplicationInsightsOptions, value: boolean) {
+    if (options) {
+        if (value === false) {
+            options.instrumentationOptions = {
+                http: {
+                    ...options.instrumentationOptions?.http,
+                    enabled: true,
+                    // eslint-disable-next-line @typescript-eslint/no-unused-vars
+                    ignoreOutgoingRequestHook: (request: http.RequestOptions) => true,
+                } as HttpInstrumentationConfig
+            };
+        } else {
+            options.instrumentationOptions = {
+                http: {
+                    ...options.instrumentationOptions?.http,
+                    enabled: true,
+                    // eslint-disable-next-line @typescript-eslint/no-unused-vars
+                    ignoreOutgoingRequestHook: (request: http.RequestOptions) => false,
+                } as HttpInstrumentationConfig
+            };
+        }
+    }
+}
+
+export function setAutoCollectConsole(options: ApplicationInsightsOptions, value: boolean, enableConsole: boolean, collectConsoleLog = false) {
+    if (options) {
+        options.logInstrumentations = {
+            bunyan: { enabled: value },
+            winston: { enabled: value },
+            console: { enabled: collectConsoleLog },
+        }
+    }
+}
diff --git a/src/shim/util/contextTagKeys.ts b/src/shim/util/contextTagKeys.ts
new file mode 100644
index 0000000..0446b2d
--- /dev/null
+++ b/src/shim/util/contextTagKeys.ts
@@ -0,0 +1,153 @@
+class ContextTagKeys {
+
+    /**
+     * Application version. Information in the application context fields is always about the application that is sending the telemetry.
+     */
+    public applicationVersion: string;
+
+    /**
+     * Unique client device id. Computer name in most cases.
+     */
+    public deviceId: string;
+
+    /**
+     * Device locale using <language>-<REGION> pattern, following RFC 5646. Example 'en-US'.
+     */
+    public deviceLocale: string;
+
+    /**
+     * Model of the device the end user of the application is using. Used for client scenarios. If this field is empty then it is derived from the user agent.
+     */
+    public deviceModel: string;
+
+    /**
+     * Client device OEM name taken from the browser.
+     */
+    public deviceOEMName: string;
+
+    /**
+     * Operating system name and version of the device the end user of the application is using. If this field is empty then it is derived from the user agent. Example 'Windows 10 Pro 10.0.10586.0'
+     */
+    public deviceOSVersion: string;
+
+    /**
+     * The type of the device the end user of the application is using. Used primarily to distinguish JavaScript telemetry from server side telemetry. Examples: 'PC', 'Phone', 'Browser'. 'PC' is the default value.
+     */
+    public deviceType: string;
+
+    /**
+     * The IP address of the client device. IPv4 and IPv6 are supported. Information in the location context fields is always about the end user. When telemetry is sent from a service, the location context is about the user that initiated the operation in the service.
+     */
+    public locationIp: string;
+
+    /**
+     * A unique identifier for the operation instance. The operation.id is created by either a request or a page view. All other telemetry sets this to the value for the containing request or page view. Operation.id is used for finding all the telemetry items for a specific operation instance.
+     */
+    public operationId: string;
+
+    /**
+     * The name (group) of the operation. The operation.name is created by either a request or a page view. All other telemetry items set this to the value for the containing request or page view. Operation.name is used for finding all the telemetry items for a group of operations (i.e. 'GET Home/Index').
+     */
+    public operationName: string;
+
+    /**
+     * The unique identifier of the telemetry item's immediate parent.
+     */
+    public operationParentId: string;
+
+    /**
+     * Name of synthetic source. Some telemetry from the application may represent a synthetic traffic. It may be web crawler indexing the web site, site availability tests or traces from diagnostic libraries like Application Insights SDK itself.
+     */
+    public operationSyntheticSource: string;
+
+    /**
+     * The correlation vector is a light weight vector clock which can be used to identify and order related events across clients and services.
+     */
+    public operationCorrelationVector: string;
+
+    /**
+     * Session ID - the instance of the user's interaction with the app. Information in the session context fields is always about the end user. When telemetry is sent from a service, the session context is about the user that initiated the operation in the service.
+     */
+    public sessionId: string;
+
+    /**
+     * Boolean value indicating whether the session identified by ai.session.id is first for the user or not.
+     */
+    public sessionIsFirst: string;
+
+    /**
+     * In multi-tenant applications this is the account ID or name which the user is acting with. Examples may be subscription ID for Azure portal or blog name blogging platform.
+     */
+    public userAccountId: string;
+
+    /**
+     * Anonymous user id. Represents the end user of the application. When telemetry is sent from a service, the user context is about the user that initiated the operation in the service.
+     */
+    public userId: string;
+
+    /**
+     * Authenticated user id. The opposite of ai.user.id, this represents the user with a friendly name. Since it's PII information it is not collected by default by most SDKs.
+     */
+    public userAuthUserId: string;
+
+    /**
+     * Name of the role the application is a part of. For Azure environment, this should be initialized with
+     * [Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Role.Name
+     * See more details here: https://dzone.com/articles/accessing-azure-role-0
+     * It is recommended that you initialize environment variable with this value during machine startup, and then set context field from environment variable
+     * appInsights.client.context.tags[appInsights.client.context.keys.cloudRole] = process.env.RoleName
+     */
+    public cloudRole: string;
+
+    /**
+     * Name of the instance where the application is running. For Azure environment, this should be initialized with
+     * [Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Id
+     * See more details here: https://dzone.com/articles/accessing-azure-role-0
+     * It is recommended that you initialize environment variable with this value during machine startup, and then set context field from environment variable
+     * appInsights.client.context.tags[appInsights.client.context.keys.cloudRoleInstance] = process.env.RoleInstanceId
+     */
+    public cloudRoleInstance: string;
+
+
+    /**
+     * SDK version. See https://github.com/microsoft/ApplicationInsights-Home/blob/master/SDK-AUTHORING.md#sdk-version-specification for information.
+     */
+    public internalSdkVersion: string;
+
+    /**
+     * Agent version. Used to indicate the version of StatusMonitor installed on the computer if it is used for data collection.
+     */
+    public internalAgentVersion: string;
+
+    /**
+     * This is the node name used for billing purposes. Use it to override the standard detection of nodes.
+     */
+    public internalNodeName: string;
+
+    constructor() {
+        this.applicationVersion = "ai.application.ver";
+        this.deviceId = "ai.device.id";
+        this.deviceLocale = "ai.device.locale";
+        this.deviceModel = "ai.device.model";
+        this.deviceOEMName = "ai.device.oemName";
+        this.deviceOSVersion = "ai.device.osVersion";
+        this.deviceType = "ai.device.type";
+        this.locationIp = "ai.location.ip";
+        this.operationId = "ai.operation.id";
+        this.operationName = "ai.operation.name";
+        this.operationParentId = "ai.operation.parentId";
+        this.operationSyntheticSource = "ai.operation.syntheticSource";
+        this.operationCorrelationVector = "ai.operation.correlationVector";
+        this.sessionId = "ai.session.id";
+        this.sessionIsFirst = "ai.session.isFirst";
+        this.userAccountId = "ai.user.accountId";
+        this.userId = "ai.user.id";
+        this.userAuthUserId = "ai.user.authUserId";
+        this.cloudRole = "ai.cloud.role";
+        this.cloudRoleInstance = "ai.cloud.roleInstance";
+        this.internalSdkVersion = "ai.internal.sdkVersion";
+        this.internalAgentVersion = "ai.internal.agentVersion";
+        this.internalNodeName = "ai.internal.nodeName";
+    }
+}
+export = ContextTagKeys;
\ No newline at end of file
diff --git a/src/types.ts b/src/types.ts
index 0315b37..3a98e67 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -8,18 +8,18 @@ import { AzureMonitorOpenTelemetryOptions } from "@azure/monitor-opentelemetry";
  */
 export interface ApplicationInsightsOptions extends AzureMonitorOpenTelemetryOptions {
     /**
-   * Sets the state of exception tracking (enabled by default)
-   * if true uncaught exceptions will be sent to Application Insights
-   */
+     * Sets the state of exception tracking (enabled by default)
+     * if true uncaught exceptions will be sent to Application Insights
+     */
     enableAutoCollectExceptions?: boolean;
     /**
-    * Log Instrumentations configuration included as part of Application Insights (console, bunyan, winston)
-    */
+     * Log Instrumentations configuration included as part of Application Insights (console, bunyan, winston)
+     */
     logInstrumentations?: LogInstrumentationsConfig;
-     /**
+    /**
      * Specific extended metrics, applicationinsights-native-metrics package need to be available
      */
-     extendedMetrics?: { [type: string]: boolean };
+    extendedMetrics?: { [type: string]: boolean };
 }
 
 export interface LogInstrumentationsConfig {


Test patch:
diff --git a/test/unitTests/shim/autoCollection/bunyan.tests.ts b/test/unitTests/shim/autoCollection/bunyan.tests.ts
index 61df196..510e109 100644
--- a/test/unitTests/shim/autoCollection/bunyan.tests.ts
+++ b/test/unitTests/shim/autoCollection/bunyan.tests.ts
@@ -30,6 +30,7 @@ describe("diagnostic-channel/bunyan", () => {
             }
         };
         const client = new TelemetryClient(config);
+        client.start();
         const stub = sandbox.stub(client, "trackException");
         const dummyError = { stack: "Test error" };
         const bunyanJson = Util.getInstance().stringify({ err: dummyError });
@@ -52,6 +53,7 @@ describe("diagnostic-channel/bunyan", () => {
             }
         };
         const client = new TelemetryClient(config);
+        client.start();
         const stub = sandbox.stub(client, "trackTrace");
         const logEvent: bunyan.IBunyanData = {
             result: "test log",
@@ -72,7 +74,9 @@ describe("diagnostic-channel/bunyan", () => {
             }
         };
         const client = new TelemetryClient(config);
+        client.start();
         const secondClient = new TelemetryClient(config);
+        secondClient.start();
         const stub = sandbox.stub(client, "trackTrace");
         const secondStub = sandbox.stub(secondClient, "trackTrace");
         enable(true, client);
diff --git a/test/unitTests/shim/autoCollection/console.tests.ts b/test/unitTests/shim/autoCollection/console.tests.ts
index dc999cf..2e18a38 100644
--- a/test/unitTests/shim/autoCollection/console.tests.ts
+++ b/test/unitTests/shim/autoCollection/console.tests.ts
@@ -30,6 +30,7 @@ describe("AutoCollection/Console", () => {
                 }
             };
             const client = new TelemetryClient(config);
+            client.start();
             const stub = sandbox.stub(client, "trackException");
             const dummyError = new Error("test error");
             const errorEvent: console.IConsoleData = {
@@ -52,6 +53,7 @@ describe("AutoCollection/Console", () => {
                 }
             };
             const client = new TelemetryClient(config);
+            client.start();
             const stub = sandbox.stub(client, "trackTrace");
             const logEvent: console.IConsoleData = {
                 message: "test log",
@@ -72,7 +74,9 @@ describe("AutoCollection/Console", () => {
                 }
             };
             const client = new TelemetryClient(config);
+            client.start();
             const secondClient = new TelemetryClient(config);
+            secondClient.start();
             const stub = sandbox.stub(client, "trackTrace");
             const secondStub = sandbox.stub(secondClient, "trackTrace");
             enable(true, client);
diff --git a/test/unitTests/shim/autoCollection/winston.tests.ts b/test/unitTests/shim/autoCollection/winston.tests.ts
index 68e6709..2df15bd 100644
--- a/test/unitTests/shim/autoCollection/winston.tests.ts
+++ b/test/unitTests/shim/autoCollection/winston.tests.ts
@@ -29,6 +29,7 @@ describe("diagnostic-channel/winston", () => {
             }
         };
         const client = new TelemetryClient(config);
+        client.start();
         const stub = sandbox.stub(client, "trackException");
         const dummyError = new Error("test error");
         const errorEvent: winston.IWinstonData = {
@@ -52,6 +53,7 @@ describe("diagnostic-channel/winston", () => {
             }
         };
         const client = new TelemetryClient(config);
+        client.start();
         const stub = sandbox.stub(client, "trackTrace");
         const logEvent: winston.IWinstonData = {
             message: "test log",
@@ -74,7 +76,9 @@ describe("diagnostic-channel/winston", () => {
             }
         };
         const client = new TelemetryClient(config);
+        client.start();
         const secondClient = new TelemetryClient(config);
+        secondClient.start();
         const stub = sandbox.stub(client, "trackTrace");
         const secondStub = sandbox.stub(secondClient, "trackTrace");
         enable(true, client);
diff --git a/test/unitTests/shim/config.tests.ts b/test/unitTests/shim/config.tests.ts
new file mode 100644
index 0000000..73f3acc
--- /dev/null
+++ b/test/unitTests/shim/config.tests.ts
@@ -0,0 +1,117 @@
+import assert = require('assert');
+import sinon = require('sinon');
+import { TelemetryClient } from '../../../applicationinsights';
+import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http';
+import { CorrelationContextManager } from '../../../src/shim/correlationContextManager';
+const applicationInsights = require('../../../applicationinsights');
+import azureCoreAuth = require("@azure/core-auth");
+import { Logger } from "../../../src/shim/logging"
+import { DiagLogLevel } from '@opentelemetry/api';
+
+class TestTokenCredential implements azureCoreAuth.TokenCredential {
+    private _expiresOn: Date;
+    private _numberOfRefreshs = 0;
+
+    constructor(expiresOn?: Date) {
+        this._expiresOn = expiresOn || new Date();
+    }
+
+    async getToken(scopes: string | string[], options?: any): Promise<any> {
+        this._numberOfRefreshs++;
+        return {
+            token: "testToken" + this._numberOfRefreshs,
+            expiresOnTimestamp: this._expiresOn
+        };
+    }
+}
+
+describe("shim/configuration/config", () => {
+    const connectionString = "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333;IngestionEndpoint=https://centralus-0.in.applicationinsights.azure.com/";
+
+    let originalEnv: NodeJS.ProcessEnv;
+    let sandbox: sinon.SinonSandbox;
+
+    beforeEach(() => {
+        originalEnv = process.env;
+        process.env["APPLICATION_INSIGHTS_SHIM_CONFIGURATION"] = "true";
+        sandbox = sinon.createSandbox();
+    });
+
+    afterEach(() => {
+        process.env = originalEnv;
+        delete process.env.APPLICATION_INSIGHTS_SHIM_CONFIGURATION;
+        sandbox.restore();
+    })
+
+    describe("#constructor()", () => {
+        it("should initialize config values", () => {
+            const telemetryClient = new TelemetryClient(connectionString);
+            applicationInsights.setup(connectionString);
+            telemetryClient.config.instrumentationKey = "1aa11111-bbbb-1ccc-8ddd-eeeeffff3333";
+            telemetryClient.config.endpointUrl = "https://centralus-0.in.applicationinsights.azure.com/";
+            telemetryClient.config.proxyHttpUrl = "http://localhost:8888",
+            telemetryClient.config.proxyHttpsUrl = "https://localhost:3000",
+            telemetryClient.config.correlationHeaderExcludedDomains = ["https://www.bing.com"],
+            telemetryClient.config.samplingPercentage = 50;
+            telemetryClient.config.enableAutoCollectExternalLoggers = true;
+            telemetryClient.config.enableAutoCollectExceptions = true;
+            telemetryClient.config.enableAutoCollectConsole = true;
+            telemetryClient.config.enableAutoCollectExceptions = true;
+            telemetryClient.config.enableAutoCollectPerformance = true;
+            telemetryClient.config.enableAutoCollectExtendedMetrics = true;
+            telemetryClient.config.enableAutoCollectRequests = true;
+            telemetryClient.config.enableAutoCollectDependencies = true;
+            telemetryClient.config.aadTokenCredential = new TestTokenCredential();
+            telemetryClient.config.maxBatchIntervalMs = 1000;
+            telemetryClient.start();
+
+            assert.equal(telemetryClient["_options"].samplingRatio, 0.5);
+            assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.connectionString, connectionString);
+            assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.proxyOptions.host, "localhost");
+            assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.proxyOptions.port, 3000);
+            const ignoreOutgoingUrls = telemetryClient["_options"].instrumentationOptions.http as HttpInstrumentationConfig;
+            assert.equal(ignoreOutgoingUrls.ignoreOutgoingUrls, "https://www.bing.com");
+            assert.equal(JSON.stringify(telemetryClient["_options"].logInstrumentations), JSON.stringify({ console: { enabled: true }, winston: { enabled: true }, bunyan: { enabled: true } }));
+            assert.equal(telemetryClient["_options"].enableAutoCollectExceptions, true);
+            assert.equal(telemetryClient["_options"].enableAutoCollectPerformance, true);
+            assert.equal(JSON.stringify(telemetryClient["_options"].extendedMetrics), JSON.stringify({ gc: true, heap: true, loop: true }));
+            assert.equal(telemetryClient["_options"].instrumentationOptions.http.hasOwnProperty("ignoreIncomingRequestHook"), true);
+            assert.equal(telemetryClient["_options"].instrumentationOptions.http.hasOwnProperty("ignoreOutgoingRequestHook"), true);
+            assert.equal(telemetryClient["_options"].azureMonitorExporterConfig.aadTokenCredential, telemetryClient.config.aadTokenCredential);
+            assert.equal(
+                JSON.stringify(telemetryClient["_options"].otlpTraceExporterConfig),
+                JSON.stringify({timeoutMillis: 1000})
+            );
+            assert.equal(
+                JSON.stringify(telemetryClient["_options"].otlpMetricExporterConfig),
+                JSON.stringify({timeoutMillis: 1000})
+            );
+            assert.equal(
+                JSON.stringify(telemetryClient["_options"].otlpLogExporterConfig),
+                JSON.stringify({timeoutMillis: 1000})
+            );
+        });
+
+        it("should activate internal loggers", () => {
+            const telemetryClient = new TelemetryClient(connectionString);
+            assert.equal(Logger.getInstance()["_diagLevel"], DiagLogLevel.WARN);
+            telemetryClient.config.enableInternalDebugLogging = true;
+            telemetryClient.start();
+            assert.equal(Logger.getInstance()["_diagLevel"], DiagLogLevel.DEBUG);
+        });
+
+        it("should disableALlExtenededMetrics", () => {
+            const telemetryClient = new TelemetryClient(connectionString);
+            telemetryClient.config.disableAllExtendedMetrics = true;
+            telemetryClient.start();
+            assert.equal(JSON.stringify(telemetryClient["_options"].extendedMetrics), JSON.stringify({ gc: false, heap: false, loop: false }));
+        });
+
+        it("should disableAppInsights", () => {
+            applicationInsights.setup(connectionString);
+            applicationInsights.defaultClient.config.disableAppInsights = true;
+            applicationInsights.start();
+            assert.equal(applicationInsights.defaultClient, undefined);
+        });
+    });
+});
diff --git a/test/unitTests/shim/telemetryClient.tests.ts b/test/unitTests/shim/telemetryClient.tests.ts
index 2bfc806..971e9d6 100644
--- a/test/unitTests/shim/telemetryClient.tests.ts
+++ b/test/unitTests/shim/telemetryClient.tests.ts
@@ -42,6 +42,7 @@ describe("shim/TelemetryClient", () => {
         client = new TelemetryClient(
             "InstrumentationKey=1aa11111-bbbb-1ccc-8ddd-eeeeffff3333"
         );
+        client.start();
         traceExportStub = sinon.stub(client.getAzureMonitorOpenTelemetryClient()["_traceHandler"]["_azureExporter"], "export").callsFake(
             (data: any, resultCallback: any) =>
                 new Promise((resolve) => {