@ms-cloudpack/telemetry 0.11.37 → 0.11.39
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/index.js +7 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -25429,6 +25429,7 @@ __name(_AzureMonitorTraceExporter, "AzureMonitorTraceExporter");
|
|
|
25429
25429
|
var AzureMonitorTraceExporter = _AzureMonitorTraceExporter;
|
|
25430
25430
|
|
|
25431
25431
|
// src/startTelemetry.ts
|
|
25432
|
+
var hasInitializedGlobalContextManager = false;
|
|
25432
25433
|
function startTelemetry(options) {
|
|
25433
25434
|
diag2.setLogger(new DiagConsoleLogger(), {
|
|
25434
25435
|
logLevel: convertLogLevel(options.logLevel),
|
|
@@ -25436,9 +25437,12 @@ function startTelemetry(options) {
|
|
|
25436
25437
|
});
|
|
25437
25438
|
metrics.disable();
|
|
25438
25439
|
trace.disable();
|
|
25439
|
-
|
|
25440
|
-
|
|
25441
|
-
|
|
25440
|
+
if (!hasInitializedGlobalContextManager) {
|
|
25441
|
+
const contextManager = new import_context_async_hooks.AsyncHooksContextManager();
|
|
25442
|
+
contextManager.enable();
|
|
25443
|
+
context.setGlobalContextManager(contextManager);
|
|
25444
|
+
hasInitializedGlobalContextManager = true;
|
|
25445
|
+
}
|
|
25442
25446
|
const resource = createResourceFromOptions(options);
|
|
25443
25447
|
const spanProcessors = [
|
|
25444
25448
|
// Set SpanEnrichingProcessor to add shared attributes to all spans
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ms-cloudpack/telemetry",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.39",
|
|
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.28",
|
|
18
18
|
"@ms-cloudpack/environment": "^0.1.1",
|
|
19
19
|
"@ms-cloudpack/eslint-plugin-internal": "^0.0.1",
|
|
20
|
-
"@ms-cloudpack/package-utilities": "^12.
|
|
20
|
+
"@ms-cloudpack/package-utilities": "^12.5.0",
|
|
21
21
|
"@ms-cloudpack/scripts": "^0.0.1",
|
|
22
22
|
"@opentelemetry/api": "~1.9.0",
|
|
23
23
|
"@opentelemetry/context-async-hooks": "~1.30.0",
|