{"record":{"id":"68df886d2fdb3e76","repo":"jaegertracing/jaeger","slug":"this-storage-backend-does-not-compute-trace-summar","errorCode":null,"errorMessage":"this storage backend does not compute trace summaries natively: %w","messagePattern":"this storage backend does not compute trace summaries natively: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"info","filePath":"internal/storage/v2/api/tracestore/summary.go","lineNumber":58,"sourceCode":"\tErrorSpanCount int\n\t// OrphanSpanCount is the number of spans that have a parent span ID that\n\t// is not present in this trace (i.e. the trace is incomplete).\n\tOrphanSpanCount int\n\t// Services contains one entry per distinct service name observed across all spans,\n\t// including the root span's service. Entries are sorted by service name.\n\tServices []ServiceSummary\n}\n\n// UnsupportedTraceSummaries provides a Reader.FindTraceSummaries implementation\n// for backends that cannot compute trace summaries natively. It yields\n// errors.ErrUnsupported as its first (and only) error, which signals the caller\n// to fall back to FindTraces + client-side aggregation. Embed it in a Reader to\n// opt into that behavior without writing the method by hand.\ntype UnsupportedTraceSummaries struct{}\n\nfunc (UnsupportedTraceSummaries) FindTraceSummaries(context.Context, TraceQueryParams) iter.Seq2[[]TraceSummary, error] {\n\treturn func(yield func([]TraceSummary, error) bool) {\n\t\tyield(nil, fmt.Errorf(\"this storage backend does not compute trace summaries natively: %w\", errors.ErrUnsupported))\n\t}\n}\n","sourceCodeStart":40,"sourceCodeEnd":61,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/internal/storage/v2/api/tracestore/summary.go#L40-L61","documentation":"UnsupportedTraceSummaries is a drop-in embed for a Reader that does not implement FindTraceSummaries natively. Its iterator yields a single (nil, error) that wraps errors.ErrUnsupported with this message, telling the caller this storage backend cannot compute trace summaries itself and that the caller should fall back to FindTraces plus client-side aggregation. It is an intentional capability signal, not a bug.","triggerScenarios":"Calling FindTraceSummaries on any Reader that embeds UnsupportedTraceSummaries instead of implementing the method — e.g. a ClickHouse or other v2 Reader lacking a summaries implementation.","commonSituations":"A UI or query service requests the trace-summary view against a backend without native summary support; plugin authors forget to implement FindTraceSummaries and embed the default; a newly added summaries API rolled out to some backends only.","solutions":["Implement FindTraceSummaries on your Reader with a backend-native summary query.","At the call site, detect errors.Is(err, errUnsupported) and fall back to FindTraces + client-side aggregation, as the API documents.","Feature-detect via a capability interface (type assertion to a summaries-supporting Reader) before requesting summaries."],"exampleFix":"// before\nsummaries, err := reader.FindTraceSummaries(ctx, params) // err: ... does not compute trace summaries natively\n// after\nif summariesReader, ok := reader.(interface{ SupportsTraceSummaries() bool }); !ok || !summariesReader.SupportsTraceSummaries() {\n    summaries = aggregateFromFindTraces(ctx, reader, params)\n}","handlingStrategy":"fallback","validationCode":"_, supportsSummaries := reader.(interface {\n  FindTraceSummaries(context.Context, tracestore.TraceQueryParams) iter.Seq2[[]tracestore.TraceSummary, error]\n})","typeGuard":"func supportsTraceSummaries(r tracestore.Reader) bool {\n  _, ok := r.(interface {\n    FindTraceSummaries(context.Context, tracestore.TraceQueryParams) iter.Seq2[[]tracestore.TraceSummary, error]\n  })\n  return ok\n}","tryCatchPattern":"for summaries, err := range reader.FindTraceSummaries(ctx, params) {\n  if err != nil {\n    if errors.Is(err, errUnsupported) { // fall back to FindTraces + client-side aggregation\n      return aggregateFromFindTraces(ctx, reader, params)\n    }\n    return err\n  }\n  _ = summaries\n}","preventionTips":["Feature-detect summaries support before requesting them","Implement FindTraceSummaries in custom Readers instead of relying on the embed","Document per-backend summaries capability in deployment configs"],"tags":["jaeger","tracestore","unsupported-capability","summaries"],"backgroundTag":"unsupported-capability","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}