{"record":{"id":"68c6bb50f7c635ce","repo":"thanos-io/thanos","slug":"proxy-metricmetadata","errorCode":null,"errorMessage":"proxy MetricMetadata","messagePattern":"proxy MetricMetadata","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/metadata/metadata.go","lineNumber":56,"sourceCode":"\tspan, ctx := tracing.StartSpan(ctx, \"metadata_grpc_request\")\n\tdefer span.Finish()\n\n\tsrv := &metadataServer{ctx: ctx, metric: req.Metric, limit: int(req.Limit)}\n\n\tif req.Limit >= 0 {\n\t\tif req.Metric != \"\" {\n\t\t\tsrv.metadataMap = make(map[string][]metadatapb.Meta, 1)\n\t\t} else if req.Limit <= 100 {\n\t\t\tsrv.metadataMap = make(map[string][]metadatapb.Meta, req.Limit)\n\t\t} else {\n\t\t\tsrv.metadataMap = make(map[string][]metadatapb.Meta)\n\t\t}\n\t} else {\n\t\tsrv.metadataMap = make(map[string][]metadatapb.Meta)\n\t}\n\n\tif err := rr.proxy.MetricMetadata(req, srv); err != nil {\n\t\treturn nil, nil, errors.Wrap(err, \"proxy MetricMetadata\")\n\t}\n\n\treturn srv.metadataMap, srv.warnings, nil\n}\n\ntype metadataServer struct {\n\t// This field just exist to pseudo-implement the unused methods of the interface.\n\tmetadatapb.Metadata_MetricMetadataServer\n\tctx context.Context\n\n\tmetric string\n\tlimit  int\n\n\twarnings    annotations.Annotations\n\tmetadataMap map[string][]metadatapb.Meta\n\tmu          sync.Mutex\n}\n","sourceCodeStart":38,"sourceCodeEnd":74,"githubUrl":"https://github.com/thanos-io/thanos/blob/35b8b991177def87ed52dcf10f9b6d87f07282c8/pkg/metadata/metadata.go#L38-L74","documentation":"MetricMetadata on the proxy forwards a metadata request to the MetadataStore service and wraps any failure from that proxied call with 'proxy MetricMetadata'. It means the underlying store/Vizier metadata RPC failed.","triggerScenarios":"Calling cloud-proxy MetricMetadata when the backing metadata service is unreachable, returns a gRPC error, or the streaming server errors mid-response.","commonSituations":"Vizier unhealthy/disconnected in Pixie Cloud; network partition between cloud proxy and Vizier; metadata service crash or timeout.","solutions":["Check Vizier health (px get vizier / vizier pod status) and reconnect if unhealthy","Inspect the wrapped inner error for the true gRPC status and address it","Retry the request once connectivity is restored","Verify network/DNS between the proxy and the metadata service"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// check Vizier health before querying\nhealthy, err := checkVizierHealth(ctx)\nif err != nil || !healthy { return errors.New(\"vizier unavailable\") }","typeGuard":null,"tryCatchPattern":"if _, err := pxClient.MetricMetadata(ctx, req); err != nil {\n    var serr interface{ GRPCStatus() *status.Status }\n    if errors.As(err, &serr) {\n        log.Printf(\"metadata proxy failure: %s\", serr.GRPCStatus().Code())\n    }\n    // retry with backoff\n}","preventionTips":["Monitor Vizier connectivity before running metadata queries","Retry transient gRPC unavailable errors with backoff","Keep cloud and Vizier versions compatible"],"tags":["grpc","proxy","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"}