Repository navigation
feat(infra): Infrastructure → Google Cloud page - #1336
JeremyFunk wants to merge 86 commits into
Conversation
…feat/gcp-infra-page
…o feat/gcp-infra-page
…o feat/gcp-infra-page
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: 🟡 Moderate · up to
|
Maple review🟢 Confidence 7/10 · likely safe to merge Adds Infrastructure → Google Cloud: presence and per-service metric queries, an org-scoped inventory read, and the web tables — correct and well pinned by tests, except the metrics response schema, which rejects the quoted 64-bit
Findings🟠 Warning · F1 ·
|
| Issue | Service | Occurrences | File |
|---|---|---|---|
| @maple/web/errors/WarehouseInvalidInputError | maple-web | 12 | 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 |
|---|---|---|
apps/api/src/routes/internal/query-engine.http.ts |
2 | cloudflareInfraZones 2/day, 12.5% err |
packages/domain/src/http/query-engine.ts |
2 | cloudflareInfraZones 2/day, 12.5% err |
Telemetry this change adds and removes (3)
- ➕ span name
QueryEngine.getGcpInfraPresence·apps/web/src/api/warehouse/gcp-infra.ts:20 - ➕ span name
QueryEngine.getGcpInfraMetrics·apps/web/src/api/warehouse/gcp-infra.ts:38 - ➕ span name
GcpConnectorService.resources·packages/backend/src/services/integrations/GcpConnectorService.ts:244
What was checked
- Inventory queries join
gcp_connectorsand filterofOrgon both the count and the page (GcpConnectorService.ts:262,280) - Tab identity keys match
gcpResourceAttributes(cloud.region,cloud.availability_zone, ResourceLabel) ingcp/mapping.ts:95-139 - Column labels and healthy values match the integration docs table (
docs/integrations/gcp.md:171-180)
Observability coverage: 4 of 4 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| POST /internal/query-engine/gcp-infra-presence | server endpoint | yes | Same runQuery handler path as the sibling cloudflareInfraZones operation, which reports to Maple from the last 7 days (12.5% errors, p95 2.1s) |
| POST /internal/query-engine/gcp-infra-metrics | server endpoint | yes | Same runQuery handler path as the sibling cloudflareInfraZones operation, which reports to Maple from the last 7 days |
| GET /internal/integrations/gcp/resources | server endpoint | yes | Sibling integration reads in internal/integrations.http.ts are served by the same route group and are visible as operations |
GcpConnectorService.resources inventory read |
database read | yes | Postgres read through the shared dbExecute/withPgConnectionScope path used by the other integration reads |
006f846 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Maple review🟢 Confidence 8/10 · likely safe to merge Adds
Still open from earlier reviews
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
|
Maple review🟢 Confidence 9/10 · safe to merge Adds one test to
Fixed since the last review
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
|
# Conflicts: # apps/landing/src/content/docs/integrations/gcp.md
Maple review🟢 Confidence 9/10 · safe to merge Adds the
Before merge
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
Observability coverage: 3 of 3 changes observable
|
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Infrastructure → Google Cloud page: one sortable table per curated GCP service over the
Before merge
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
Observability coverage: 3 of 3 changes observable
|
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Infrastructure → Google Cloud page: two query-engine endpoints over the curated
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
Observability coverage: 3 of 3 changes observable
|
Maple review🟢 Confidence 9/10 · safe to merge Adds Infrastructure → Google Cloud: a tab per curated
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
Observability coverage: 4 of 4 changes observable
|
Maple review🟢 Confidence 8/10 · likely safe to merge Adds Infrastructure → Google Cloud: a gated nav entry, /infra/gcp with one table per curated gcp.* service plus the Cloud Asset inventory, two warehouse query builders and a session-scoped inventory read. Safe to merge. The open
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
Observability coverage: 2 of 2 changes observable
|
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Infrastructure -> Google Cloud page, its service-tab queries and the GCP resource inventory read path. The three hunks changed since the last pass are presentation and wiring only; nothing there warrants blocking the merge. The open @maple/web WarehouseInvalidInputError in warehouse-query-atoms.ts (cloudflareInfraZones) is untouched by this change: it adds two GCP atoms beside the existing ones and does not alter that path.
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
Observability coverage: 3 of 3 changes observable
|
Maple review🟢 Confidence 8/10 · likely safe to merge Reworks the Google Cloud log filter into per-runtime application-output ticks wired to the
Still open from earlier reviews
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
What was checked
|
# Conflicts: # apps/web/perf/check-bundle-budget.ts
Maple review🟢 Confidence 8/10 · likely safe to merge Adds the Infrastructure → Google Cloud page (fleet band, per-service tables, workload pages, resource inventory, overview and service-map panels) on the
Before merge
Still open from earlier reviews
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
What was checked
|
Maple review🟢 Confidence 8/10 · likely safe to merge Since the last review only Still open from earlier reviews
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
What was checked
|
…p queries The list becomes one view per resource kind (Services, Pub/Sub, Cloud SQL, GKE, VMs, load balancing, resources) behind a pivot, each with a fleet band whose cells scope the table, problems-first rows, sparklines (new gcpInfraSparklines query) and a projects strip when 2+ projects report. ?tab links keep working through ?view. Workload pages get the Worker page shell: header chips, signal strips on one time axis, a rail, and "All charts" below. Cloud Run and functions show a callout when Google counted far more server errors than traces did. Cloud SQL instances join their synced settings (connections against max_connections, replicas folded into the primary, Query Insights state), list the polled top statements next to what traces saw, and call out a statement the app waits on far longer than the database runs it. Labs: /lab/gcp-infra and /lab/gcp-workload render both pages from fixtures.
Maple review🟡 Confidence 6/10 · needs attention Infrastructure → Google Cloud: fleet band, per-service tables, workload pages, inventory and service-map panel, plus new internal query-engine endpoints. One defect: a Cloud SQL trace read loses every database when one fails. The open
Findings🟠 Warning · F10 ·
|
| 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/domain/src/http/integrations.ts |
189 | GET /v2/integrations/gcp 189/day, 0.0% err |
apps/web/src/api/warehouse/gcp-infra.ts |
59 | QueryEngine.getGcpInfraMetrics 14/day, 0.0% errgcpInfraMetrics 14/day, 0.0% errQueryEngine.getGcpInfraPresence 7/day, 0.0% err |
apps/api/src/routes/internal/query-engine.http.ts |
35 | gcpInfraMetrics 14/day, 0.0% errcloudflareInfraZones 9/day, 0.0% errgcpInfraPresence 7/day, 0.0% err |
packages/domain/src/http/query-engine.ts |
35 | gcpInfraMetrics 14/day, 0.0% errcloudflareInfraZones 9/day, 0.0% errgcpInfraPresence 7/day, 0.0% err |
apps/api/src/routes/queries.ts |
26 | gcpInfraMetrics 14/day, 0.0% errgcpInfraPresence 7/day, 0.0% errgcpInfraTimeseries 5/day, 0.0% err |
packages/backend/src/services/integrations/GcpConnectorService.ts |
10 | GcpConnectorService.resources 7/day, 0.0% errGcpConnectorService.scripts 3/day, 0.0% err |
Telemetry this change adds and removes (3)
- ➕ span name
QueryEngine.getGcpInfraSparklines·apps/web/src/api/warehouse/gcp-infra.ts:127 - ➕ span name
QueryEngine.getGcpCloudSqlTopQueries·apps/web/src/api/warehouse/gcp-infra.ts:154 - ➕ span name
QueryEngine.getGcpCloudSqlTraceSide·apps/web/src/api/warehouse/gcp-infra.ts:179
What was checked
- BYO-ClickHouse quoting of
samples: the SQL-derived row schema unquotes it (gcp-infra.test.tspins"60"→ 60), so the domainSchema.Numbernever sees a string - Empty
project/regionparams are dropped as filters (list-model.ts:604-607); a project the page does not know is no scope - Fleet and sparkline reads isolate a per-service failure with
Effect.orElseSucceed(gcp-infra.ts:93-101,134-148)
Observability coverage: 2 of 2 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| gcp-infra-metrics/timeseries/sparklines/presence/cloudsql endpoints (apps/api/src/routes/internal/query-engine.http.ts) | server | yes | new handlers follow the file's existing runQuery pattern; maple-web QueryEngine.gcpInfraMetrics spans already appear in traffic |
| gcp.* ClickHouse reads (packages/query-engine-integrations/src/gcp/gcp-infra.ts) | client | yes | run through the same Queries.*/runQuery path as every sibling integration query, none of which adds a span of its own |
Files not reviewed (7)
The review ended before it read these diffs, so nothing above vouches for them.
apps/web/src/components/infra/gcp/cloud-sql-signals.test.tsapps/web/src/components/infra/gcp/inventory.test.tsapps/web/src/components/infra/gcp/list-model.test.tsapps/web/src/components/infra/gcp/tabs.test.tsapps/web/src/components/infra/gcp/workload-signals.test.tsapps/web/src/routes/lab/gcp-infra.tsxapps/web/src/routes/lab/gcp-workload.tsx
08a505c · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Maple review🟢 Confidence 8/10 · likely safe to merge Since the last review the only change is the startup budget in
Still open from earlier reviews
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
|
The /infra/gcp list had no right rail, unlike the workload page and the Cloudflare pages. It now lists what each connection covers, linked to the project's dashboard or the folder or organization in the resource manager, and the picked project's Dashboard, Metrics Explorer, Logs Explorer and Asset Inventory in the Google Cloud console.
Maple review🟢 Confidence 7/10 · likely safe to merge Adds a right rail to
Findings🔵 Note · F11 · Empty
|
| 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/domain/src/http/integrations.ts |
189 | GET /v2/integrations/gcp 189/day, 0.0% err |
apps/web/src/api/warehouse/gcp-infra.ts |
59 | QueryEngine.getGcpInfraMetrics 14/day, 0.0% errgcpInfraMetrics 14/day, 0.0% errQueryEngine.getGcpInfraPresence 7/day, 0.0% err |
apps/api/src/routes/internal/query-engine.http.ts |
35 | gcpInfraMetrics 14/day, 0.0% errcloudflareInfraZones 9/day, 0.0% errgcpInfraPresence 7/day, 0.0% err |
packages/domain/src/http/query-engine.ts |
35 | gcpInfraMetrics 14/day, 0.0% errcloudflareInfraZones 9/day, 0.0% errgcpInfraPresence 7/day, 0.0% err |
apps/api/src/routes/queries.ts |
26 | gcpInfraMetrics 14/day, 0.0% errgcpInfraPresence 7/day, 0.0% errgcpInfraTimeseries 5/day, 0.0% err |
packages/backend/src/services/integrations/GcpConnectorService.ts |
10 | GcpConnectorService.resources 7/day, 0.0% errGcpConnectorService.scripts 3/day, 0.0% err |
Telemetry this change adds and removes (3)
- ➕ span name
QueryEngine.getGcpInfraSparklines·apps/web/src/api/warehouse/gcp-infra.ts:127 - ➕ span name
QueryEngine.getGcpCloudSqlTopQueries·apps/web/src/api/warehouse/gcp-infra.ts:154 - ➕ span name
QueryEngine.getGcpCloudSqlTraceSide·apps/web/src/api/warehouse/gcp-infra.ts:179
What was checked
- Console links encode their ids (
inventory.ts:126), so a project or folder id cannot break the URL gcpResourceQuery/gcpMatchResourcekey layouts matchGCP_INFRA_SERVICES.identity(packages/domain/src/gcp-infra.ts:31)
aac774b · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
# Conflicts: # apps/web/perf/check-bundle-budget.ts
Maple review🔴 Confidence 4/10 · risky as written Adds Infrastructure → Google Cloud: fleet band, per-service tables, workload pages, resource inventory and service-map panels over new
Before merge
Still open from earlier reviews
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
Observability coverage: 0 of 2 changes observable
Files not reviewed (47)The review ended before it read these diffs, so nothing above vouches for them.
|
…n workload pages The list page's rail repeated the integration card. On a workload page the rail's Logs and console links repeated the hero's buttons; what is left (service map, traced service) reads as icon rows instead of orange mono text.
Maple review🟢 Confidence 7/10 · likely safe to merge The last commit deletes the Google Cloud list rail and turns the workload rail's remaining links into plain icon rows; the hero keeps the Logs, Traces and console buttons, so nothing is stranded. The delta is safe to merge; F10 and F9 remain unfixed at this head.
Still open from earlier reviews
Fixed since the last review
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (3)
What was checked
|
# Conflicts: # apps/web/src/components/integrations/gcp-integration-card.tsx # apps/web/src/lab/registry.ts
Maple review🟢 Confidence 7/10 · likely safe to merge Adds the Infrastructure → Google Cloud page, the GCP integration card's usage band and links into it, and the /lab entries for the new GCP surfaces. The new hunks are safe; F9 and F10 from earlier rounds are still present at this head and block a clean merge.
Still open from earlier reviews
Production impactOpen errors in the changed files
After this merges, Maple checks whether they stop. Production traffic of the changed files (last 7 days)
Telemetry this change adds and removes (2)
What was checked
Observability coverage: 2 of 2 changes observable
|
Top of the Google Cloud integration stack. Merge order: bottom up.
Adds Infrastructure → Google Cloud (
/infra/gcp) at the feature level of the Railway and Cloudflare infrastructure pages: a health band and one table per curated service built from thegcp.*metrics, a page per workload with its charts, the resource inventory fromgcp_resources, and the workloads on the Infrastructure overview and the service map.Parity matrix
What each infrastructure integration has. "Before" is this PR as first opened (tables only).
scopein the URL)scopein the URL)/infra/kubernetes/services)k8s.deployment.namefrom the collector, which Cloud Monitoring series do not carryGoogle Cloud now has everything Railway and Cloudflare both have, and the cheap extras: the scope cells, the rail panel, the links out, and the service map panel.
The index page
FleetBandRailway and the hosts page use: every service's workloads in the selected project and region, split healthy, elevated and critical, with three cells that narrow the tables. Saturated: apercentcolumn (every one is a share of a limit or of capacity) at 90% or more. Elevated: 60% or more. Erroring: an error rate of 1% or more over at least 100 events, the thresholdserrorRateLevelandutilizationLevelalready set for the rest of the app.UnderlineTabStrip;UnderlineTabCountfor the count a band cell adds), so height, gap, underline and divider are theirs. The strip sits in the page below the band, not in the header slot those pages use: the band counts every tab, so under header tabs it reads as the selected tab's, and the tab list is only known once the fleet has loaded. On a phone it scrolls sideways. All tabs are read at once (one presence probe, then one query per reporting service), which is what lets the band count every service and a tab switch read nothing.q), a project and a region filter and the band's scope are in the URL and carry across tabs. The filters show once there is more than one project or region; the region filter is left off the Pub/Sub and Load Balancing tabs, whose resources are global. A VM's zone counts as its region. With a band cell active each tab shows how many of its workloads it holds. A Cloud SQL instance is named without the project Cloud Monitoring puts before it.Workload pages
/infra/gcp/$service/$name, with the rest of the workload's identity as readable search params (?project=…®ion=…). Built fromPageHero,StatRail,ChartCardandInfraMetricChart, as the Railway page: every chart is a line chart, with the legend in the card header.countchart unit). A rate divides by the part of the first and last bucket the range covers.InfraMetricCharttakes this as an opt-ingapsprop; its other callers are unchanged.total in range,average in rangeorshare in range.E2 machine types only.,Read replicas only.,Push subscriptions only.).VM instances in Google Cloud). A GKE container shows its cluster. Zero or several candidates show no panel.service.name; a managed service opensgcp/<resource type>narrowed by the identifying resource attribute: a URL map opensgcp/http_load_balancer, the type Cloud Logging writes, and a subscription is matched by its full path, which is how Cloud Logging labels it), Traces when the service overview lists a service of that name in the range, and beside each chart title its metric in the metrics explorer, filtered to the workload (service.name, or the resource attribute for a managed service) and grouped by percentile or label as the chart is.Elsewhere in the product
Pub/Sub metrics could not be read, opening that tab) and leads the row's headline; when no service could be read, the row shows the failed-read state every other source has.Numbers on the integration page
The connected integration page opens with a row of numbers, like the Cloudflare page's (
gcp-usage-cards.tsx, rules ingcp-usage.tswith tests). No new endpoint, query or table: every number comes from a read another page already makes.customChartTimeSeries,source: logs, hourly, grouped by severity) with the resource attribute filtermaple_ingest_source = gcp-logpush, the stamp ingest puts on every forwarded entrylogstable for the org and the last 24 hours. No rollup carries the ingest source, so the filter is the same index-assisted attribute predicate the Logs page runs for that filter. One read per page view, 30 s stale timegetGcpInfraFleetover 24 hours: the presence probe onmetric_catalog, then one query per reporting serviceGET /internal/integrations/gcp/resourceswithout filtersWorkloads by Google Cloud servicelinks each reporting service to its tab here. Each connection's metrics line links to this page; its log line opens Logs filtered to the entries stamped with that connection's id.Configure(copy only).Queries
Three builders in
packages/query-engine-integrations/src/gcp/gcp-infra.ts, all throughWarehouseQueryService.compiledQuery()and pinned in the SQL baseline.gcpInfraMetricsSQL(service)(unchanged SQL): one query per tab. Scansmetrics_sumandmetrics_gauge, each filtered byOrgId,MetricName IN (that table's curated names of the service's group)andTimeUnixin the range, grouped by identity, metric and label. Capped at 10,000 rows.gcpInfraTimeseriesSQL(source, keys)(new): one query per workload page, serving every chart and the headline tiles. The same two scans with the sameOrgId, metric-name and time bounds, plus one equality per identity attribute of the workload (ResourceAttributes[...] = '<value>', 2 to 5 of them), grouped bytoStartOfInterval(TimeUnix, bucket), metric and label. At most about 100 buckets (5-minute floor) times the group's metric and label values, capped at 10,000 rows. The GKE page issues it a second time for thegkeNodessource (2 metrics, the cluster's identity).gcpInfraPresenceSQL()(unchanged): the hourlymetric_catalogrollup.The index page, the overview row and the service map panel read the same
getGcpInfraFleet: the presence probe, thengcpInfraMetricsonce per reporting service (at most 7), concurrently. Before, the page read the probe and the open tab only.Endpoints:
POST /internal/query-engine/gcp-infra-timeseries(session-only;sourceis a closed literal,bucketSecondsisBucketSeconds,keysis at most 8 strings of at most 512 characters, the times areTinybirdDateTime).GET /internal/integrations/gcp/resourcestakesname, the last segment of the resource name, compared in SQL on the rows the org, type and project filters already narrowed; no index was needed.No datasource, materialized view, poller, receiver or connector API change. No metric type was added.
Metrics parity would still need
Not added: every type costs the customer Cloud Monitoring reads, and the list belongs to #1333.
kubernetes.io/container/cpu/limit_cores,memory/limit_bytes,cpu/request_utilization,memory/request_utilizationkubernetes.io/containerseries per pod (pod_namekept)agent.googleapis.com/memory/percent_used,disk/percent_used(Ops Agent)cloudsql.googleapis.com/database/up,database/memory/quota,disk/quotarun.googleapis.com/request_countbyrevision_namepubsub.googleapis.com/subscription/ack_latencies, the subscription'stopic_idloadbalancing.googleapis.com/https/frontend_tcp_rtt, internal and regional rule typesNot built
Empty and waiting states
Google Cloud metrics are offwithOpen the integration. No Resources tab: the inventory of a connection that stopped collecting is not listedFinish setting up Google CloudwithOpen the integration; the page polls status every 10 s and moves on without a reloadCollecting your first Google Cloud metricswith a spinner and the 10-minute expectation, no status code and no button; the Resources tab polls while the inventory is emptyMaple can't read Google Cloud metricswith the message andCheck the connectionSome Google Cloud metrics are missingwith the messageGoogle Cloud metrics have stalledlast_resources_error)?tab=names no tabThese call
gcpMetricsStatefrom the integration card, so the page and the card cannot disagree. A Google Cloud console address in a failure message is a named link.New on a workload page: chart skeletons while loading, the shared error state when the query fails,
No metrics arrived for this <noun> in the selected window.when the workload did not report (the inventory panel still shows), and a per-chart message when one metric is absent. An unknown$serviceopens the list. A tab whose query failed says so in its table instead of reading as empty.Inventory read path
GcpConnectorService.resources(orgId, { assetType?, projectId?, name? }), served byGET /internal/integrations/gcp/resources(session-only, filters are bounded strings).gcp_connectors.org_idjoined on the primary key prefix(connector_id, …), so no new index is needed.Decisions
docs/api-v2.mdsays so.routeTree.gen.tsis staged with the generator's lines for the two routes and nothing else: the route cannot typecheck without them.packages/query-engine-integrations/**, so it was skipped on this PR's first run. The filter now includes that path; the sweep ran and passed against ClickHouse 26.2.percentcolumn is a share of a limit or of capacity and everyerrorRatecolumn carries its event count, so the band, the table colors, the overview findings and the workload tiles share one rule and no service has thresholds of its own.charts.ts); the page, the query and the endpoint are shared. A test checks every chart reads only metrics its page's query returns./infra/gcp/<service>/<name>?project=…®ion=…, by lower-cased identity label, with a round-trip test over every service.Known limits
run/services,kubernetes/list,compute/instances,sql,cloudpubsub/subscription,net-services/loadbalancing/list) and not the per-resource addresses, and a link that might 404 was not worth it.572 MB); a latency axis starts at0μs.Visual smoke checklist
On an org with a Google Cloud connection that collects metrics, with a 7-day range:
/infra/gcp: the band counts the workloads of every tab; each cell narrows the open tab, puts a count on every tab and stays when the tab changes; a second click clears it.E2 machine types only.in the memory card; a Cloud SQL primary saysRead replicas only.in the lag card; a pull subscription saysPush subscriptions only.twice.Nodes of <cluster>and two charts./infra: the Google Cloud row has a health strip, and a finding per flagged workload that opens its page./service-map: the panel of a traced service named like a Cloud Run service has a Google Cloud section.After the merge with
mainmainmoved Postgres to effect-orm (#1353) and landed two passes over the shared UI primitives (#1355, #1358). This branch merged them through the layers below.count(DISTINCT name)by asset type and project overgcp_resources JOIN gcp_connectorsfor the organization's metrics-enabled connections, andSELECT DISTINCT ON (asset_type, name) ... ORDER BY asset_type, name, last_seen_at DESC LIMIT 500. The name filter is stillsplit_part(name, '/', -1) = $n, as aPG.sqltemplate.utcSecondsParam), asmainnow does for every bound insidetoDateTime()(fix: warehouse DateTime bounds, run_sql caller errors, Cloudflare 402 and chat rate-limit noise #1354): a bound with milliseconds does not parse there.main's own growth was merged in, 690.6 KB without it.mainmade the toolbar search default-size with default-size selects beside it; the project, region and type filters follow.UnderlineTabStrip(see The index page). A search, filter or scope that leaves nothing showsFilteredEmpty, as on the Railway and Hosts lists. Every error state has a title and a retry.main's: icons inside buttons are 14px (16px before, 18px on a phone), and the list search is 32px high (28px before).The preview's database
The preview's database was built by this stack's earlier drizzle-kit migrations, which are gone from the folder. The deploy applied the four folders it had not recorded without a reset: every statement of the two new migrations is
IF NOT EXISTS, except the foreign key ofgcp_resources, which was added under its new name next to the old one. On the preview that table therefore carries the same foreign key twice; a fresh database has it once. To remove the leftover there:Review notes
Code reviews
Two read-only reviews of the parity work ran before the push (queries, endpoints and inventory; web), on top of the two from the first version of this PR.
Applied:
ServiceName, the tables' second sort key column, so it reads the workload's rows instead of the org's (the name is the workload's own for compute andgcp/<resource type>otherwise, from one helper the web shares).orgIdand the time bounds.gcp/https_lb_rule), its Logs button its logs (gcp/http_load_balancer); the two names were one.URL mapkeeps its capitals in the no-metrics message; the docs say which charts draw percentiles and that region and scope apply to the service tabs.type=orproject=in the address broke the Resources read): an empty param is no filter.split_part(name, '/', -1),ChartCardMessageinstead of a local empty state, six exports dropped.Not applied:
gcpStatusQuery(): it would pull the integration catalog module into the service map; the sidebar hook builds the same atom inline for the same reason.GCP_INFRA_SOURCES.gkeNodes.titleis unread: the record's type asks for it.Rendered rounds
Two rounds of a reviewer who saw only screenshots (every tab and every workload page at 1440 and 390, the overview, the service map panel, and where each link landed), compared against the Railway and Cloudflare pages.
Round 1, applied:
391 KB/sread91 KB/s) and a small container's CPU axis read0, 0, 0: fixed inInfraMetricChartandformatValueWithUnit, for every page that uses them.orders-db-replica at 93% disk.Round 2, applied:
Response sizecolumn isBytes sent; the GKE chart is titledCPU cores; disk and instance series were renamed so their colors differ.Not applied, from both rounds:
ok / elevated / saturatedbeside the page'sSaturated / Elevated / Erroring: the overview has one vocabulary for every source, and its critical bucket holds Cloudflare's erroring zones too.0μs, the 80% label over a line at 81%, rail values breaking mid-word.From the first version of this PR
Two read-only reviews ran before the PR was opened (queries, endpoints and inventory; web). Applied: the stale inventory of stopped connections is excluded, the freshest copy of a duplicated resource wins, the where-conditions keep their param types, the quiet state keeps polling on preset ranges, the inventory re-reads while empty and on connector changes, the tab strip no longer clips its underline, the overview knows the source, and guards for impossible states were removed.
Not applied:
samples: Schema.Numberwould reject a quoted 64-bit count from a BYO ClickHouse): the response schema never sees the warehouse's wire value. The executor decodes every row through the query's derived row schema first, andcount()derives theUInt64codec, which unquotes it.gcp-infra.test.tsnow pins that (samples: "60"decodes to60).reportedfield breaks decoding of stored removed connections): not changed. The stored list was only ever written by pre-release builds of this stack, so no customer browser holds the earlier form. A stored value that does not decode is not an error either:Atom.kvsin sync mode skips a failed read and the atom keeps its default, the empty list.project=orregion=in the address emptied every service tab): fixed. The page reads the filter params once, with empty meaning unset, and the service tabs, the tab links and the Resources tab use that.summarizeGcpcounted a service whose read failed as no workloads, so the overview read ok): fixed. Such a service is a finding and is named on the Sources row; with no service readable the source shows its failed-read state.metrics_available: falseon the page: the nav row never appears there, and the integration card already explains it.Verification
gcp-infra.test.ts, 10): the workload read is bounded byOrgId, the service's metric names, the time range,ServiceNameand every identity attribute; a missing key compares as empty; quotes in a key are escaped; the node source readsgcp/k8s_node. The SQL baseline gains one fixture per source (8) and changes no existing query.GcpConnectorService.test.ts: the name filter matches the last segment only.tabs.test.ts(36: health levels, the event floor, scopes, the identity round trip through the address, display names),charts.test.ts(16: every chart reads only metrics its page's query returns, rates, classes per second, silent buckets, edge buckets, the explorer's metric and grouping, the fold into the table row's numbers),inventory.test.ts(15: exact match, no match between two candidates, the resource-to-workload round trip, console pages, log, trace and explorer filters),summaries.test.ts(overview segments and findings),chart-utils.test.ts(thecountunit, sub-millicore values).End-to-end run
Final regression on 2026-10-10 against a real Google Cloud project at project scope, from the stack top.
Summary by CodeRabbit