Skip to content

Add metric sources UI and custom alert targets (metric alerts phase 2) - #340

Open
acoshift wants to merge 1 commit into
mainfrom
feat/custom-metrics
Open

Add metric sources UI and custom alert targets (metric alerts phase 2)#340
acoshift wants to merge 1 commit into
mainfrom
feat/custom-metrics

Conversation

@acoshift

@acoshift acoshift commented Sep 2, 2026

Copy link
Copy Markdown
Member

Phase 2 of metric alerts: scrape-source config, custom charts, and custom alert targets.

What

  • Metric sources (/metrics-sources, preview nav after Alerts): list (name, location/deployment, port, path, status), set form (create+edit; deployment + port + path, no URL), and detail (series table + RangeSwitch + Chart.svelte). Truncated/error banners from truncated / lastError.
  • Deployment metrics Custom tab: shown when a source targets that deployment; series multi-select, time range, chart, same banners.
  • Alert target kind toggle: Deployment (existing location+deployment+cpu/memory/requests/egress) or Custom (kind: custom, source, series, metric value|rate). Custom payloads omit location/deployment. Default remains deployment so existing create tests keep sending { location, deployment } without kind.

Permissions use GuardedButton / can('metricSource.set') (and get/list/delete).

Screenshots

List (ok / truncated / error) Create (no URL)
list create
Source detail banners Deployment Custom tab
detail deployment custom

Alert create — Custom kind

Tests

bun run lint, bun run check, and bun run test (Playwright, 407 passed). Coverage includes:

  1. Source list shows ok / truncated / error
  2. Set form submits metricSource.set with deployment+port+path (no url field)
  3. Custom chart empty / error / truncated banners (source detail + deployment Custom tab)
  4. Alert form Custom: pick source + series, submit alert.create with kind: custom and no deployment

Mock fixtures for metricSource.{set,get,list,delete,series,query} (ok / truncated / scrape-error sources; gauge + counter series).

Project-level /metrics-sources list, set form, and detail chart; a Custom
tab on matching deployment metrics; and an alert target-kind toggle for
custom metric-source series. Preview nav. Mock fixtures and Playwright
coverage for list statuses, set payload, chart banners, and custom alerts.
@deploys-app

deploys-app Bot commented Sep 2, 2026

Copy link
Copy Markdown

Preview console-pr-340

URL: https://console-pr-340-606515731026706458.rcf2.deploys.app

Image: registry.deploys.app/deploys-app/console@sha256:d56d62619fdc70e449b2f75493bac06cf71f6cb578050a4271ad888c5b87af94

Commit: 9ba9ce8

updated 2026-09-02T08:16:49Z

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant