Skip to content

Commit

Permalink
Replace deprecated trace.NewNoopTracerProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Dec 18, 2023
1 parent 5059a70 commit 973e442
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/trace/otel.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
sdktrace "go.opentelemetry.io/otel/sdk/trace"
semconv "go.opentelemetry.io/otel/semconv/v1.20.0"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/noop"

"go.k6.io/k6/lib/strvals"
)
Expand Down Expand Up @@ -130,7 +131,7 @@ func newGRPCClient(endpoint string, insecure bool, headers map[string]string) ot

// NewNoopTracerProvider creates a new noop TracerProvider.
func NewNoopTracerProvider() *TracerProvider {
prov := trace.NewNoopTracerProvider()
prov := noop.NewTracerProvider()
noopShutdown := func(context.Context) error { return nil }

otel.SetTracerProvider(prov)
Expand Down

0 comments on commit 973e442

Please sign in to comment.