Skip to content

feat(dashboards): chart Google Cloud metrics live with PromQL - #1480

Open
JeremyFunk wants to merge 38 commits into
feat/gcp-live-query-accessfrom
feat/gcp-promql-widget
Open

JeremyFunk wants to merge 38 commits into
feat/gcp-live-query-accessfrom
feat/gcp-promql-widget

Merge branch 'feat/gcp-live-query-access' into feat/gcp-promql-widget

cea3674
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Oct 16, 2026 in 1m 34s

Confidence 2/10 · 5 issues to address

🔴 Confidence 2/10 · do not merge
Five earlier warnings (share guard, empty projects, stat reduction, All splicing, project_id on shares) are unchanged at this head and none has a test.
quality 50/100 · 5 warnings · tests partial · risk high · 3/3 new units observable

Adds a live Google Cloud PromQL source for dashboard widgets across the editor, the share resolver and the v2 API. The five earlier warnings all still stand at this head; the open WarehouseInvalidInputError is a breakdown query this change neither causes nor fixes.

  • PromQlWidgetDataSource (kind: "promql") joins the v3 and v2 data sources
  • toWidgetRequest lowers it to the gcp_promql endpoint under a promql param key
  • Share links run the stored PromQL and guard referenced variables to the free-text charset
  • A queryless tile is promql_query_empty, rendering "No query yet"

Still open from earlier reviews

Production impact

Open errors in the changed files
Issue Service Occurrences File
@maple/web/errors/WarehouseInvalidInputError maple-web 9 apps/web/src/lib/services/atoms/warehouse-query-atoms.ts

After this merges, Maple checks whether they stop.

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
packages/backend/src/services/dashboards/DashboardWidgetDataService.ts 2 DashboardWidgetDataService.resolve 2/day, 0.0% err
Telemetry this change adds and removes (3)
  • ➕ span name Integrations.getGcpPromQlChart · apps/web/src/api/warehouse/gcp-promql.ts:24
  • ➕ span name Integrations.getGcpMetricSearch · apps/web/src/api/warehouse/gcp-promql.ts:44
  • ➕ span name Integrations.getGcpMetricDescriptor · apps/web/src/api/warehouse/gcp-promql.ts:58
What was checked
  • A 4,000-character query, a 60 s step floor and the 11,000-point cap are enforced on the range request (packages/query-engine/src/gcp-promql.ts:24, packages/domain/src/http/gcp-promql.ts:79)
  • Shared documents drop query, projects and legend before render (packages/widgets/src/dashboard/redact.ts:90)
  • The new gcp_promql server function and GcpPromQlService.queryRange both run under named Effect.fn spans
Observability coverage: 3 of 3 changes observable
Change Kind Observable Evidence
PromQL widget read from the browser server function getGcpPromQlChart (apps/web/src/api/warehouse/gcp-promql.ts) client yes Effect.fn("Integrations.getGcpPromQlChart") at line 24, wrapped in runWarehouseQuery
PromQL read on the share/batch path in DashboardWidgetDataService.resolve server yes Effect.fn("DashboardWidgetDataService.resolve") with Effect.annotateCurrentSpan({ orgId, "maple.widget.id": … }) at line 249
Google Cloud Monitoring range query reached through GcpPromQlService.queryRange client yes Effect.fn("GcpPromQlService.queryRange") with annotateCurrentSpan({ orgId }) (service added by the base branch #1477)

cea3674 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.