@ms-cloudpack/telemetry 0.5.2 → 0.5.3

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.
@@ -6,8 +6,8 @@ const __filename = topLevelUrl.fileURLToPath(import.meta.url);
6
6
  const __dirname = topLevelPath.dirname(__filename);
7
7
  import {
8
8
  NoOpTelemetryClient
9
- } from "./chunk-7OW232AO.js";
10
- import "./chunk-QKORAWZ6.js";
9
+ } from "./chunk-TNH2H5YP.js";
10
+ import "./chunk-IDFPZEGW.js";
11
11
  export {
12
12
  NoOpTelemetryClient
13
13
  };
@@ -1818,7 +1818,10 @@ var _PerformanceRecorder = class _PerformanceRecorder {
1818
1818
  Object.assign(additionalProperties, properties);
1819
1819
  }
1820
1820
  };
1821
- const result = execute.constructor.name == "AsyncFunction" ? await execute(tracker) : execute(tracker);
1821
+ const result = execute(tracker);
1822
+ if (result instanceof Promise) {
1823
+ await result;
1824
+ }
1822
1825
  this.record({ name, value: performance.now() - startTime, additionalProperties });
1823
1826
  return result;
1824
1827
  }
@@ -9,7 +9,7 @@ import {
9
9
  __name,
10
10
  init_esm,
11
11
  trace
12
- } from "./chunk-QKORAWZ6.js";
12
+ } from "./chunk-IDFPZEGW.js";
13
13
 
14
14
  // src/NoOp/NoOpTelemetryClient.ts
15
15
  init_esm();
package/dist/index.js CHANGED
@@ -6,28 +6,28 @@ const __filename = topLevelUrl.fileURLToPath(import.meta.url);
6
6
  const __dirname = topLevelPath.dirname(__filename);
7
7
  import {
8
8
  NoOpTelemetryClient
9
- } from "./chunk-7OW232AO.js";
9
+ } from "./chunk-TNH2H5YP.js";
10
10
  import {
11
11
  DiagConsoleLogger,
12
12
  DiagLogLevel,
13
13
  __name,
14
14
  diag,
15
15
  init_esm
16
- } from "./chunk-QKORAWZ6.js";
16
+ } from "./chunk-IDFPZEGW.js";
17
17
 
18
18
  // src/createTelemetryClient.ts
19
19
  init_esm();
20
20
  async function createTelemetryClient(options) {
21
21
  if (!options.connectionString) {
22
22
  console.debug("No connection string found. Telemetry will not be sent.");
23
- const { NoOpTelemetryClient: NoOpTelemetryClient2 } = await import("./NoOpTelemetryClient-JAVNYNSU.js");
23
+ const { NoOpTelemetryClient: NoOpTelemetryClient2 } = await import("./NoOpTelemetryClient-ZW5MT6NT.js");
24
24
  return new NoOpTelemetryClient2();
25
25
  }
26
26
  diag.setLogger(new DiagConsoleLogger(), {
27
27
  logLevel: options.logLevel || DiagLogLevel.WARN,
28
28
  suppressOverrideMessage: true
29
29
  });
30
- const { AppInsightsTelemetryClient } = await import("./AppInsightsTelemetryClient-WP7BPB3C.js");
30
+ const { AppInsightsTelemetryClient } = await import("./AppInsightsTelemetryClient-D3JSVBLP.js");
31
31
  return new AppInsightsTelemetryClient(options);
32
32
  }
33
33
  __name(createTelemetryClient, "createTelemetryClient");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/telemetry",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Helpers for logging tasks to the console.",
5
5
  "license": "MIT",
6
6
  "type": "module",