diff --git a/README.md b/README.md index 25df22d8..8650c765 100644 --- a/README.md +++ b/README.md @@ -385,8 +385,9 @@ import { } from '@opentelemetry/sdk-trace-base'; const provider = new BasicTracerProvider(); -provider.addSpanProcessor(new SimpleSpanProcessor(new ConsoleSpanExporter())); -trace.setGlobalTracerProvider(provider); +const provider = new BasicTracerProvider({ + spanProcessors: [new SimpleSpanProcessor(new ConsoleSpanExporter())], +}); const tracer = trace.getTracer('test');