Skip to content

Commit

Permalink
disable exemplars for grpc test
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Oct 11, 2024
1 parent bb89d63 commit 5b5337c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ func TestStatsHandler(t *testing.T) {

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Setenv("OTEL_METRICS_EXEMPLAR_FILTER", "always_off")
clientSR := tracetest.NewSpanRecorder()
clientTP := trace.NewTracerProvider(trace.WithSpanProcessor(clientSR))
clientMetricReader := metric.NewManualReader()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func doCalls(ctx context.Context, client pb.TestServiceClient) {
}

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -857,6 +857,7 @@ func TestUnaryServerInterceptor(t *testing.T) {
for _, check := range serverChecks {
name := check.grpcCode.String()
t.Run(name, func(t *testing.T) {
t.Setenv("OTEL_METRICS_EXEMPLAR_FILTER", "always_off")
sr := tracetest.NewSpanRecorder()
tp := trace.NewTracerProvider(trace.WithSpanProcessor(sr))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func TestStatsHandlerHandleRPCServerErrors(t *testing.T) {
for _, check := range serverChecks {
name := check.grpcCode.String()
t.Run(name, func(t *testing.T) {
t.Setenv("OTEL_METRICS_EXEMPLAR_FILTER", "always_off")
sr := tracetest.NewSpanRecorder()
tp := trace.NewTracerProvider(trace.WithSpanProcessor(sr))

Expand Down

0 comments on commit 5b5337c

Please sign in to comment.