{"record":{"id":"30c49050c9bfeccf","repo":"thanos-io/thanos","slug":"unsupported-format-for-tenant-label-name-got-s","errorCode":null,"errorMessage":"unsupported format for tenant label name, got %s","messagePattern":"unsupported format for tenant label name, got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/thanos/receive.go","lineNumber":79,"sourceCode":"const (\n\tcompressionNone   = \"none\"\n\tmetricNamesFilter = \"metric-names-filter\"\n)\n\nfunc registerReceive(app *extkingpin.App) {\n\tcmd := app.Command(component.Receive.String(), \"Accept Prometheus remote write API requests and write to local tsdb.\")\n\n\tconf := &receiveConfig{}\n\tconf.registerFlag(cmd)\n\n\tcmd.Setup(func(g *run.Group, logger log.Logger, reg *prometheus.Registry, tracer opentracing.Tracer, _ <-chan struct{}, debugLogging bool) error {\n\t\tlset, err := parseFlagLabels(conf.labelStrs)\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"parse labels\")\n\t\t}\n\n\t\tif !model.UTF8Validation.IsValidLabelName(conf.tenantLabelName) {\n\t\t\treturn errors.Errorf(\"unsupported format for tenant label name, got %s\", conf.tenantLabelName)\n\t\t}\n\t\tif lset.Len() == 0 {\n\t\t\treturn errors.New(\"no external labels configured for receive, uniquely identifying external labels must be configured (ideally with `receive_` prefix); see https://thanos.io/tip/thanos/storage.md#external-labels for details.\")\n\t\t}\n\n\t\tgrpcLogOpts, logFilterMethods, err := logging.ParsegRPCOptions(conf.reqLogConfig)\n\n\t\tif err != nil {\n\t\t\treturn errors.Wrap(err, \"error while parsing config for request logging\")\n\t\t}\n\n\t\ttsdbOpts := &tsdb.Options{\n\t\t\tMinBlockDuration:               int64(time.Duration(*conf.tsdbMinBlockDuration) / time.Millisecond),\n\t\t\tMaxBlockDuration:               int64(time.Duration(*conf.tsdbMaxBlockDuration) / time.Millisecond),\n\t\t\tRetentionDuration:              int64(time.Duration(*conf.retention) / time.Millisecond),\n\t\t\tOutOfOrderTimeWindow:           int64(time.Duration(*conf.tsdbOutOfOrderTimeWindow) / time.Millisecond),\n\t\t\tMaxBytes:                       int64(conf.tsdbMaxBytes),\n\t\t\tOutOfOrderCapMax:               conf.tsdbOutOfOrderCapMax,","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/cmd/thanos/receive.go#L61-L97","documentation":"The configured tenant label name (via --tenant-label-name) is not a valid Prometheus label name per UTF8Validation. Receive rejects the config because remote-write tenant attribution depends on a syntactically valid label name.","triggerScenarios":"Thrown at cmd/thanos/receive.go:79 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set --tenant-label-name to a valid label name (e.g. 'tenant' or '__tenant_id__')","Remove unsupported characters from the label name"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}