{"record":{"id":"e8b58a91c105c633","repo":"jaegertracing/jaeger","slug":"failed-to-execute-getoperations-w","errorCode":null,"errorMessage":"failed to execute GetOperations: %w","messagePattern":"failed to execute GetOperations: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v2/grpc/tracereader.go","lineNumber":125,"sourceCode":"\nfunc (tr *TraceReader) GetServices(ctx context.Context) ([]string, error) {\n\tresp, err := tr.client.GetServices(ctx, &storage.GetServicesRequest{})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to execute GetServices: %w\", err)\n\t}\n\treturn resp.Services, nil\n}\n\nfunc (tr *TraceReader) GetOperations(\n\tctx context.Context,\n\tparams tracestore.OperationQueryParams,\n) ([]tracestore.Operation, error) {\n\tresp, err := tr.client.GetOperations(ctx, &storage.GetOperationsRequest{\n\t\tService:  params.ServiceName,\n\t\tSpanKind: params.SpanKind,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to execute GetOperations: %w\", err)\n\t}\n\toperations := make([]tracestore.Operation, len(resp.Operations))\n\tfor i, op := range resp.Operations {\n\t\toperations[i] = tracestore.Operation{\n\t\t\tName:     op.Name,\n\t\t\tSpanKind: op.SpanKind,\n\t\t}\n\t}\n\treturn operations, nil\n}\n\nfunc (tr *TraceReader) FindTraces(\n\tctx context.Context,\n\tparams tracestore.TraceQueryParams,\n) iter.Seq2[[]ptrace.Traces, error] {\n\treturn func(yield func([]ptrace.Traces, error) bool) {\n\t\tquery, err := toProtoQueryParameters(params)\n\t\tif err != nil {","sourceCodeStart":107,"sourceCodeEnd":143,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v2/grpc/tracereader.go#L107-L143","documentation":"TraceReader.GetOperations wraps any error returned by the remote storage gRPC client's GetOperations RPC with this message. It means the call to list service operations (name + span kind pairs) failed at the transport, serialization, or remote-server level. The library re-wraps rather than returns the raw error so callers can tell which storage operation failed.","triggerScenarios":"Calling traceReader.GetOperations(ctx, tracestore.OperationQueryParams{...}) when the remote gRPC server is unreachable, returns a non-OK status (Unavailable, DeadlineExceeded, PermissionDenied, Unimplemented for older servers), or the context is cancelled/times out.","commonSituations":"Remote storage adapter address misconfigured; server restarted or network partition; per-RPC deadline too short; remote Jaeger version predates the v2 storage API and returns Unimplemented; TLS/mTLS credentials mismatch.","solutions":["Check connectivity to the remote storage server (address, port, DNS) with grpc health/healthz probe","Inspect the wrapped %w error for its gRPC status code and fix the specific cause (timeout, auth, unimplemented)","Increase context deadline or client timeout if DeadlineExceeded","Verify client credentials/TLS configuration match the server","Ensure the remote server runs a version supporting the v2 GetOperations API"],"exampleFix":"// before\nops, err := reader.GetOperations(ctx, params) // err: failed to execute GetOperations: rpc error: DeadlineExceeded\n// after\nctx, cancel := context.WithTimeout(ctx, 10*time.Second)\ndefer cancel()\nops, err := reader.GetOperations(ctx, params)\nif err != nil {\n    if status.Code(errors.Unwrap(err)) == codes.Unimplemented { /* upgrade server or fallback */ }\n}","handlingStrategy":"try-catch","validationCode":"if params.ServiceName == \"\" { return errors.New(\"ServiceName is required for GetOperations\") }\nif err := grpcHealthCheck(ctx, conn); err != nil { return fmt.Errorf(\"storage server unreachable: %w\", err) }","typeGuard":null,"tryCatchPattern":"ops, err := reader.GetOperations(ctx, params)\nif err != nil {\n    if status.Code(err) == codes.Unimplemented { /* older server: fallback */ }\n    return fmt.Errorf(\"GetOperations failed: %w\", err)\n}","preventionTips":["Health-check the remote storage connection at startup","Set realistic per-call deadlines","Pin server/client versions to compatible releases","Log the unwrapped gRPC status for triage"],"tags":["grpc","storage","trace-reader"],"backgroundTag":"grpc-rpc-failed","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}