{"record":{"id":"1f8b4ec11643be85","repo":"vitessio/vitess","slug":"no-pushbackend-registered-with-name-s","errorCode":null,"errorMessage":"no PushBackend registered with name %s","messagePattern":"no PushBackend registered with name (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/stats/export.go","lineNumber":131,"sourceCode":"var defaultVarGroup = varGroup{vars: make(map[string]expvar.Var)}\n\n// Register allows you to register a callback function\n// that will be called whenever a new stats variable gets\n// created. This can be used to build alternate methods\n// of exporting stats variables.\nfunc Register(nvh NewVarHook) {\n\tdefaultVarGroup.register(nvh)\n}\n\n// Publish is expvar.Publish+hook\nfunc Publish(name string, v expvar.Var) {\n\tpublish(name, v)\n}\n\nfunc pushAll() error {\n\tbackend, ok := pushBackends[statsBackend]\n\tif !ok {\n\t\treturn fmt.Errorf(\"no PushBackend registered with name %s\", statsBackend)\n\t}\n\treturn backend.PushAll()\n}\n\nfunc pushOne(name string, v Variable) error {\n\tbackend, ok := pushBackends[statsBackend]\n\tif !ok {\n\t\treturn fmt.Errorf(\"no PushBackend registered with name %s\", statsBackend)\n\t}\n\treturn backend.PushOne(name, v)\n}\n\n// StringMapFuncWithMultiLabels is a multidimensional string map publisher.\n//\n// Map keys are compound names made with joining multiple strings with '.',\n// and are named by corresponding key labels.\n//\n// Map values are any string, and are named by the value label.","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/stats/export.go#L113-L149","documentation":"pushAll in go/stats/export.go looks up the currently configured stats backend (statsBackend) in the pushBackends registry and fails when no PushBackend with that name has been registered. It indicates a configuration/name mismatch between the requested push backend and the ones registered at init time.","triggerScenarios":"Setting the stats push backend name to something no package registered (e.g. importing stats/opentsdb but requesting a different name), then emitToBackend -> pushAll runs on the push timer.","commonSituations":"Typo in the backend name flag/config; forgetting to import (blank import) the package that registers the backend; backend registered under a renamed identifier after an upgrade.","solutions":["Correct the configured backend name to one of the registered names (e.g. \"opentsdb\")","Add a blank import of the package that registers the backend (e.g. _ \"vitess.io/vitess/go/stats/opentsdb\")","Enumerate pushBackends (or check package init functions) to confirm available names"],"exampleFix":"// before\nimport \"vitess.io/vitess/go/stats\" // backend never registered\n// after\nimport _ \"vitess.io/vitess/go/stats/opentsdb\" // registers \"opentsdb\" PushBackend","handlingStrategy":"validation","validationCode":"if _, ok := stats.PushBackends()[\"opentsdb\"]; !ok {\n\treturn errors.New(\"opentsdb PushBackend not registered; add blank import\")\n}","typeGuard":null,"tryCatchPattern":"if err := pushAll(); err != nil {\n\tif strings.HasPrefix(err.Error(), \"no PushBackend registered\") {\n\t\tlog.Error(\"stats backend not registered\", slog.Any(\"error\", err))\n\t}\n}","preventionTips":["Blank-import every stats backend package you configure (e.g. _ \".../go/stats/opentsdb\")","Keep backend names in one constants file referenced by both config and registration","Smoke-test stats export at startup and fail fast on unregistered backends"],"tags":["go","stats","configuration"],"backgroundTag":"unregistered-stats-backend","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}