@ms-cloudpack/telemetry 0.2.3 → 0.2.4

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.
@@ -20,3 +20,4 @@ export declare class AppInsightsTelemetryClient implements TelemetryClient {
20
20
  */
21
21
  getTracer(): Tracer;
22
22
  }
23
+ //# sourceMappingURL=AppInsightsTelemetryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AppInsightsTelemetryClient.d.ts","sourceRoot":"","sources":["../../src/AppInsights/AppInsightsTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAMjD,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAErE,qBAAa,0BAA2B,YAAW,eAAe;IAChE,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAA4B;IAC9D,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAA8B;gBAEvD,OAAO,EAAE,gBAAgB;IAiBrC;;;;OAIG;IACI,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAIxD;;OAEG;IACU,QAAQ;IAKrB;;;OAGG;IACI,SAAS,IAAI,MAAM;CAG3B"}
@@ -10,3 +10,4 @@ export declare class SpanEnrichingProcessor implements SpanProcessor {
10
10
  onStart(): void;
11
11
  onEnd(span: ReadableSpan): void;
12
12
  }
13
+ //# sourceMappingURL=SpanEnrichingProcessor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SpanEnrichingProcessor.d.ts","sourceRoot":"","sources":["../../src/AppInsights/SpanEnrichingProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEjF;;GAEG;AACH,qBAAa,sBAAuB,YAAW,aAAa;IAC9C,OAAO,CAAC,uBAAuB;gBAAvB,uBAAuB,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAEzE,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,OAAO,IAAI,IAAI;IAIf,KAAK,CAAC,IAAI,EAAE,YAAY;CAKzB"}
@@ -1,3 +1,4 @@
1
1
  import { DiagLogLevel } from '@opentelemetry/api';
2
2
  import type { LogLevel } from '../types.js';
3
3
  export declare function convertLogLevel(logLevel?: LogLevel): DiagLogLevel;
4
+ //# sourceMappingURL=convertLogLevel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"convertLogLevel.d.ts","sourceRoot":"","sources":["../../src/AppInsights/convertLogLevel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C,wBAAgB,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,YAAY,CAWjE"}
@@ -1,3 +1,4 @@
1
1
  import { ApplicationInsightsConfig } from 'applicationinsights';
2
2
  import type { TelemetryOptions } from '../types.js';
3
3
  export declare function getAppInsightsConfig(options: TelemetryOptions): ApplicationInsightsConfig;
4
+ //# sourceMappingURL=getAppInsightsConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getAppInsightsConfig.d.ts","sourceRoot":"","sources":["../../src/AppInsights/getAppInsightsConfig.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMpD,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,gBAAgB,6BAmC7D"}
@@ -3,3 +3,4 @@
3
3
  * @returns computer name for the current OS, or the hostname if it cannot be determined
4
4
  */
5
5
  export declare function getComputerName(): string;
6
+ //# sourceMappingURL=getComputerName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getComputerName.d.ts","sourceRoot":"","sources":["../../src/AppInsights/getComputerName.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,wBAAgB,eAAe,WAe9B"}
@@ -15,3 +15,4 @@ export declare class NoOpSpan implements Span {
15
15
  isRecording(): boolean;
16
16
  recordException(): void;
17
17
  }
18
+ //# sourceMappingURL=NoOpSpan.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoOpSpan.d.ts","sourceRoot":"","sources":["../../src/NoOp/NoOpSpan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAE5D;;;;GAIG;AACH,qBAAa,QAAS,YAAW,IAAI;IACnC,WAAW,IAAI,WAAW;IAQ1B,YAAY,IAAI,IAAI;IAKpB,aAAa,IAAI,IAAI;IAKrB,QAAQ,IAAI,IAAI;IAKhB,SAAS,IAAI,IAAI;IAKjB,UAAU,IAAI,IAAI;IAKlB,GAAG,IAAI,IAAI;IAIX,WAAW,IAAI,OAAO;IAItB,eAAe,IAAI,IAAI;CAGxB"}
@@ -10,3 +10,4 @@ export declare class NoOpTelemetryClient implements TelemetryClient {
10
10
  shutdown(): Promise<void>;
11
11
  getTracer(): NoOpTracer;
12
12
  }
13
+ //# sourceMappingURL=NoOpTelemetryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoOpTelemetryClient.d.ts","sourceRoot":"","sources":["../../src/NoOp/NoOpTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,qBAAa,mBAAoB,YAAW,eAAe;IACzD,OAAO,CAAC,MAAM,CAAoB;IAElC,sBAAsB,IAAI,eAAe;IAKzC,QAAQ;IAKR,SAAS;CAGV"}
@@ -9,3 +9,4 @@ export declare class NoOpTracer implements Tracer {
9
9
  startActiveSpan<F extends (span: Span) => ReturnType<F>>(name: string, _opts: SpanOptions, fn: F): ReturnType<F>;
10
10
  startActiveSpan<F extends (span: Span) => ReturnType<F>>(name: string, opts: SpanOptions, ctx: Context, fn: F): ReturnType<F>;
11
11
  }
12
+ //# sourceMappingURL=NoOpTracer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NoOpTracer.d.ts","sourceRoot":"","sources":["../../src/NoOp/NoOpTracer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG7E;;;GAGG;AACH,qBAAa,UAAW,YAAW,MAAM;IACvC,SAAS,IAAI,IAAI;IAIjB,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAC5F,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC;IAChH,eAAe,CAAC,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,EACrD,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,WAAW,EACjB,GAAG,EAAE,OAAO,EACZ,EAAE,EAAE,CAAC,GACJ,UAAU,CAAC,CAAC,CAAC;CAqBjB"}
@@ -1,2 +1,3 @@
1
1
  import type { TelemetryClient, TelemetryOptions } from './types.js';
