You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2026-06-03 18:35:08 +02:00
Fix exemplar tests in containerized environments (#8188)
The actual default reservoir provider uses runtime.GOMAXPROCS(0) to work properly in containerized environments. When I was running the test, the fact that the test used runtime.NumCPU() caused the test to fail. https://github.com/open-telemetry/opentelemetry-go/blob/48dd8b1a0975e14a09d615f8ee80212b20f1e107/sdk/metric/exemplar.go#L70-L73
This commit is contained in:
@@ -402,7 +402,7 @@ func TestInserterCachedAggregatorNameConflict(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestExemplars(t *testing.T) {
|
||||
nCPU := runtime.NumCPU()
|
||||
nCPU := max(runtime.GOMAXPROCS(0), 1)
|
||||
setup := func(name string) (metric.Meter, Reader) {
|
||||
r := NewManualReader()
|
||||
v := NewView(Instrument{Name: "int64-expo-histogram"}, Stream{
|
||||
|
||||
Reference in New Issue
Block a user