Skip to content

Commit

Permalink
feat: update deprecated NewNoopTracerProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
tigerwill90 committed Feb 29, 2024
1 parent 14d0bd5 commit 135af66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions foxtrace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/noop"
"net/http"
"net/http/httptest"
"testing"
Expand All @@ -33,7 +34,7 @@ func TestGetSpanNotInstrumented(t *testing.T) {
}

func TestPropagationWithGlobalPropagators(t *testing.T) {
provider := trace.NewNoopTracerProvider()
provider := noop.NewTracerProvider()
otel.SetTextMapPropagator(b3prop.New())

r := httptest.NewRequest("GET", "/user/123", nil)
Expand Down Expand Up @@ -61,7 +62,7 @@ func TestPropagationWithGlobalPropagators(t *testing.T) {
}

func TestPropagationWithCustomPropagators(t *testing.T) {
provider := trace.NewNoopTracerProvider()
provider := noop.NewTracerProvider()
b3 := b3prop.New()

r := httptest.NewRequest("GET", "/user/123", nil)
Expand Down Expand Up @@ -89,7 +90,7 @@ func TestPropagationWithCustomPropagators(t *testing.T) {
}

func TestWithSpanAttributes(t *testing.T) {
provider := trace.NewNoopTracerProvider()
provider := noop.NewTracerProvider()
otel.SetTextMapPropagator(b3prop.New())

r := httptest.NewRequest("GET", "/user/123?foo=bar", nil)
Expand Down

0 comments on commit 135af66

Please sign in to comment.