Skip to content

feat: Add plugin logs, metrics, and location labels - #305

Merged
mattdjenkinson merged 3 commits into
mainfrom
feat/instance-logs-metrics
Sep 14, 2026
Merged

mattdjenkinson merged 3 commits into
mainfrom
feat/instance-logs-metrics

Conversation

@mattdjenkinson

Copy link
Copy Markdown
Contributor

Summary

Compute portal plugins showed raw Location resource names (loc-dfw-1, DFW) and the staff-portal plugin had no logs or metrics. This wires Prometheus and Loki the same way on both plugins, and resolves stamped location names through the project locations.miloapis.com catalog so tables and cards show place names like "Ashburn, US".

Key behaviors:

  • Consumer instance pages keep full logs/metrics; the workload overview stays on the top KPI strip plus instance preview cards
  • Provider project and fleet views show the same location labels; fleet catalogs are merged in the existing per-project fan-out
  • A missing Locations API (403/404) falls back to the raw name
  • The provider remote shares react/jsx-runtime so staff-portal can load the container

Test plan

  • Cloud-portal: workload list/detail and instance overview show city, country instead of resource names; hover still shows the raw name
  • Cloud-portal: instance Logs and Metrics tabs still load; workload overview has no full CPU/memory/ALB chart cards
  • Staff-portal local: bun run build && bun run preview in ui/provider, register with PORTAL_PLUGINS_JSON including serviceRef.name=compute
  • Staff-portal: Compute › Workloads list and a workload detail Overview/Logs/Metrics render; locations are enriched
  • Staff-portal /admin/service-catalog/compute Workloads tab shows enriched location column
  • Confirm staff-portal is on datum-ui 2.9.1 so shared CardField exists (2.5.0 made DetailList crash)

Notes for reviewers

Staff-portal must share react/jsx-runtime from the host (same pattern as react-dom/client) or the plugin fails at container load. Local staff-portal also needs datum-ui 2.9.1 for CardField; that bump is not in this PR.

Workloads and instances stamped Location resource names; resolve them
through the project Locations catalog so lists and detail pages show
city and country. Mirror logs and metrics onto the staff-portal plugin,
keep the consumer overview on KPI previews, and share react/jsx-runtime
so the remote loads in the host.
@mattdjenkinson
mattdjenkinson requested review from kevwilliams, savme and scotwells and removed request for kevwilliams September 14, 2026 11:30
Keep cloud-portal's react 19.3 / react-router 8 pins so the consumer
plugin still shares the host singletons, and keep recharts for metrics.
@mattdjenkinson
mattdjenkinson merged commit 72b54fe into main Sep 14, 2026
10 checks passed
@mattdjenkinson
mattdjenkinson deleted the feat/instance-logs-metrics branch September 14, 2026 14:19
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.

2 participants