Skip to content

v1.20.0

Choose a tag to compare

@mpangrazzi mpangrazzi released this 09 Jun 12:05
5005460

This release makes the tracing dashboard real-time: pipeline runs now stream into the UI over Server-Sent Events instead of polling, with live in-flight indicators and a refreshed high-contrast theme.

Start it as before:

hayhooks run --with-tracing-dashboard

Then open http://localhost:1416/dashboard.

hayhooks-tracing-dashboard-realtime

✨ Real-Time Trace Streaming (SSE)

The dashboard now receives trace updates the moment they happen, over a
Server-Sent Events stream, replacing the previous ~2.5s polling loop. Traces and
their spans appear as they start and update live as they complete - no refresh,
no waiting for the next poll.

Highlights:

  • New GET /dashboard/api/traces/stream SSE endpoint; the UI consumes it via EventSource.
  • Polling is kept as an automatic fallback - if the stream can't connect or stalls, the dashboard transparently falls back to the REST API and recovers when the stream returns.
  • Reuses the existing cursor/pagination semantics (after_seq, next_after_seq, X-Hayhooks-Trace-Cursor), so the REST API is unchanged.

Toggle streaming and tune the keepalive interval:

export HAYHOOKS_DASHBOARD_STREAM_ENABLED=false        # force polling
export HAYHOOKS_DASHBOARD_STREAM_HEARTBEAT_MS=15000   # SSE keepalive (default)

🔴 Live In-Flight Indicators

Ongoing traces and spans are now clearly distinguishable from completed ones:

  • Each span carries an explicit running flag, so in-progress spans appear and pulse the instant they start, then settle into their duration bar when they finish.
  • Ongoing traces are highlighted with an animated border beam; the latest trace auto-expands while older finished traces collapse to keep the list compact.
  • "Ongoing" detection is now driven by the root span's run state, fixing cases where a trace looked finished while still running.

🎨 High-Contrast Theme Refresh

  • A vivid, high-contrast near-black theme is now the default, using the Haystack palette.
  • Lighter, borderless span rows make the waterfall easier to scan.
  • Crisper typography: the dashboard now loads the actual Inter font weights instead of synthesizing bold.

🔧 Reliability

  • Server shutdown (Ctrl-C) no longer hangs on open dashboard SSE connections. Graceful shutdown is now bounded across all launch paths, including the MCP server.
export HAYHOOKS_GRACEFUL_SHUTDOWN_TIMEOUT=5   # seconds to drain connections before exit

📌 Upgrade Notes

  • API addition (backward-compatible): span nodes in GET /dashboard/api/traces and the new stream now include a running: boolean field.
  • Real-time streaming is on by default; set HAYHOOKS_DASHBOARD_STREAM_ENABLED=false to revert to polling.
  • The dashboard remains a local/debugging view. The trace buffer is per-process, so for multi-worker deployments use an external OpenTelemetry backend (OTEL_*) for complete cross-worker observability.

Full Changelog: v1.19.2...v1.20.0