{"record":{"id":"66a2d438a087a914","repo":"jaegertracing/jaeger","slug":"archive-span-storage-was-not-configured","errorCode":null,"errorMessage":"archive span storage was not configured","messagePattern":"archive span storage was not configured","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/jaeger/internal/extension/jaegerquery/querysvc/service.go","lineNumber":26,"sourceCode":"\t\"errors\"\n\t\"fmt\"\n\t\"iter\"\n\t\"time\"\n\n\t\"go.opentelemetry.io/collector/pdata/pcommon\"\n\t\"go.opentelemetry.io/collector/pdata/ptrace\"\n\n\t\"github.com/jaegertracing/jaeger-idl/model/v1\"\n\texpression \"github.com/jaegertracing/jaeger-idl/query/expression/v1\"\n\t\"github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerquery/internal/adjuster\"\n\t\"github.com/jaegertracing/jaeger/components/extension/jaegerquery/queryinterceptor\"\n\t\"github.com/jaegertracing/jaeger/internal/jptrace\"\n\t\"github.com/jaegertracing/jaeger/internal/storage/v1/api/spanstore\"\n\t\"github.com/jaegertracing/jaeger/internal/storage/v2/api/depstore\"\n\t\"github.com/jaegertracing/jaeger/internal/storage/v2/api/tracestore\"\n)\n\nvar errNoArchiveSpanStorage = errors.New(\"archive span storage was not configured\")\n\n// ErrServiceNameRequired is returned for a search that omits the service name against a\n// backend whose reader does not accept one (RFC 0013 §3.3). It names the backend's\n// limitation rather than the missing field, because the same query is valid elsewhere.\n// The API layers map it to InvalidArgument / HTTP 400.\nvar ErrServiceNameRequired = errors.New(\n\t\"this storage backend requires a service name to search; searching all services is not supported\",\n)\n\n// QueryServiceOptions holds the configuration options for the query service.\ntype QueryServiceOptions struct {\n\t// ArchiveTraceReader is used to read archived traces from the storage.\n\tArchiveTraceReader tracestore.Reader\n\t// ArchiveTraceWriter is used to write traces to the archive storage.\n\tArchiveTraceWriter tracestore.Writer\n\t// MaxClockSkewAdjust is the maximum duration by which to adjust a span.\n\tMaxClockSkewAdjust time.Duration\n\t// MaxTraceSize is the maximum number of spans allowed per trace. A value of 0 (default) means unlimited.","sourceCodeStart":8,"sourceCodeEnd":44,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/querysvc/service.go#L8-L44","documentation":"errNoArchiveSpanStorage is returned by QueryService.ArchiveTrace when the query service was constructed without an archive trace reader/writer. Archiving is an optional feature requiring a dedicated archive span storage to be configured; without one there is nowhere to write the trace, so ArchiveTrace fails with this error. It is unexported and treated as a caller/configuration problem rather than a server fault.","triggerScenarios":"Calling the ArchiveTrace API (HTTP POST /api/trace/{id} archive action or the gRPC equivalent) against a jaegerquery server started without --span-archive / archive storage configuration.","commonSituations":"Users clicking 'Archive trace' in the Jaeger UI on a deployment where archiving was never set up; automation that archives traces unconditionally regardless of deployment options; environments where archive storage was removed to save cost but clients still archive.","solutions":["Configure archive span storage on the query service (e.g. --span-archive.type=... plus archive-specific flags/config) and restart.","If archiving should not be available, hide/disable the archive action in clients (the UI hides it when the capability is absent) instead of calling it.","Catch this error in client code and surface a clear message that archiving is not enabled on this deployment."],"exampleFix":"// before: starting query without archive storage\njaeger-query --span-storage.type=cassandra\n// after: enable archive storage\njaeger-query --span-storage.type=cassandra \\\n  --span-archive.type=cassandra \\\n  --cassandra.archive.keyspace=jaeger_archive_v2","handlingStrategy":"type-guard","validationCode":null,"typeGuard":"func isNoArchiveStorage(err error) bool {\n    return err != nil && strings.Contains(err.Error(), \"archive span storage was not configured\")\n}","tryCatchPattern":"err := svc.ArchiveTrace(ctx, traceID)\nif err != nil {\n    if isNoArchiveStorage(err) {\n        return fmt.Errorf(\"archiving unavailable: %w\", err) // surface as 404/409-ish, not retryable\n    }\n    return err\n}","preventionTips":["Only expose archive UI actions when the deployment reports archive capability.","Set --span-archive.* flags wherever archive behavior is part of the runbook.","Add a startup log line stating whether archive storage is configured, so operators notice."],"tags":["archive","configuration","optional-feature"],"backgroundTag":"feature-not-configured","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}