{"record":{"id":"b66866c1fa2bb928","repo":"jaegertracing/jaeger","slug":"failed-to-get-dependencies-w-b66866","errorCode":null,"errorMessage":"failed to get dependencies: %w","messagePattern":"failed to get dependencies: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/storage/v2/grpc/depreader.go","lineNumber":41,"sourceCode":"// NewDependencyReader creates a DependencyReader that communicates with a remote gRPC storage server.\n// The provided gRPC connection is used exclusively for reading dependencies, meaning it is safe\n// to enable instrumentation on the connection.\nfunc NewDependencyReader(conn *grpc.ClientConn) *DependencyReader {\n\treturn &DependencyReader{\n\t\tclient: storage.NewDependencyReaderClient(conn),\n\t}\n}\n\nfunc (dr *DependencyReader) GetDependencies(\n\tctx context.Context,\n\tquery depstore.QueryParameters,\n) ([]model.DependencyLink, error) {\n\tresp, err := dr.client.GetDependencies(ctx, &storage.GetDependenciesRequest{\n\t\tStartTime: query.StartTime,\n\t\tEndTime:   query.EndTime,\n\t})\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to get dependencies: %w\", err)\n\t}\n\tdependencies := make([]model.DependencyLink, len(resp.Dependencies))\n\tfor i, dep := range resp.Dependencies {\n\t\tdependencies[i] = model.DependencyLink{\n\t\t\tParent:    dep.Parent,\n\t\t\tChild:     dep.Child,\n\t\t\tCallCount: dep.CallCount,\n\t\t\tSource:    dep.Source,\n\t\t}\n\t}\n\treturn dependencies, nil\n}\n","sourceCodeStart":23,"sourceCodeEnd":54,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v2/grpc/depreader.go#L23-L54","documentation":"The gRPC remote storage DependencyReader wraps any error from the remote GetDependencies call and re-raises it as 'failed to get dependencies'. It means the downstream remote-storage plugin failed to return dependency links for the given time range.","triggerScenarios":"Calling DependencyReader.GetDependencies(ctx, query) when the remote storage server is unreachable, returns a gRPC error, or the request is rejected (auth/tenancy, deadline exceeded).","commonSituations":"Remote storage service down or wrong host:port configured; network/firewall blocking the gRPC port; server not implementing the dependencies API; authentication token missing.","solutions":["Check the error's wrapped cause to identify the underlying gRPC status (unavailable, deadline, unimplemented)","Verify the remote-storage server address/ports in the storage config","Ensure the remote storage plugin supports dependency links and is running","Retry with backoff if the cause is transient unavailability"],"exampleFix":"// before\ndeps, err := depReader.GetDependencies(ctx, query)\n// after - inspect wrapped cause\ndeps, err := depReader.GetDependencies(ctx, query)\nif err != nil {\n    if status.Code(err) == codes.Unavailable { /* retry */ }\n    return err\n}","handlingStrategy":"retry","validationCode":"// verify connectivity before calling\nconn, err := grpc.NewClient(addr, grpc.WithTransportCredentials(insecure.NewCredentials()))\nif err != nil { /* endpoint misconfigured */ }","typeGuard":null,"tryCatchPattern":"deps, err := depReader.GetDependencies(ctx, query)\nif err != nil {\n    if status.Code(errors.Unwrap(err)) == codes.Unavailable {\n        // retry with backoff\n    }\n    return err\n}","preventionTips":["Monitor remote storage liveness","Set generous but bounded context deadlines","Confirm the plugin implements dependency links before use"],"tags":["grpc","storage","dependencies"],"backgroundTag":"grpc-call-failed","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}