@mhubcloud/tms_core 3.1.3-beta.2 → 3.1.4-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -55,7 +55,7 @@ __export(utils_exports, {
55
55
  var crypto = __toESM(require("crypto"));
56
56
  var appInsights = __toESM(require("applicationinsights"));
57
57
  var aiClient = null;
58
- if (process.env.APPINSIGHTS_INSTRUMENTATIONKEY) {
58
+ if (process.env.APPLICATIONINSIGHTS_CONNECTION_STRING || process.env.APPINSIGHTS_INSTRUMENTATIONKEY) {
59
59
  appInsights.setup().setAutoCollectDependencies(false).setAutoCollectConsole(true, true).setSendLiveMetrics(false).setAutoCollectRequests(false).setAutoCollectPerformance(false).setUseDiskRetryCaching(false).start();
60
60
  aiClient = appInsights.defaultClient;
61
61
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhubcloud/tms_core",
3
- "version": "3.1.3-beta.2",
3
+ "version": "3.1.4-beta.0",
4
4
  "description": "Core function for mHub Cloud TMS publishers",
5
5
  "homepage": "https://mhubcloud.com/",
6
6
  "license": "Apache 2.0",
@@ -12,7 +12,10 @@ import { TypeSafeObject } from '../types/UtilTypes';
12
12
 
13
13
  let aiClient: appInsights.TelemetryClient | null = null;
14
14
 
15
- if (process.env.APPINSIGHTS_INSTRUMENTATIONKEY) {
15
+ if (
16
+ process.env.APPLICATIONINSIGHTS_CONNECTION_STRING ||
17
+ process.env.APPINSIGHTS_INSTRUMENTATIONKEY
18
+ ) {
16
19
  appInsights
17
20
  .setup() // Set environment variable APPINSIGHTS_INSTRUMENTATIONKEY, so setup() can be called w/o parameters
18
21
  .setAutoCollectDependencies(false)