Skip to content

[Bug]: otelgrpc unit test is flaky #9113

@dashpole

Description

@dashpole

Component

Instrumentation: otelgrpc

Describe the issue you're facing

Example failure: https://github.com/open-telemetry/opentelemetry-go-contrib/actions/runs/27199185459/job/80298530089?pr=8998

go test -timeout 120s -short ./instrumentation/google.golang.org/grpc/otelgrpc/...
2026/06/09 10:14:33 assert.AnError general error for testing
2026/06/09 10:14:33 assert.AnError general error for testing
--- FAIL: TestMetricAttributesFn_ServerSideStreaming (0.00s)
    metric_attributes_test.go:155: 
        	Error Trace:	/Users/runner/work/opentelemetry-go-contrib/opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/metric_attributes_test.go:645
        	            				/Users/runner/work/opentelemetry-go-contrib/opentelemetry-go-contrib/instrumentation/google.golang.org/grpc/otelgrpc/metric_attributes_test.go:155
        	Error:      	Should NOT be empty, but was []
        	Test:       	TestMetricAttributesFn_ServerSideStreaming
        	Messages:   	no metrics instrumented
FAIL
FAIL	go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc	0.090s

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions