Skip to content

fix: Jaeger API returns 404 for recently ingested traces #109

Open
shreyas-quizizz wants to merge 1 commit intoVictoriaMetrics:masterfrom
shreyas-quizizz:fix/jaeger-404-fallback-on-unflushed-index
Open

fix: Jaeger API returns 404 for recently ingested traces #109
shreyas-quizizz wants to merge 1 commit intoVictoriaMetrics:masterfrom
shreyas-quizizz:fix/jaeger-404-fallback-on-unflushed-index

Conversation

@shreyas-quizizz
Copy link
Copy Markdown

@shreyas-quizizz shreyas-quizizz commented Feb 25, 2026

Describe Your Changes

Jaeger GET /api/traces/{id} returns 404 for ~60s after ingestion, while the same trace is
immediately queryable via vtselect. This happens because GetTrace() relies on the trace ID
index stream, which hasn't been flushed yet due to the double-buffer delay in vtinsert. When
the index lookup returns ErrOutOfRetention, it returns empty instead of falling back to
span data.

This change adds a fallback to search span data directly via findSpansByTraceIDAndTime()
over a recent time window when the index is not yet available. The fallback window is
configurable via -search.recentTraceFallbackWindow (default 5m).

Checklist

The following checks are mandatory:


Summary by cubic

Fixes Jaeger GET /api/traces/{id} returning 404 for ~60s after ingestion by falling back to span search when the trace ID index hasn’t flushed yet. Adds -search.recentTraceFallbackWindow (default 5m) to define the recent window for this fallback.

Written for commit 41f09b5. Summary will update on new commits.

…shed

Jaeger GET /api/traces/{id} returns 404 for ~60s after ingestion because
GetTrace() relies on the trace ID index stream, which is delayed by the
double-buffer flush in vtinsert. Span data is already queryable via
vtselect during this window. When the index lookup returns
ErrOutOfRetention, fall back to searching span data directly over a
recent time window (default 5m) via findSpansByTraceIDAndTime().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@jiekun jiekun self-requested a review February 25, 2026 12:16
@jiekun jiekun self-assigned this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants