File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
55import { ExpressInstrumentation } from '@opentelemetry/instrumentation-express' ;
66import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node' ;
77const apikey = process . env . BACKEND_TRACING_API_KEY ;
8+ const tracingEnabledEnv = process . env . BACKEND_TRACING_ENABLED ;
89
910const googleExporter = new OTLPTraceExporter ( {
1011 url : 'http://opentelemetry-collector.monitoring.svc.cluster.local:4318/v1/traces' ,
@@ -24,7 +25,7 @@ export const otelSDK = new NodeSDK({
2425 ] ,
2526} ) ;
2627
27- export const tracingEnabled = ! ! apikey ;
28+ export const tracingEnabled = ! ! apikey || tracingEnabledEnv === 'true' ;
2829
2930// gracefully shut down the SDK on process exit
3031process . on ( 'SIGTERM' , ( ) => {
You can’t perform that action at this time.
0 commit comments