npx skills add ...
npx skills add triggerdotdev/trigger.dev --skill span-timeline-events
npx skills add triggerdotdev/trigger.dev --skill span-timeline-events
Use when adding, modifying, or debugging OTel span timeline events in the trace view. Covers event structure, ClickHouse storage constraints, rendering in SpanTimeline component, admin visibility, and the step-by-step process for adding new events.
The trace view's right panel shows a timeline of events for the selected span. These are OTel span events rendered by app/utils/timelineSpanEvents.ts and the SpanTimeline component.
kind: "SPAN_EVENT" sharing the parent span's span_id. The #mergeRecordsIntoSpanDetail method reassembles them into the span's events array at query time.name starts with trigger.dev/ - all others are silently filtered out.properties.event (not the span event name), mapped through getFriendlyNameForEvent().When events are written to ClickHouse, spanEventsToTaskEventV1Input() filters out events whose start_time is not greater than the parent span's startTime. Events at or before the span start are silently dropped. This means span events must have timestamps strictly after the span's own startTimeUnixNano.
The SpanTimeline component in app/components/run/RunTimeline.tsx renders:
createTimelineSpanEventsFromSpanEvents()startTimestartTime + durationThe thin line before "Started" only appears when there are events with timestamps between the span start and the first child span. For the Attempt span this works well (Dequeued -> Pod scheduled -> Launched -> etc. all happen before execution starts). Events all get lineVariant: "light" (thin) while the execution bar gets variant: "normal" (thick).
Sibling spans (same parent) are sorted by start_time ASC from the ClickHouse query. The createTreeFromFlatItems function preserves this order. Event timestamps don't affect sort order - only the span's own start_time.
getAdminOnlyForEvent() controls visibility. Events default to admin-only (true).
| Event | Admin-only | Friendly name |
|---|---|---|
dequeue | No | Dequeued |
fork | No | Launched |
import | No (if no fork event) | Importing task file |
create_attempt | Yes | Attempt created |
lazy_payload | Yes | Lazy attempt initialized |
pod_scheduled | Yes | Pod scheduled |
| (default) | Yes | (raw event name) |
name: "trigger.dev/<scope>" and properties.event: "<type>"startTimeUnixNano (ClickHouse drops earlier events)getFriendlyNameForEvent() in app/utils/timelineSpanEvents.tsgetAdminOnlyForEvent()getHelpTextForEvent()app/utils/timelineSpanEvents.ts - filtering, naming, admin logicapp/components/run/RunTimeline.tsx - SpanTimeline component (thin line + thick bar rendering)app/presenters/v3/SpanPresenter.server.ts - loads span data including eventsapp/v3/eventRepository/clickhouseEventRepository.server.ts - spanEventsToTaskEventV1Input() (storage filter), #mergeRecordsIntoSpanDetail (reassembly)