|
|
@ -20,7 +20,7 @@ import ( |
|
|
|
config_util "github.com/prometheus/common/config" |
|
|
|
config_util "github.com/prometheus/common/config" |
|
|
|
"github.com/stretchr/testify/require" |
|
|
|
"github.com/stretchr/testify/require" |
|
|
|
"go.opentelemetry.io/otel" |
|
|
|
"go.opentelemetry.io/otel" |
|
|
|
"go.opentelemetry.io/otel/trace" |
|
|
|
"go.opentelemetry.io/otel/trace/noop" |
|
|
|
|
|
|
|
|
|
|
|
"github.com/prometheus/prometheus/config" |
|
|
|
"github.com/prometheus/prometheus/config" |
|
|
|
) |
|
|
|
) |
|
|
@ -105,7 +105,7 @@ func TestUninstallingTracerProvider(t *testing.T) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
require.NoError(t, m.ApplyConfig(&cfg)) |
|
|
|
require.NoError(t, m.ApplyConfig(&cfg)) |
|
|
|
require.NotEqual(t, trace.NewNoopTracerProvider(), otel.GetTracerProvider()) |
|
|
|
require.NotEqual(t, noop.NewTracerProvider(), otel.GetTracerProvider()) |
|
|
|
|
|
|
|
|
|
|
|
// Uninstall by passing empty config.
|
|
|
|
// Uninstall by passing empty config.
|
|
|
|
cfg2 := config.Config{ |
|
|
|
cfg2 := config.Config{ |
|
|
@ -114,7 +114,7 @@ func TestUninstallingTracerProvider(t *testing.T) { |
|
|
|
|
|
|
|
|
|
|
|
require.NoError(t, m.ApplyConfig(&cfg2)) |
|
|
|
require.NoError(t, m.ApplyConfig(&cfg2)) |
|
|
|
// Make sure we get a no-op tracer provider after uninstallation.
|
|
|
|
// Make sure we get a no-op tracer provider after uninstallation.
|
|
|
|
require.Equal(t, trace.NewNoopTracerProvider(), otel.GetTracerProvider()) |
|
|
|
require.Equal(t, noop.NewTracerProvider(), otel.GetTracerProvider()) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func TestTracerProviderShutdown(t *testing.T) { |
|
|
|
func TestTracerProviderShutdown(t *testing.T) { |
|
|
|