Skip to content

refactor(monitoring): rebuild the Monitoring tab as a built-in dashboard #48

Description

@xe-nvdk

Context

src/lib/components/Monitoring.svelte is 398 lines of bespoke chart wiring: seven hand-built [number[], number[]] tuples, its own refresh timer that keeps polling while the tab is hidden, and no time range control beyond a duration dropdown. Once dashboards exist, it should be a dashboard.

This is the payoff issue — it proves the dashboard system is good enough to replace hand-written monitoring, and it deletes more code than it adds.

Depends on the dashboard view page and all panel types. Part of #19.

Scope

  • A built-in dashboard definition shipped as JSON: memory, goroutines, HTTP requests and latency, query throughput and errors, storage reads and writes, GC, buffer, and compaction
  • Built-ins are read-only but can be copied into an editable user dashboard ("Save as")
  • The console's Monitoring tab renders this built-in dashboard instead of the bespoke component
  • Delete Monitoring.svelte and MetricChart.svelte once nothing references them
  • Where Arc exposes metrics only through /api/v1/metrics rather than as queryable tables, keep a small adapter so those panels still work

Where to look

  • src/lib/components/Monitoring.svelte — transformChartData() enumerates exactly which metrics matter
  • getTimeSeriesMetrics, getMetrics, getEndpointMetrics in src/lib/arcClient.ts
  • MetricsSnapshot and EndpointMetrics in src/lib/arcClient.ts list every available field

Notes

Nothing should regress: every metric visible in the current Monitoring tab must still be visible, and it should gain time range, timezone, and zoom for free.

Acceptance criteria

  • The built-in dashboard covers every metric the current tab shows
  • Built-ins cannot be edited in place but can be copied
  • Monitoring.svelte and MetricChart.svelte are deleted, not left orphaned
  • The monitoring view gains drag-zoom and shared crosshair

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dashboardsDashboarding and visualizationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions