@ms-cloudpack/telemetry 0.10.3 → 0.10.5

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.
@@ -21,7 +21,7 @@ import {
21
21
  require_src2,
22
22
  require_src3,
23
23
  require_src4
24
- } from "./chunk-QWSFQHKI.js";
24
+ } from "./chunk-F3TAGUKV.js";
25
25
 
26
26
  // ../../node_modules/.store/@azure-core-rest-pipeline-npm-1.17.0-aa1ea9ace7/package/dist/commonjs/pipeline.js
27
27
  var require_pipeline = __commonJS({
@@ -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-RJI3247B.js";
10
- import "./chunk-QWSFQHKI.js";
9
+ } from "./chunk-KZSDB6J7.js";
10
+ import "./chunk-F3TAGUKV.js";
11
11
  export {
12
12
  NoOpTelemetryClient
13
13
  };
@@ -4926,11 +4926,11 @@ var require_time = __commonJS({
4926
4926
  }
4927
4927
  __name(hrTimeToNanoseconds, "hrTimeToNanoseconds");
4928
4928
  exports.hrTimeToNanoseconds = hrTimeToNanoseconds;
4929
- function hrTimeToMilliseconds(time) {
4929
+ function hrTimeToMilliseconds2(time) {
4930
4930
  return time[0] * 1e3 + time[1] / 1e6;
4931
4931
  }
4932
- __name(hrTimeToMilliseconds, "hrTimeToMilliseconds");
4933
- exports.hrTimeToMilliseconds = hrTimeToMilliseconds;
4932
+ __name(hrTimeToMilliseconds2, "hrTimeToMilliseconds");
4933
+ exports.hrTimeToMilliseconds = hrTimeToMilliseconds2;
4934
4934
  function hrTimeToMicroseconds(time) {
4935
4935
  return time[0] * 1e6 + time[1] / 1e3;
4936
4936
  }
@@ -12350,7 +12350,7 @@ var _ConsoleSpanExporter = class _ConsoleSpanExporter {
12350
12350
  */
12351
12351
  _exportInfo(span) {
12352
12352
  return [
12353
- `Telemetry Span: ${span.name} in ${span.duration}ms`,
12353
+ `Telemetry Span: ${span.name} in ${(0, import_core.hrTimeToMilliseconds)(span.duration)}ms`,
12354
12354
  span.events.length > 0 ? `with ${span.events.length} events` : void 0
12355
12355
  ].filter((text) => !!text).join(" ");
12356
12356
  }
@@ -12399,7 +12399,7 @@ __name(createEndGuardedSpan, "createEndGuardedSpan");
12399
12399
 
12400
12400
  // src/proxies/createSpanFunctionWrapper.ts
12401
12401
  function createSpanFunctionWrapper(fn) {
12402
- return async function(span) {
12402
+ return async (span) => {
12403
12403
  const guardedSpan = createEndGuardedSpan(span);
12404
12404
  try {
12405
12405
  return await Promise.resolve(fn(guardedSpan));
@@ -7,7 +7,7 @@ const __dirname = topLevelPath.dirname(__filename);
7
7
  import {
8
8
  BaseTelemetryClient,
9
9
  __name
10
- } from "./chunk-QWSFQHKI.js";
10
+ } from "./chunk-F3TAGUKV.js";
11
11
 
12
12
  // src/NoOpTelemetryClient.ts
13
13
  var _NoOpTelemetryClient = class _NoOpTelemetryClient extends BaseTelemetryClient {
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-RJI3247B.js";
9
+ } from "./chunk-KZSDB6J7.js";
10
10
  import {
11
11
  DiagConsoleLogger,
12
12
  DiagLogLevel,
13
13
  __name,
14
14
  diag,
15
15
  init_esm
16
- } from "./chunk-QWSFQHKI.js";
16
+ } from "./chunk-F3TAGUKV.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-4TJ4SDRS.js");
23
+ const { NoOpTelemetryClient: NoOpTelemetryClient2 } = await import("./NoOpTelemetryClient-H75ZBB4T.js");
24
24
  return new NoOpTelemetryClient2();
25
25
  }
26
26
  diag.setLogger(new DiagConsoleLogger(), {
27
27
  logLevel: (options.logLevel && DiagLogLevel[options.logLevel]) ?? DiagLogLevel.WARN,
28
28
  suppressOverrideMessage: true
29
29
  });
30
- const { AppInsightsTelemetryClient } = await import("./AppInsightsTelemetryClient-P56TUIAO.js");
30
+ const { AppInsightsTelemetryClient } = await import("./AppInsightsTelemetryClient-ZKKOJCSN.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.10.3",
3
+ "version": "0.10.5",
4
4
  "description": "Helpers for reporting telemetry in Cloudpack.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -17,7 +17,7 @@
17
17
  "@azure/monitor-opentelemetry-exporter": "1.0.0-beta.26",
18
18
  "@ms-cloudpack/environment": "^0.1.1",
19
19
  "@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
20
- "@ms-cloudpack/package-utilities": "^11.0.0",
20
+ "@ms-cloudpack/package-utilities": "^11.1.0",
21
21
  "@ms-cloudpack/scripts": "^0.0.1",
22
22
  "@opentelemetry/api": "~1.9.0",
23
23
  "@opentelemetry/core": "~1.26.0",