ClouisleClouisle

System Observability & Health Monitoring

Look up admin observability metrics, health thresholds, aggregation limits, and diagnostic endpoints

Clouisle exposes an operational observability API for platform administrators, mounted at /api/v1/admin/observability. Read endpoints require the admin:dashboard:access permission; acknowledging and silencing alerts and updating rules require admin:observability:manage.

Time Window Parameters

The summary, runs, and dependencies endpoints share one time-window model:

ParameterTypeDefaultNotes
period15m | 1h | 24h | 7d | custom1hPreset window; custom requires start/end times
team_idstring—Filter by team
start_timedatetime—Custom window start
end_timedatetime—Custom window end

Invalid window parameters return 422.

Console Views

The admin Observability page (/dashboard/observability) has six views that share the top time range:

ViewContent
OverviewAgent and workflow throughput, success rates, latency, tokens, and recent trends
RunsFilterable run list; open a run for its detail
DependenciesModel, tool, and retrieval aggregates
QueuesWorker and queue snapshots
InfrastructureAPI instances, dependency health, and PostgreSQL slow queries
AlertsAlert events and rules

The time-range button opens a two-month calendar: after you pick dates and apply, both ends include their whole local day in the browser time zone (including daylight-saving transitions); cancelling or dismissing keeps the applied interval. The popover's quick ranges apply the last 15 minutes, 1 hour, or 24 hours. Custom intervals travel as period=custom plus ISO 8601 start_time / end_time, normalized to UTC by the backend; missing, naive, equal, or reversed bounds, or explicit bounds combined with a preset, return 422. The URL preserves the interval across reloads, view changes, and run pagination. Telemetry retention is 30 days, and choosing an older interval does not restore expired samples.

Run Summary

Endpoint: GET /api/v1/admin/observability/summary

Returns compact run rollups and trends (submission counts, success rates, percentiles, tokens, trend buckets, open issues). Percentiles and success rates are null when samples are insufficient — never treat them as zero.

Run List and Detail

List endpoint: GET /api/v1/admin/observability/runs

The list returns summary-only fields; fetch detail separately. It uses keyset pagination: pass the response's next_cursor as the next request's cursor.

ParameterTypeDefaultNotes
period / team_id / start_time / end_time—period defaults to 1hSame window as above
sourceall | agent | workflowallRun origin
statusstring—Filter by status
error_categorystring—Filter by error category
run_idstring—Exact lookup by run ID
cursorstring—Pagination cursor
limit1–5025Page size

Detail endpoint: GET /api/v1/admin/observability/runs/{source}/{run_id}

  • {source} accepts only agent or workflow (not all); run_id is a UUID.
  • Unknown runs return 404. Permission is checked before any trace content loads.

On-demand payload endpoints (read permission; 404 when not captured or absent):

  • GET /api/v1/admin/observability/runs/{source}/{run_id}/tools/{tool_call_id}: load one recorded tool input/result pair; only agent runs record tool payloads, and other sources return 404.
  • GET /api/v1/admin/observability/runs/{source}/{run_id}/trajectory/{entry_id}: load one model, tool, or workflow-node snapshot.

Dependency Aggregates

Endpoint: GET /api/v1/admin/observability/dependencies

Accepts the same time-window parameters as summary. Returns models, tools, and retrieval groups, each with requests, completed, failed, success rate, p50/p95 latency, tokens, and sample count (the model group also reports first-token p95).

AgentRun tool and retrieval spans are captured and included in these aggregates. Each run retains at most 128 dependency spans; run detail marks a trace exceeding the cap as incomplete, so aggregates only reflect the retained samples, and historical runs are not backfilled.

Queue and Infrastructure Snapshots

  • GET /api/v1/admin/observability/queues: bounded current snapshot of queues and workers; no query parameters.
  • GET /api/v1/admin/observability/infrastructure: bounded infrastructure snapshot, dependency health, and safe pg_stat_statements slow-query display; no query parameters. Missing probes report as unknown; unavailable statistics are never shown as zero.

Operational details

Queue snapshots are collected on demand (no dedicated background task) with a 5-second per-API-process cache: Celery inspection uses separate inspectors to collect active, reserved, and scheduled tasks plus active queues concurrently, with a 0.5-second reply collection timeout per inspection and a 2.2-second overall inspection deadline; Redis queue lengths are read concurrently afterward.

Infrastructure snapshots carry the same 5-second per-API-process cache (the page refreshes every 30 seconds): primary health sampling, registry reads, and slow-query statistics each have a 2-second deadline; Celery keeps its 1.5-second deadline with 0.5 seconds for reply collection, and Celery latency includes reply collection. Failures in instance discovery or slow-query statistics do not suppress dependency health: discovery failure returns no instances with partial metadata rather than a fabricated local-only list.

Each API identity reports its latest resource sample to shared Redis every 10 seconds, with a renewable, owner-checked lease electing a single reporter across that identity's Gunicorn processes. Redis server time decides freshness: samples up to 30 seconds old keep their measured health state, samples over 30 seconds are stale, and samples over 60 seconds are offline; old values and timestamps stay visible but marked as retained rather than current, and records disappear after 5 minutes without a successful publication.

Span caps: each Agent run retains at most 128 dependency spans, and the run detail marks traces that exceed the cap as incomplete; workflow detail is bounded to 100 node spans and likewise reports incompleteness; historical runs are not backfilled.

Run summaries are best-effort telemetry and AgentRun records are authoritative: an API maintenance task reconciles every minute in batches of at most 100; runs become eligible 60 seconds after their recorded finish time and only within the 30-day telemetry retention window; reconciliation restores status, timing, model, and Token fields from the run and its final message while keeping captured dependency spans, never touches active runs or replays model/tool calls, needs multiple cycles for a large backlog, and never recreates missing or expired historical summary rows.

Alerts

List endpoint: GET /api/v1/admin/observability/alerts

ParameterTypeDefaultNotes
statusactive | resolved | allactiveAlert status
cursorstring—Pagination cursor
limit1–5025Page size

Alert event fields: id, rule_id, kind, severity (critical, warning, info), title, detail, affected_count, status (active, resolved), opened_at, resolved_at, acknowledged_at, silenced_until.

Alert actions (all require admin:observability:manage; resolved or unknown alerts return 404):

  • POST /api/v1/admin/observability/alerts/{alert_id}/acknowledge: acknowledge an alert.
  • POST /api/v1/admin/observability/alerts/{alert_id}/silence?duration_seconds=...: silence an alert; duration_seconds is required, range 60–604800 (1 minute to 7 days).

Rule endpoints:

  • GET /api/v1/admin/observability/alerts/rules: list alert rules (read permission suffices).
  • PUT /api/v1/admin/observability/alerts/rules/{rule_id}: update a rule (requires admin:observability:manage). All body fields are optional: threshold (0–1), enabled, evaluation_window_seconds (60–604800), recovery_window_seconds (60–604800). Unknown rules return 404.

Alert rules are evaluated on alert reads, so evaluation depends on the API being reachable; the scheduled retention task uses the existing default Celery queue.

Recording Boundaries

  • Run summaries live in compact indexed records kept for 30 days; historical runs without submission timestamps are not backfilled.
  • Run summaries only write allowlisted fields: timing, status, model name, token counts, resource/team identifiers, and error codes. Diagnostic payloads — tool inputs/results and model or node trajectories — are stored on demand with size bounds (one tool payload is capped at 256 KiB; larger ones are marked as not recorded) and may contain user messages, retrieved documents, and tool output. Holding admin:dashboard:access therefore grants privileged access to potentially sensitive runtime content, not just aggregate metrics.
  • New agent records include model aggregates and a safe root run span; tool and retrieval child spans are captured, each run retains at most 128 dependency spans, a trace beyond the cap is marked incomplete, and historical runs are not backfilled.

How is this guide?

On this page