From 58dd2db7ed0a63bbd6fb57a405762e368b118195 Mon Sep 17 00:00:00 2001 From: Darin <86675935+darinkishore@users.noreply.github.com> Date: Fri, 29 Nov 2024 04:07:11 +0000 Subject: [PATCH] Update README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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');