The test relies on implementation details by setting Metrics to nil and expecting specific behavior. Consider using a more explicit test setup that doesn't depend on nil handling.
Metrics: NewDefaultMetrics(), // explicitly use default metrics implementation
Originally posted by @Copilot in #4186 (comment)