Introducing a new way to review your PRs.

Read the announcement

eventual-inc / daft

High-performance data engine for AI and multimodal workloads. Process images, audio, video, and structured data at any scale

View on GitHub

19 documents · Updated Nov 11, 2026

docs / observability-and-dashboard

Observability and dashboard

Daft provides several ways to see what a workload is doing while it runs. Logs explain events, traces show nested work, metrics measure progress, subscribers turn query events into records or live reports, and profilers show where a process spends time. The Daft Dashboard brings query plans, operator state, task state, and runtime statistics into one live view.

See also: Execution engines and AI and multimodal workloads.

Observability model

Daft separates short-lived runtime feedback from data that can be sent to another system or inspected later. This lets an engineer start with local logs or progress bars, then move to event logs, OpenTelemetry, the dashboard, or a process profile when the problem needs more detail.

flowchart LR
    W[Daft workload] --> L[Logs and progress]
    W --> S[Query subscribers]
    W --> O[OpenTelemetry]
    W --> P[Process profilers]
    S --> E[Event records]
    S --> D[Daft Dashboard]
    O --> B[OTLP backend]

Runtime signals

Logging

Daft uses Python logging for Python-side messages and Rust tracing for core engine messages. The same broad signal serves two roles: normal logs explain query activity, while higher log levels help isolate a slow or failing part of a local or Ray run. Configure logging before importing Daft when the setting must also reach the Rust side; daft.logging.setup_logger() also refreshes the Rust logger after configuration (daft/logging.py• L36-81, docs/…/logging.md• L7-50).

In a Ray run, the driver and workers produce separate streams. Ray can forward worker logs to the driver, apply one policy to all processes, or run setup code in each worker. This distinction matters because a driver log can describe orchestration while the useful error or timing detail exists only on the worker (docs/…/logging.md• L51-99).

References: daft/logging.py• L36-81 docs/…/logging.md• L7-99

Progress indicators

Progress indicators are the first view of work in a shell or notebook. Local execution reports operator wall time, rows in and out, and operator-specific values such as bytes written. Ray execution reports pipeline task progress and an estimate for the remaining partitions (docs/…/progress-indicators.md• L11-34).

The display is intended for interactive feedback, not as a durable record. Daft disables it outside a user-facing shell by default, and DAFT_PROGRESS_BAR=0 turns it off explicitly when clean output or low measurement overhead matters (daft/…/progress_bar.py• L42-55, docs/…/progress-indicators.md• L13-15).

References: daft/…/progress_bar.py• L42-55 docs/…/progress-indicators.md• L11-34

Tracing and profiling

Tracing records structured log and span data from the Rust core. DAFT_TRACE enables console tracing, and DAFT_TRACE_FORMAT selects compact, pretty, or JSON output. A configured OTLP trace endpoint sends spans to an external trace system, which is useful when work crosses driver, worker, and service boundaries (src/…/lib.rs• L30-49, src/…/lib.rs• L74-135).

Profiling answers a different question: which functions consume process time. The Python runner can write a VizTracer profile when DAFT_PROFILING=1. Flotilla workers can also capture a process profile with Samply when its developer flag is enabled. These profiles are local artifacts and complement, rather than replace, query-level metrics and traces (daft/…/profiler.py• L22-45, daft/…/profiler.py• L76-113, daft/…/flotilla.py• L212-226).

For a JSON trace with properly nested spans, tools/trace_to_speedscope.py converts the records into a SpeedScope profile. This gives a trace captured from stderr a form that a flame or span viewer can inspect (tools/trace_to_speedscope.py• L1-11, tools/trace_to_speedscope.py• L86-172).

References: src/…/lib.rs• L30-135 daft/…/profiler.py• L22-113 tools/trace_to_speedscope.py• L1-11 tools/trace_to_speedscope.py• L86-172

Metrics and telemetry

Runtime metrics

Daft runtime metrics describe data flow and task state at operator level. The core values cover rows, bytes, accumulated operator time, and active or terminal task counts. Distributed runs add Ray task and source-read signals, so the metric set can show both what an operator produced and how its work was scheduled (docs/…/telemetry.md• L51-69).

User-defined functions can add counters during UDF execution. A counter is recorded in the active operator context and travels with the operator statistics; a counter called outside that context is ignored with a warning. This keeps custom values tied to actual workload execution rather than to setup code (daft/…/metrics.py• L19-65).

References: docs/…/telemetry.md• L51-69 daft/…/metrics.py• L19-65

OpenTelemetry export

