From 58d5bce9ac7e0315e184f7cff6c42113c6373da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adnan=20Rahi=C4=87?= Date: Fri, 7 Jun 2024 14:54:26 +0200 Subject: [PATCH] examples(nodejs auto instr): add more enable:false (#3898) --- .../docker-compose.yaml | 2 ++ .../tracing.otel.grpc.js | 11 ++++++++++- .../tracing.otel.http.js | 11 ++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/examples/quick-start-nodejs-manual-instrumentation/docker-compose.yaml b/examples/quick-start-nodejs-manual-instrumentation/docker-compose.yaml index ada6c36231..1447205aaf 100644 --- a/examples/quick-start-nodejs-manual-instrumentation/docker-compose.yaml +++ b/examples/quick-start-nodejs-manual-instrumentation/docker-compose.yaml @@ -21,6 +21,8 @@ services: # Cloud-based Managed Tracetest tracetest-agent: image: kubeshop/tracetest-agent:latest + command: + - "--mode=verbose" environment: # Find the Agent API Key here: https://docs.tracetest.io/configuration/agent - TRACETEST_API_KEY=${TRACETEST_API_KEY} diff --git a/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.grpc.js b/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.grpc.js index c6ff4ad044..11ae0cf462 100644 --- a/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.grpc.js +++ b/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.grpc.js @@ -24,7 +24,16 @@ provider.register() const sdk = new opentelemetry.NodeSDK({ traceExporter: exporter, - instrumentations: [getNodeAutoInstrumentations()], + instrumentations: [ + getNodeAutoInstrumentations({ + '@opentelemetry/instrumentation-fs': { + enabled: false + }, + '@opentelemetry/instrumentation-net': { + enabled: false + }, + }) + ], serviceName: 'quick-start-nodejs-manual-instrumentation' }) sdk.start() diff --git a/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.http.js b/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.http.js index edb186de3d..bf56906746 100644 --- a/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.http.js +++ b/examples/quick-start-nodejs-manual-instrumentation/tracing.otel.http.js @@ -24,7 +24,16 @@ provider.register() const sdk = new opentelemetry.NodeSDK({ traceExporter: exporter, - instrumentations: [getNodeAutoInstrumentations()], + instrumentations: [ + getNodeAutoInstrumentations({ + '@opentelemetry/instrumentation-fs': { + enabled: false + }, + '@opentelemetry/instrumentation-net': { + enabled: false + }, + }) + ], serviceName: 'quick-start-nodejs-manual-instrumentation' }) sdk.start()