diff --git a/config/metric.go b/config/metric.go index fb2dd23905c..7648d466385 100644 --- a/config/metric.go +++ b/config/metric.go @@ -338,7 +338,7 @@ func prometheusReader(ctx context.Context, prometheusConfig *Prometheus) (sdkmet } go func() { - if err := server.Serve(lis); err != nil && errors.Is(err, http.ErrServerClosed) { + if err := server.Serve(lis); err != nil && !errors.Is(err, http.ErrServerClosed) { otel.Handle(fmt.Errorf("the Prometheus HTTP server exited unexpectedly: %w", err)) } }()