OpenTelemetry export sends Daft metrics, logs, and traces to an OTLP-compatible system. Export is off until an OTLP endpoint is set. A signal-specific endpoint overrides the shared endpoint, while metrics can use gRPC or HTTP protobuf; logs and traces currently use gRPC (src/…/config.rs• L28-110, src/…/lib.rs• L145-213, docs/…/telemetry.md• L6-49).

The exported resource normally identifies the service as daft, unless standard OpenTelemetry service settings provide another name. The metrics reader exports on a periodic interval, which means an external system can show live trends but may not contain the last values until the provider flushes (src/…/config.rs• L106-123, src/…/lib.rs• L202-223).

References: src/…/config.rs• L28-123 src/…/lib.rs• L145-223 docs/…/telemetry.md• L6-49

Usage telemetry

Daft also sends limited, non-identifying usage analytics for supported builds. Import events include Daft version, operating system, Python version, and machine architecture. Runner events add the selected runner. The requests run in daemon threads and are best effort, so an analytics failure does not fail a workload (daft/scarf_telemetry.py• L40-69, daft/scarf_telemetry.py• L75-129).

This usage telemetry is separate from runtime OpenTelemetry export. Users can opt out with DO_NOT_TRACK=true; the implementation also honors SCARF_NO_ANALYTICS and DAFT_ANALYTICS_ENABLED=false (daft/scarf_telemetry.py• L32-37, docs/telemetry.md• L3-23).

References: daft/scarf_telemetry.py• L32-129 docs/telemetry.md• L3-23

Query subscribers

Subscriber contract

A subscriber is a query-lifecycle listener. Daft sends it immutable events for query start, heartbeats, planning, execution, operator changes, statistics, and query completion. The contract lets one event stream support several consumers without putting a dashboard, log writer, or custom monitor into the execution engine itself (daft/…/abc.py• L28-45, daft/…/events.py• L11-81).

Subscribers are attached to a Daft context and may release resources when detached or when the process ends. The API is experimental, so custom consumers should treat event names and payloads as a versioned contract that can change in minor releases (daft/…/abc.py• L28-45).

References: daft/…/abc.py• L28-45 daft/…/events.py• L11-81

Event logs

The event-log subscriber turns lifecycle events into one JSONL file per query. Records include the event type, time, query ID, and process identity. Planning and execution plans, operator changes, statistics, and the final query state make the log useful for replay or diagnosis after the run has ended (daft/…/event_log.py• L65-70, daft/…/event_log.py• L140-174, daft/…/event_log.py• L187-308).

In a Ray workload, a remote event-log subscriber can ship records from several processes to one Ray sink. The sink writes a shared per-query file, while role, host, and process fields allow a later reader to separate driver and worker activity (daft/…/event_log.py• L311-364, daft/…/event_log_sink.py• L29-50).

References: daft/…/event_log.py• L65-70 daft/…/event_log.py• L140-174 daft/…/event_log.py• L187-308 daft/…/event_log.py• L311-364 daft/…/event_log_sink.py• L29-50

Dashboard subscriber

The dashboard subscriber is the live reporting path. It converts query lifecycle and runtime statistics into HTTP events for the dashboard server. In distributed execution, the statistics manager updates per-node state from task events, then the dashboard subscriber emits snapshots so active and terminal task counts remain visible during the run (src/…/mod.rs• L176-230, src/…/dashboard.rs• L34-83, src/…/dashboard.rs• L126-150).

The path is optional and best effort. Daft creates it when DAFT_DASHBOARD_URL is set, checks connectivity, and continues the workload if the server is unavailable. RAY_DISABLE_DASHBOARD=1 disables the distributed dashboard path (src/…/mod.rs• L56-71, src/…/dashboard.rs• L110-163, src/…/dashboard.rs• L92-123).

References: src/…/dashboard.rs• L110-179 src/…/mod.rs• L52-85 src/…/dashboard.rs• L19-83 src/…/dashboard.rs• L87-151

Daft Dashboard

Dashboard data flow

The Daft Dashboard is a passive web service. Daft processes push query data to it, and browser clients receive a live view from the server. The browser does not contact the Ray workers directly, so every process that reports data must be able to route to the dashboard URL (docs/…/dashboard.md• L10-17, docs/…/dashboard.md• L50-75).

The dashboard advances a query through pending, planning, setup, execution, finalization, and a terminal state. It keeps the unoptimized plan, optimized plan, physical plan, operator state, task summaries, and runtime statistics together under one query ID (src/…/engine.rs• L57-90, src/…/engine.rs• L135-195, src/…/engine.rs• L258-315).

