Skip to content

Commit 5b5337c

Browse files
committed
disable exemplars for grpc test
1 parent bb89d63 commit 5b5337c

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_stats_handler_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func TestStatsHandler(t *testing.T) {
5959

6060
for _, tt := range tests {
6161
t.Run(tt.name, func(t *testing.T) {
62+
t.Setenv("OTEL_METRICS_EXEMPLAR_FILTER", "always_off")
6263
clientSR := tracetest.NewSpanRecorder()
6364
clientTP := trace.NewTracerProvider(trace.WithSpanProcessor(clientSR))
6465
clientMetricReader := metric.NewManualReader()

instrumentation/google.golang.org/grpc/otelgrpc/test/grpc_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ func doCalls(ctx context.Context, client pb.TestServiceClient) {
7979
}
8080

8181
func TestInterceptors(t *testing.T) {
82+
t.Setenv("OTEL_METRICS_EXEMPLAR_FILTER", "always_off")
8283
clientUnarySR := tracetest.NewSpanRecorder()
8384
clientUnaryTP := trace.NewTracerProvider(trace.WithSpanProcessor(clientUnarySR))
8485

instrumentation/google.golang.org/grpc/otelgrpc/test/interceptor_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -857,6 +857,7 @@ func TestUnaryServerInterceptor(t *testing.T) {
857857
for _, check := range serverChecks {
858858
name := check.grpcCode.String()
859859
t.Run(name, func(t *testing.T) {
860+
t.Setenv("OTEL_METRICS_EXEMPLAR_FILTER", "always_off")
860861
sr := tracetest.NewSpanRecorder()
861862
tp := trace.NewTracerProvider(trace.WithSpanProcessor(sr))
862863

instrumentation/google.golang.org/grpc/otelgrpc/test/stats_handler_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ func TestStatsHandlerHandleRPCServerErrors(t *testing.T) {
2727
for _, check := range serverChecks {
2828
name := check.grpcCode.String()
2929
t.Run(name, func(t *testing.T) {
30+
t.Setenv("OTEL_METRICS_EXEMPLAR_FILTER", "always_off")
3031
sr := tracetest.NewSpanRecorder()
3132
tp := trace.NewTracerProvider(trace.WithSpanProcessor(sr))
3233

0 commit comments

Comments
 (0)