openzipkin/zipkin · error · Error
Trace ${modelview.traceId} is missing a timestamp
Error message
Trace ${modelview.traceId} is missing a timestamp What it means
Thrown by zipkin-lens's detailedTraceSummary when getTraceTimestampAndDuration returns no timestamp for the trace. Like the traceSummary variant, the detailed (waterfall) model requires at least one span with a timestamp to establish the trace's absolute start; otherwise the trace cannot be rendered. This is the same invariant enforced at the detailed-view layer.
Source
Thrown at zipkin-lens/src/zipkin/trace.js:266
});
} else {
spanRow.left = 0;
}
}
// TODO: Revisit naming
export function detailedTraceSummary(root) {
const serviceNameToCount = {};
let queue = root.queueRootMostSpans();
const modelview = {
traceId: queue[0].span.traceId,
depth: 0,
spans: [],
};
const { timestamp, duration } = getTraceTimestampAndDuration(root);
if (!timestamp)
throw new Error(`Trace ${modelview.traceId} is missing a timestamp`);
while (queue.length > 0) {
let current = queue.shift();
// This is more than a normal tree traversal, as we are merging any server spans that share the
// same ID. When that's the case, we pull up any of their children as if they are our own.
const spansToMerge = [current.span];
const children = [];
current.children.forEach((child) => {
if (current.span.id === child.span.id) {
spansToMerge.push(child.span);
child.children.forEach((grandChild) => children.push(grandChild));
} else {
children.push(child);
}
});
// Pulling up children may affect our sort order. We re-sort to ensure rows are added inView on GitHub (pinned to 878ce2a1fa)
Solutions
- Guarantee the root/server spans include timestamp (microseconds) before sending them to Zipkin.
- If converting from another format, populate timestamp from your event time field.
- Validate the raw span list with a pre-check (some span has timestamp) before invoking detailedTraceSummary.
Example fix
// before
const root = buildTree([{ traceId: 'a', id: 'a', name: 'root' }]);
detailedTraceSummary(root); // throws
// after
const root = buildTree([{ traceId: 'a', id: 'a', name: 'root', timestamp: 1700000000000000 }]);
detailedTraceSummary(root); Defensive patterns
Strategy: validation
Validate before calling
const spans = collectSpans(root);
if (!spans.some((s) => typeof s.timestamp === 'number')) return showError('trace missing timestamp'); Type guard
const renderableTrace = (spans) => spans.length > 0 && spans.some((s) => typeof s?.timestamp === 'number');
Prevention
- Check for timestamps before building the detailed view; guard the UI entry point with the same predicate.
When it happens
Trigger: Calling detailedTraceSummary(rootSpanNode) on a span tree where all spans lack a timestamp field — e.g. building the detailed view from a fixture or from data where timestamps were never set or were removed.
Common situations: Rendering the trace waterfall from spans produced by stub instrumentation without clocks; a custom span producer (e.g. log-to-trace converter) that omits timestamp; partial data after storage truncation.
Related errors
- Trace ${traceId} is missing a timestamp
- input is not a list
- List<Span> implies at least traceId and id fields
- v1 format is not supported. For help, contact https://gitter
- Start bucket ({startBucket}) > end bucket ({endBucket})
AI-assisted analysis of openzipkin/zipkin@878ce2a1fa (2026-08-14).
Data as JSON: /api/errors/7e732022326f2e77.
Report an issue: GitHub.