sequenceDiagram
    participant R as Daft driver or worker
    participant H as Dashboard server
    participant B as Browser
    R->>H: Query and plan events
    R->>H: Operator and task statistics
    H-->>B: Query summary updates
    B->>H: Subscribe to query state
    H-->>B: Live operator and task updates

References: docs/…/dashboard.md• L10-17 docs/…/dashboard.md• L50-75 src/…/engine.rs• L49-90 src/…/engine.rs• L135-195 src/…/engine.rs• L258-315

Dashboard views

The dashboard has an all-queries view and a per-query view. The first groups workloads by status, duration, entrypoint, start time, engine, and optional Ray UI link. The second shows execution progress, physical-plan state, task detail for Flotilla, and both optimized and unoptimized plans (src/…/page.tsx• L41-149, src/…/page.tsx• L246-348, src/…/page.tsx• L229-379).

The query view updates through server-sent events, a one-way browser stream. Task rows can highlight their related plan nodes, while grouped summaries keep large distributed workloads readable. The dashboard retains aggregate information and only selected individual tasks, which keeps the view useful when a query creates many tasks (src/…/page.tsx• L143-182, src/…/state.rs• L98-160).

References: src/…/page.tsx• L41-149 src/…/page.tsx• L246-348 src/…/page.tsx• L143-182 src/…/page.tsx• L229-379 src/…/state.rs• L98-160

Dashboard deployment

Run the dashboard with daft dashboard start, then set DAFT_DASHBOARD_URL for the Daft script. A local run can use the default port. A Ray deployment needs a URL that resolves from the driver and the Ray processes, plus a separate way for a human browser to reach the UI (docs/…/dashboard.md• L19-48, docs/…/dashboard.md• L68-89).

The server keeps query state in memory and has no built-in authentication. Protect it with network controls and an authenticating proxy when it is not local. Use the same Daft version for the server and reporting scripts because the event protocol can change between versions (docs/…/dashboard.md• L91-96).

References: docs/…/dashboard.md• L19-48 docs/…/dashboard.md• L68-96 src/…/dashboard.rs• L27-58 src/…/dashboard.rs• L154-200

Change checklist

When these files or sections are changed, remember to consider these:

  • Changes to subscriber event names or fields must stay aligned across daft/…/events.py, the event-log serializer, dashboard event decoding, and any imported event logs.
  • Changes to query or operator state must preserve the dashboard server state transitions and the browser types and status display that consume them.
  • Changes to distributed task statistics must preserve the ordering between StatisticsManager updates and dashboard snapshots, or active task counts can appear late or become inconsistent.
  • Changes to OTLP signal setup must keep endpoint precedence and protocol support aligned between src/…/config.rs, exporter setup, and the public telemetry guide.
  • Changes to the dashboard event payload must be tested against both driver reports and worker reports because a Ray URL must work from every reporting process.

Important failure modes

TriggerConsequenceGuard
DAFT_DASHBOARD_URL uses localhost in a multi-node Ray runRay actors send reports to their own node instead of the dashboard hostUse a hostname or service address routable from the driver and all Ray processes.
Dashboard server is unreachableQuery execution continues but the live dashboard has missing dataCheck the server address and treat the dashboard as an optional report sink.
Dashboard server or script runs a different Daft versionEvent fields may not decode correctlyRun the dashboard and reporting scripts from the same Daft version.
An OTLP metrics run selects http/jsonMetrics exporter setup fails because that protocol is unsupportedUse gRPC or HTTP protobuf for metrics.
A custom UDF counter runs outside UDF executionThe counter is not recordedCall the counter while Daft is executing the UDF.
A dashboard process restartsIn-memory query history is lostExport event logs or send telemetry to a durable external system when history matters.

Key files

FileWhy to read it
daft/…/abc.pyDefines the public subscriber contract and lifecycle callbacks.
daft/…/events.pyDefines the query, plan, operator, and statistics event vocabulary.
daft/…/event_log.pyShows how events become local or remote JSONL records.
src/…/dashboard.rsConnects runtime events to the dashboard report path.
src/…/mod.rsShows how distributed task events become operator statistics.
src/…/config.rsDefines OpenTelemetry endpoint selection and export timing.
src/…/lib.rsConnects logs, traces, and metrics to console or OTLP backends.
daft/…/profiler.pyDefines process profiling controls and profile lifecycles.
src/…/engine.rsDefines the server-side query state and plan/stat update flow.
src/…/page.tsxShows the main per-query inspection view.
src/…/page.tsxShows the workload list and query-level navigation.
docs/…/dashboard.mdDocuments dashboard startup, network reachability, and operating limits.