2
2
  export declare function createTelemetryClient(options: TelemetryOptions): Promise<TelemetryClient>;
3
+ //# sourceMappingURL=createTelemetryClient.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createTelemetryClient.d.ts","sourceRoot":"","sources":["../src/createTelemetryClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEpE,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,eAAe,CAAC,CAe/F"}
@@ -1,3 +1,4 @@
1
+ import { convertLogLevel } from './AppInsights/convertLogLevel.js';
1
2
  export async function createTelemetryClient(options) {
2
3
  if (!options.instrumentationKey) {
3
4
  console.debug('No connection string found. Telemetry will not be sent.');
@@ -6,7 +7,7 @@ export async function createTelemetryClient(options) {
6
7
  return new NoOpTelemetryClient();
7
8
  }
8
9
  // Set initial log level to WARN to avoid logging telemetry initialization
9
- process.env.APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL = options.logLevel || 'WARN';
10
+ process.env.APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL = convertLogLevel(options.logLevel).toString();
10
11
  // Import TelemetryClient after setting initial log level
11
12
  const { AppInsightsTelemetryClient } = await import('./AppInsights/AppInsightsTelemetryClient.js');
12
13
  return new AppInsightsTelemetryClient(options);
@@ -1 +1 @@
1
- {"version":3,"file":"createTelemetryClient.js","sourceRoot":"","sources":["../src/createTelemetryClient.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAyB;IACnE,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;QAC/B,OAAO,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAEzE,wEAAwE;QACxE,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;QAC9E,OAAO,IAAI,mBAAmB,EAAE,CAAC;KAClC;IAED,0EAA0E;IAC1E,OAAO,CAAC,GAAG,CAAC,iDAAiD,GAAG,OAAO,CAAC,QAAQ,IAAI,MAAM,CAAC;IAE3F,yDAAyD;IACzD,MAAM,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,6CAA6C,CAAC,CAAC;IACnG,OAAO,IAAI,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import type { TelemetryClient, TelemetryOptions } from './types.js';\n\nexport async function createTelemetryClient(options: TelemetryOptions): Promise<TelemetryClient> {\n if (!options.instrumentationKey) {\n console.debug('No connection string found. Telemetry will not be sent.');\n\n // Create a no-op telemetry client if no instrumentation key is provided\n const { NoOpTelemetryClient } = await import('./NoOp/NoOpTelemetryClient.js');\n return new NoOpTelemetryClient();\n }\n\n // Set initial log level to WARN to avoid logging telemetry initialization\n process.env.APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL = options.logLevel || 'WARN';\n\n // Import TelemetryClient after setting initial log level\n const { AppInsightsTelemetryClient } = await import('./AppInsights/AppInsightsTelemetryClient.js');\n return new AppInsightsTelemetryClient(options);\n}\n"]}
1
+ {"version":3,"file":"createTelemetryClient.js","sourceRoot":"","sources":["../src/createTelemetryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAGnE,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,OAAyB;IACnE,IAAI,CAAC,OAAO,CAAC,kBAAkB,EAAE;QAC/B,OAAO,CAAC,KAAK,CAAC,yDAAyD,CAAC,CAAC;QAEzE,wEAAwE;QACxE,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,MAAM,CAAC,+BAA+B,CAAC,CAAC;QAC9E,OAAO,IAAI,mBAAmB,EAAE,CAAC;KAClC;IAED,0EAA0E;IAC1E,OAAO,CAAC,GAAG,CAAC,iDAAiD,GAAG,eAAe,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;IAE7G,yDAAyD;IACzD,MAAM,EAAE,0BAA0B,EAAE,GAAG,MAAM,MAAM,CAAC,6CAA6C,CAAC,CAAC;IACnG,OAAO,IAAI,0BAA0B,CAAC,OAAO,CAAC,CAAC;AACjD,CAAC","sourcesContent":["import { convertLogLevel } from './AppInsights/convertLogLevel.js';\nimport type { TelemetryClient, TelemetryOptions } from './types.js';\n\nexport async function createTelemetryClient(options: TelemetryOptions): Promise<TelemetryClient> {\n if (!options.instrumentationKey) {\n console.debug('No connection string found. Telemetry will not be sent.');\n\n // Create a no-op telemetry client if no instrumentation key is provided\n const { NoOpTelemetryClient } = await import('./NoOp/NoOpTelemetryClient.js');\n return new NoOpTelemetryClient();\n }\n\n // Set initial log level to WARN to avoid logging telemetry initialization\n process.env.APPLICATIONINSIGHTS_INSTRUMENTATION_LOGGING_LEVEL = convertLogLevel(options.logLevel).toString();\n\n // Import TelemetryClient after setting initial log level\n const { AppInsightsTelemetryClient } = await import('./AppInsights/AppInsightsTelemetryClient.js');\n return new AppInsightsTelemetryClient(options);\n}\n"]}
package/lib/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export type { Span, Tracer } from '@opentelemetry/api';
2
2
  export { createTelemetryClient } from './createTelemetryClient.js';
3
3
  export type { LogLevel, TelemetryClient, TelemetryOptions } from './types.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,YAAY,EAAE,QAAQ,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
package/lib/types.d.ts CHANGED
@@ -41,3 +41,4 @@ export interface TelemetryOptions {
41
41
  */
42
42
  serviceName: string;
43
43
  }
44
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAEjD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhE,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAEzD;;OAEG;IACH,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAE1B;;;OAGG;IACH,SAAS,IAAI,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;;OAGG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;CACrB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ms-cloudpack/telemetry",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Helpers for logging tasks to the console.",
5
5
  "license": "MIT",
6
6
  "type": "module",