@ms-cloudpack/telemetry 0.10.18 → 0.11.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.
@@ -1,28 +0,0 @@
1
- import { createRequire as topLevelCreateRequire } from 'node:module';
2
- import topLevelPath from 'node:path';
3
- import topLevelUrl from 'node:url';
4
- const require = topLevelCreateRequire(import.meta.url);
5
- const __filename = topLevelUrl.fileURLToPath(import.meta.url);
6
- const __dirname = topLevelPath.dirname(__filename);
7
- import {
8
- BaseTelemetryClient,
9
- __name
10
- } from "./chunk-4GU6YOQQ.js";
11
-
12
- // src/NoOpTelemetryClient.ts
13
- var _NoOpTelemetryClient = class _NoOpTelemetryClient extends BaseTelemetryClient {
14
- constructor() {
15
- super({
16
- productVersion: "no-op",
17
- serviceName: "no-op",
18
- serviceNamespace: "no-op",
19
- logLevel: "NONE"
20
- });
21
- }
22
- };
23
- __name(_NoOpTelemetryClient, "NoOpTelemetryClient");
24
- var NoOpTelemetryClient = _NoOpTelemetryClient;
25
-
26
- export {
27
- NoOpTelemetryClient
28
- };
@@ -1,6 +0,0 @@
1
- import type { TelemetryOptions } from './types/TelemetryOptions.js';
2
- import { BaseTelemetryClient } from './BaseTelemetryClient.js';
3
- export declare class AppInsightsTelemetryClient extends BaseTelemetryClient {
4
- constructor(options: TelemetryOptions);
5
- }
6
- //# sourceMappingURL=AppInsightsTelemetryClient.d.ts.map
@@ -1,30 +0,0 @@
1
- import { type ContextAPI, type Context } from '@opentelemetry/api';
2
- import type { TelemetryOptions } from './types/TelemetryOptions.js';
3
- import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
4
- import type { TelemetryClient } from './types/TelemetryClient.js';
5
- import { type AsyncTracer } from './proxies/createProxiedTracer.js';
6
- export declare class BaseTelemetryClient implements TelemetryClient {
7
- protected readonly _tracerProvider: NodeTracerProvider;
8
- private _tracer;
9
- private _contextManager;
10
- constructor(options: TelemetryOptions);
11
- /**
12
- * Flushes all telemetry and shuts down the telemetry client.
13
- */
14
- shutdown(): Promise<void>;
15
- /**
16
- * Gets the OpenTelemetry tracer.
17
- * @returns the OpenTelemetry tracer
18
- */
19
- get tracer(): AsyncTracer;
20
- /**
21
- * Gets the OpenTelemetry context.
22
- */
23
- get context(): ContextAPI;
24
- /**
25
- * Sets the root context.
26
- * @param context - the root context for the telemetry client
27
- */
28
- setRootContext(context: Context | undefined): void;
29
- }
30
- //# sourceMappingURL=BaseTelemetryClient.d.ts.map
@@ -1,41 +0,0 @@
1
- import { type ContextManager, type Context } from '@opentelemetry/api';
2
- /**
3
- * This is a wrapper around the AsyncHooksContextManager that allows for setting a root context
4
- * which is being used if no context is available.
5
- */
6
- export declare class CustomContextManager implements ContextManager {
7
- private _contextManager;
8
- private _rootContext;
9
- /**
10
- * This is used to set the root context. If no root context is set, ROOT_CONTEXT is used.
11
- * @param context - the root context for the telemetry client
12
- */
13
- setRootContext(context: Context | undefined): void;
14
- /**
15
- * @returns the active context
16
- */
17
- active(): Context;
18
- /**
19
- * Run the fn callback with object set as the current active context
20
- * @param context Any object to set as the current active context
21
- * @param fn A callback to be immediately run within a specific context
22
- * @param thisArg optional receiver to be used for calling fn
23
- * @param args optional arguments forwarded to fn
24
- */
25
- with<A extends unknown[], F extends (...args: A) => ReturnType<F>>(context: Context, fn: F, thisArg?: ThisParameterType<F>, ...args: A): ReturnType<F>;
26
- /**
27
- * Bind an object as the current context (or a specific one)
28
- * @param [context] Optionally specify the context which you want to assign
29
- * @param target Any object to which a context need to be set
30
- */
31
- bind<T>(context: Context, target: T): T;
32
- /**
33
- * Enable context management
34
- */
35
- enable(): this;
36
- /**
37
- * Disable context management
38
- */
39
- disable(): this;
40
- }
41
- //# sourceMappingURL=CustomContextManager.d.ts.map
@@ -1,9 +0,0 @@
1
- import { BaseTelemetryClient } from './BaseTelemetryClient.js';
2
- /**
3
- * No-op implementation of {@link TelemetryClient}.
4
- * This class will be used when Telemetry is disabled.
5
- */
6
- export declare class NoOpTelemetryClient extends BaseTelemetryClient {
7
- constructor();
8
- }
9
- //# sourceMappingURL=NoOpTelemetryClient.d.ts.map
@@ -1,4 +0,0 @@
1
- import type { TelemetryOptions } from './types/TelemetryOptions.js';
2
- import type { TelemetryClient } from './types/TelemetryClient.js';
3
- export declare function createTelemetryClient(options: TelemetryOptions): Promise<TelemetryClient>;
4
- //# sourceMappingURL=createTelemetryClient.d.ts.map