{"record":{"id":"69be1c691dd28ab1","repo":"thanos-io/thanos","slug":"proxy-labelvalues","errorCode":null,"errorMessage":"proxy LabelValues()","messagePattern":"proxy LabelValues\\(\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/query/querier.go","lineNumber":460,"sourceCode":"\t\thints = &storage.LabelHints{}\n\t}\n\n\treq := &storepb.LabelValuesRequest{\n\t\tLabel:                   name,\n\t\tPartialResponseStrategy: q.partialResponseStrategy,\n\t\tStart:                   q.mint,\n\t\tEnd:                     q.maxt,\n\t\tMatchers:                pbMatchers,\n\t\tLimit:                   int64(hints.Limit),\n\t}\n\n\tif q.isDedupEnabled() {\n\t\treq.WithoutReplicaLabels = q.replicaLabels\n\t}\n\n\tresp, err := q.proxy.LabelValues(ctx, req)\n\tif err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"proxy LabelValues()\")\n\t}\n\n\tvar warns annotations.Annotations\n\tfor _, w := range resp.Warnings {\n\t\twarns.Add(errors.New(w))\n\t}\n\n\treturn resp.Values, warns, nil\n}\n\n// LabelNames returns all the unique label names present in the block in sorted order constrained\n// by the given matchers.\nfunc (q *querier) LabelNames(ctx context.Context, hints *storage.LabelHints, matchers ...*labels.Matcher) ([]string, annotations.Annotations, error) {\n\tspan, ctx := tracing.StartSpan(ctx, \"querier_label_names\")\n\tdefer span.Finish()\n\n\t// TODO(bwplotka): Pass it using the SeriesRequest instead of relying on context.\n\tctx = context.WithValue(ctx, store.StoreMatcherKey, q.storeDebugMatchers)","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/query/querier.go#L442-L478","documentation":"LabelValues fans out to stores through the gRPC proxy; any error from proxy.LabelValues (transport failure, remote error, deadline) is wrapped as 'proxy LabelValues()'. It's the umbrella error for store-side failures during label value lookup.","triggerScenarios":"Calling LabelValues while one or more queried stores fail the LabelValues RPC: unreachable endpoints, TLS errors, context deadline exceeded.","commonSituations":"Store gateway outage, Kubernetes service DNS issues, query frontend timeout too short, network policies blocking gRPC traffic.","solutions":["Check store endpoint health/connectivity (grpcurl, logs)","Review the wrapped underlying error for which store failed","Raise timeouts or reduce label matcher scope for large cardinality labels","Ensure network policies/firewalls allow gRPC on store ports"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// verify at least one healthy store before LabelValues fan-out\nif len(healthyStores(stores)) == 0 {\n    return errors.New(\"no healthy stores for LabelValues\")\n}","typeGuard":null,"tryCatchPattern":"vals, warns, err := q.LabelValues(ctx, name, hints, matchers...)\nif err != nil {\n    if strings.Contains(err.Error(), \"proxy LabelValues()\") {\n        return retryBackoff(ctx, 3, func() error { return fetchValues() })\n    }\n    return err\n}","preventionTips":["Alert on store RPC failure rate","Keep query timeouts above store latency p99","Ensure service discovery excludes dead stores promptly"],"tags":["thanos","grpc","labels","network"],"backgroundTag":"upstream-api-error","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"}