SigNoz/signoz · error
ErrCodeInvalidInput
ErrCodeInvalidInput
Error message
meterreporter::interval must be between 10m and 24h
What it means
meterreporter Config.Validate constrains the reporting interval to [10m, 24h]. Shorter intervals would hammer downstream sinks; longer ones make reports too stale, so out-of-range values are invalid input.
Source
Thrown at pkg/meterreporter/config.go:43
// Interval the user picks.
Jitter time.Duration `mapstructure:"jitter"`
}
func newConfig() factory.Config {
return Config{
Interval: 6 * time.Hour,
Backfill: true,
Jitter: -1, // Negative sentinel. Resolved at use time unless explicitly set.
}
}
func NewConfigFactory() factory.ConfigFactory {
return factory.NewConfigFactory(factory.MustNewName("meterreporter"), newConfig)
}
func (c Config) Validate() error {
if c.Interval < 10*time.Minute || c.Interval > 24*time.Hour {
return errors.New(errors.TypeInvalidInput, ErrCodeInvalidInput, "meterreporter::interval must be between 10m and 24h")
}
if c.Jitter >= 0 && (c.Jitter < 10*time.Minute || c.Jitter > c.Interval) {
return errors.New(errors.TypeInvalidInput, ErrCodeInvalidInput, "meterreporter::jitter must be between 10m and interval")
}
return nil
}
// NewJitter returns a fresh random duration sampled uniformly from
// [0, jitter), where jitter is the configured Jitter or, if the sentinel
// default is still in place, min(Interval, 2h).
func (c Config) NewJitter() time.Duration {
defaultJitter := 2 * time.Hour
cap := c.Jitter
if cap < 0 {
cap = min(c.Interval, defaultJitter)View on GitHub (pinned to 5069bf80b0)
Solutions
- Set interval between 10m and 24h inclusive (e.g. 1h)
- Ensure config unmarshalling applies a sane default before Validate if interval is optional
- Use Go duration strings ('10m', '24h') to avoid unit confusion
Example fix
// before interval: 1m // after interval: 1h
Defensive patterns
Strategy: validation
Validate before calling
if cfg.Interval < 10*time.Minute || cfg.Interval > 24*time.Hour { return fmt.Errorf("interval must be within [10m, 24h]") } Prevention
- Use Go duration literals; default interval to 1h if unset
When it happens
Trigger: Configuring meterreporter with Interval < 10*time.Minute or > 24*time.Hour (including the zero value when the field is omitted, depending on defaults applied before Validate).
Common situations: Setting a dev-friendly 1m interval and shipping it to prod; omitting interval so it defaults to 0; misreading units (seconds vs minutes).
Understand the failure class
Background: Config validation failed: what "invalid value for {key}" and settings-rejection errors mean across 19 open-source libraries — this error's family across 19 libraries.
Related errors
- ErrCodeInvalidGatewayConfig
- invalid_config
- CodeInvalidInput
- CodeLicenseUnavailable
- CodeLicenseUnavailable
AI-assisted analysis of SigNoz/signoz@5069bf80b0 (2026-08-28).
Data as JSON: /api/errors/3449259f11cb4d32.
Report an issue: GitHub.