{"record":{"id":"dd17d598bc03d93b","repo":"thanos-io/thanos","slug":"unknown-integration-name-s","errorCode":null,"errorMessage":"unknown integration name: %s","messagePattern":"unknown integration name: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cortex/util/validation/notifications_limit_flag.go","lineNumber":48,"sourceCode":"func (m NotificationRateLimitMap) Set(s string) error {\n\tnewMap := map[string]float64{}\n\treturn m.updateMap(json.Unmarshal([]byte(s), &newMap), newMap)\n}\n\n// UnmarshalYAML implements yaml.Unmarshaler.\nfunc (m NotificationRateLimitMap) UnmarshalYAML(unmarshal func(any) error) error {\n\tnewMap := map[string]float64{}\n\treturn m.updateMap(unmarshal(newMap), newMap)\n}\n\nfunc (m NotificationRateLimitMap) updateMap(unmarshalErr error, newMap map[string]float64) error {\n\tif unmarshalErr != nil {\n\t\treturn unmarshalErr\n\t}\n\n\tfor k, v := range newMap {\n\t\tif !slices.Contains(allowedIntegrationNames, k) {\n\t\t\treturn errors.Errorf(\"unknown integration name: %s\", k)\n\t\t}\n\t\tm[k] = v\n\t}\n\treturn nil\n}\n\n// MarshalYAML implements yaml.Marshaler.\nfunc (m NotificationRateLimitMap) MarshalYAML() (any, error) {\n\treturn map[string]float64(m), nil\n}\n","sourceCodeStart":30,"sourceCodeEnd":59,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/internal/cortex/util/validation/notifications_limit_flag.go#L30-L59","documentation":"notifications_limit_flag.go implements a flag/yaml type mapping integration names (e.g. pagerduty, slack, email) to per-integration notification limits. updateMap validates every key of the incoming map against a fixed list of allowedIntegrationNames and rejects any key that is not a known integration.","triggerScenarios":"Setting the notification limit flag or unmarshalling YAML with a typo'd or unsupported integration name as a map key (Set from CLI flags, or UnmarshalYAML from config file).","commonSituations":"Typo in config like \"paggerduty\"; using an integration name from a newer Cortex/Thanos version than the running binary; copying Alertmanager integration names that don't exist in this build.","solutions":["Check the exact allowed names (allowedIntegrationNames in notifications_limit_flag.go) and fix the typo in your flag or YAML.","Verify the integration exists in your binary's version; upgrade if the integration was added later.","Use the config file reference/documentation for notifications limits of the matching release.","Add config validation to CI (unmarshal the config with the same types) to catch unknown keys before deploy."],"exampleFix":"// before (yaml)\nnotif_limits:\n  paggerduty: 100\n// after (yaml)\nnotif_limits:\n  pagerduty: 100","handlingStrategy":"validation","validationCode":"allowed := []string{\"email\",\"pagerduty\",\"pushover\",\"slack\",\"opsgenie\",\"webhook\",\"victorops\"} // see allowedIntegrationNames\nfor k := range notifLimits {\n    if !slices.Contains(allowed, k) {\n        return fmt.Errorf(\"unknown integration name: %s\", k)\n    }\n}","typeGuard":null,"tryCatchPattern":"if err := yaml.UnmarshalStrict(cfgBytes, &cfg); err != nil {\n    return fmt.Errorf(\"invalid notifications limits: %w\", err)\n}","preventionTips":["Copy integration names only from the docs of the exact release in use.","Use yaml.UnmarshalStrict so unknown keys fail fast.","Lint config files against the allowed name list in CI."],"tags":["config","validation","yaml"],"backgroundTag":"invalid-enum-value","analyzedSha":"35b8b991177def87ed52dcf10f9b6d87f07282c8","analyzedAt":"2026-09-07T01:49:59.689Z","contentChangedAt":"2026-09-07T01:49:59.689Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}