diff --git a/common/metrics/events.go b/common/metrics/events.go index b9c37e525bd..413aa50d4db 100644 --- a/common/metrics/events.go +++ b/common/metrics/events.go @@ -51,6 +51,10 @@ var _ MetricProvider = (*eventsMetricProvider)(nil) // MetricHandlerFromConfig is used at startup to construct func MetricHandlerFromConfig(logger log.Logger, c *Config) MetricHandler { + if c == nil { + return NoopMetricHandler + } + setDefaultPerUnitHistogramBoundaries(&c.ClientConfig) if c.Prometheus != nil && len(c.Prometheus.Framework) > 0 { switch c.Prometheus.Framework {