{"record":{"id":"529c94e13653267e","repo":"thanos-io/thanos","slug":"proxy-exemplars","errorCode":null,"errorMessage":"proxy Exemplars","messagePattern":"proxy Exemplars","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/exemplars/exemplars.go","lineNumber":90,"sourceCode":"\tc := &GRPCClient{\n\t\tproxy:         es,\n\t\treplicaLabels: map[string]struct{}{},\n\t}\n\n\tfor _, label := range replicaLabels {\n\t\tc.replicaLabels[label] = struct{}{}\n\t}\n\treturn c\n}\n\nfunc (rr *GRPCClient) Exemplars(ctx context.Context, req *exemplarspb.ExemplarsRequest) ([]*exemplarspb.ExemplarData, annotations.Annotations, error) {\n\tspan, ctx := tracing.StartSpan(ctx, \"exemplar_grpc_request\")\n\tdefer span.Finish()\n\n\tresp := &exemplarsServer{ctx: ctx}\n\n\tif err := rr.proxy.Exemplars(req, resp); err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"proxy Exemplars\")\n\t}\n\n\tif resp.data == nil {\n\t\treturn make([]*exemplarspb.ExemplarData, 0), resp.warnings, nil\n\t}\n\n\tresp.data = dedupExemplarsResponse(resp.data, rr.replicaLabels)\n\treturn resp.data, resp.warnings, nil\n}\n\nfunc dedupExemplarsResponse(exemplarsData []*exemplarspb.ExemplarData, replicaLabels map[string]struct{}) []*exemplarspb.ExemplarData {\n\tif len(exemplarsData) == 0 {\n\t\treturn exemplarsData\n\t}\n\n\t// Deduplicate series labels.\n\thashToExemplar := make(map[uint64]*exemplarspb.ExemplarData)\n\tfor _, e := range exemplarsData {","sourceCodeStart":72,"sourceCodeEnd":108,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/exemplars/exemplars.go#L72-L108","documentation":"Exemplars fans the request out through the proxy to all store APIs and wraps any fan-out error with errors.Wrap(err, \"proxy Exemplars\"). It indicates the underlying proxy.Exemplars call failed (e.g. InvalidArgument from no selectors, or per-store Aborted errors) before any data could be assembled.","triggerScenarios":"Calling the ThanOS Query Frontend/Query Exemplars API where rr.proxy.Exemplars returns a non-nil error — e.g. all stores failed under ABORT strategy, or the proxy returned codes.InvalidArgument for empty selectors.","commonSituations":"Hitting /api/v1/exemplars against stores that don't support exemplars, misconfigured store addresses, or queries whose selectors are entirely stripped as external labels (leading to the proxy's InvalidArgument).","solutions":["Read the wrapped cause below 'proxy Exemplars:' in the error string to identify the real failure.","Ensure the query has at least one non-external-label matcher (see pkg/exemplars/proxy.go:76).","Verify store endpoints support the Exemplars gRPC method and are reachable.","If partial data is acceptable, use a partial-response strategy that tolerates store failures instead of ABORT."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"data, _, err := api.Exemplars(ctx, req)\nif err != nil {\n\tif st, ok := status.FromError(err); ok && st.Code() == codes.InvalidArgument {\n\t\treturn fmt.Errorf(\"bad exemplars query: %w\", err)\n\t}\n\treturn fmt.Errorf(\"exemplars fanout failed: %w\", err)\n}","preventionTips":["Check storeAPI exemplar support and reachability before enabling exemplars in the UI.","Parse the wrapped cause under 'proxy Exemplars:' to triage.","Use tolerant partial-response strategies when partial data is acceptable."],"tags":["go","grpc","exemplars","proxy","fanout"],"backgroundTag":"api-error-response","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"}