From 804cfd52821915f03e548cb79f7203541f834db9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B2=92=E7=B2=92=E6=A9=99?= Date: Mon, 26 Jun 2023 16:16:23 +0800 Subject: [PATCH 1/2] fix(example-opencensus-shim): avoid opencensus instrumentations being auto imported --- experimental/examples/opencensus-shim/package.json | 2 +- experimental/examples/opencensus-shim/setup.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/experimental/examples/opencensus-shim/package.json b/experimental/examples/opencensus-shim/package.json index 689d1c7c24..fd231ef119 100644 --- a/experimental/examples/opencensus-shim/package.json +++ b/experimental/examples/opencensus-shim/package.json @@ -30,7 +30,7 @@ "@opentelemetry/api": "1.4.1", "@opentelemetry/sdk-trace-node": "1.14.0", "@opencensus/core": "0.1.0", - "@opencensus/nodejs": "0.1.0", + "@opencensus/nodejs-base": "0.1.0", "@opentelemetry/semantic-conventions": "1.14.0", "@opentelemetry/exporter-trace-otlp-grpc": "0.40.0", "@opentelemetry/resources": "1.14.0", diff --git a/experimental/examples/opencensus-shim/setup.js b/experimental/examples/opencensus-shim/setup.js index e96c62ae0c..37206971e7 100644 --- a/experimental/examples/opencensus-shim/setup.js +++ b/experimental/examples/opencensus-shim/setup.js @@ -29,7 +29,7 @@ const { } = require('@opentelemetry/semantic-conventions'); module.exports = function setup(serviceName) { - const tracing = require('@opencensus/nodejs'); + const tracing = require('@opencensus/nodejs-base'); diag.setLogger(new DiagConsoleLogger(), { logLevel: DiagLogLevel.ALL }); const provider = new NodeTracerProvider({ From b9106118c54135fe9e35b8f86eacd9fa44681eb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B2=92=E7=B2=92=E6=A9=99?= Date: Mon, 26 Jun 2023 16:27:19 +0800 Subject: [PATCH 2/2] chore: changelog --- experimental/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 097f9925f8..dca209e1a6 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -17,6 +17,7 @@ All notable changes to experimental packages in this project will be documented * fix(exporter-logs-otlp-http): set useHex to true [#3875](https://github.com/open-telemetry/opentelemetry-js/pull/3875) @Nico385412 fix(otlp-proto-exporter-base): add missing type import [#3937](https://github.com/open-telemetry/opentelemetry-js/pull/3937) @pichlermarc +* fix(example-opencensus-shim): avoid OpenCensus auto instrumentations [#3951](https://github.com/open-telemetry/opentelemetry-js/pull/3951) @llc1123 ### :books: (Refine Doc)