@ms-cloudpack/telemetry 0.5.0 → 0.5.1
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/AppInsightsTelemetryClient-UR2GSWWS.js +22477 -0
- package/dist/{NoOpTelemetryClient-GBCRTSF4.js → NoOpTelemetryClient-XLCEWCVA.js} +2 -2
- package/dist/{chunk-BVWZW3N3.js → chunk-S6YCWIS3.js} +360 -356
- package/dist/{chunk-U2PXIPI6.js → chunk-YATXYOI4.js} +1 -1
- package/dist/index.js +14 -7
- package/lib/AppInsights/AppInsightsTelemetryClient.d.ts +1 -1
- package/lib/AppInsights/createResourceFromOptions.d.ts +4 -0
- package/lib/AppInsights/createTraceProvider.d.ts +8 -0
- package/package.json +2 -2
- package/dist/AppInsightsTelemetryClient-7X6RLLF5.js +0 -71948
- package/lib/AppInsights/getAppInsightsConfig.d.ts +0 -4
package/dist/index.js
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
1
|
import {
|
|
2
2
|
NoOpTelemetryClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-YATXYOI4.js";
|
|
4
4
|
import {
|
|
5
|
+
DiagConsoleLogger,
|
|
6
|
+
DiagLogLevel,
|
|
5
7
|
__name,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
+
diag,
|
|
9
|
+
init_esbuildCjsShims,
|
|
10
|
+
init_esm
|
|
11
|
+
} from "./chunk-S6YCWIS3.js";
|
|
8
12
|
|
|
9
13
|
// src/index.ts
|
|
10
14
|
init_esbuildCjsShims();
|
|
11
15
|
|
|
12
16
|
// src/createTelemetryClient.ts
|
|
13
17
|
init_esbuildCjsShims();
|
|
18
|
+
init_esm();
|
|
14
19
|
async function createTelemetryClient(options) {
|
|
15
20
|
if (!options.connectionString) {
|
|
16
21
|
console.debug("No connection string found. Telemetry will not be sent.");
|
|
17
|
-
const { NoOpTelemetryClient: NoOpTelemetryClient2 } = await import("./NoOpTelemetryClient-
|
|
22
|
+
const { NoOpTelemetryClient: NoOpTelemetryClient2 } = await import("./NoOpTelemetryClient-XLCEWCVA.js");
|
|
18
23
|
return new NoOpTelemetryClient2();
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
25
|
+
diag.setLogger(new DiagConsoleLogger(), {
|
|
26
|
+
logLevel: options.logLevel || DiagLogLevel.WARN,
|
|
27
|
+
suppressOverrideMessage: true
|
|
28
|
+
});
|
|
29
|
+
const { AppInsightsTelemetryClient } = await import("./AppInsightsTelemetryClient-UR2GSWWS.js");
|
|
23
30
|
return new AppInsightsTelemetryClient(options);
|
|
24
31
|
}
|
|
25
32
|
__name(createTelemetryClient, "createTelemetryClient");
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type Span, type Tracer } from '@opentelemetry/api';
|
|
2
2
|
import { PerformanceRecorder } from '../PerformanceRecorder.js';
|
|
3
|
+
import type { SpanAttributeValue } from '../types/SpanAttributes.js';
|
|
3
4
|
import type { TelemetryClient } from '../types/TelemetryClient.js';
|
|
4
5
|
import type { TelemetryOptions } from '../types/TelemetryOptions.js';
|
|
5
|
-
import type { SpanAttributeValue } from '../types/SpanAttributes.js';
|
|
6
6
|
export declare class AppInsightsTelemetryClient implements TelemetryClient {
|
|
7
7
|
private readonly _performance;
|
|
8
8
|
private readonly _rootSpan;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type AzureMonitorExporterOptions } from '@azure/monitor-opentelemetry-exporter';
|
|
2
|
+
import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node';
|
|
3
|
+
import type { Resource } from '@opentelemetry/resources';
|
|
4
|
+
export declare function createTraceProvider(config: {
|
|
5
|
+
azureMonitorExporterOptions: AzureMonitorExporterOptions;
|
|
6
|
+
resource: Resource;
|
|
7
|
+
}): NodeTracerProvider;
|
|
8
|
+
//# sourceMappingURL=createTraceProvider.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/telemetry",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Helpers for logging tasks to the console.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@azure/monitor-opentelemetry": "
|
|
17
|
+
"@azure/monitor-opentelemetry-exporter": "1.0.0-beta.21",
|
|
18
18
|
"@ms-cloudpack/eslint-plugin-internal": "*",
|
|
19
19
|
"@ms-cloudpack/scripts": "*",
|
|
20
20
|
"@opentelemetry/api": "^1.8.0",
|