Skip to content

perf(metrics): collect production serving bulk metrics every 120s - #25777

Merged
Git-on-my-level merged 1 commit into
mainfrom
lane/margin40-lane-a
Nov 19, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
lane/margin40-lane-a

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

Failure-Class: none

Change

Production billed Prometheus samples fell from 2.277B ($122.93, Nov 16 UTC) to 1.324B ($71.48, Nov 18 UTC transition day) as #25563 rolled out. The corresponding totals across production and development were $124.96 and $75.08. Leave the existing production PodMonitoring split in place and move the two existing GMP bulk jobs from 60s to 120s. Local Prometheus and primary GMP jobs remain at 15s. Backend Cloud Run sidecars stay at their observed 60s cadence. This change does not touch other collectors. The separate desktop-backend sidecar showed an effective 30s cadence. Both Firestore attribution labels and every metric family, label, job identity and histogram bucket are retained. The prod Helm value podMonitoring.bulkInterval defaults to 120s and 60s is the kill switch.

DESIGN: Not required. Only collector cadence changes. Source and live query audit found no affected alert or dashboard input.

Readback and estimate

Pusher split by the start of Nov 18 UTC and listen joined by 08:00 UTC. The 24h window ending Nov 19 at 10:26 UTC is wholly after the split and has 1.172B collected samples across GKE and Cloud Run. The Nov 19 10:18 UTC GKE census identified 44 high-volume scalar families exclusive to the two bulk jobs (215,987 live series). They accounted for 330.65M attributed samples in that 24h window. Halving their cadence projects 165.33M fewer samples/day and $8.93/day at the observed $0.054/M. The model projects 1.007B samples/day and $54.36/day overall, $68.57 below Nov 16 in production. Attribution is a billing proxy and the estimate depends on target counts, workload and the rate. The current scalar series count alone projects $8.40/day of additional savings. Use complete settled UTC billing days to verify the $60/day target.

Use sum by (metric_type)(increase(monitoring_googleapis_com:collection_attribution_write_sample_count{attribution_dimension="cluster",attribution_id="prod-omi-gke",metric_type=~"prometheus.googleapis.com/(omi_(fallback_total|stt_cost_routing_(ignored_deaths|settlements)_total|firestore_billed_reads(_by_caller|_by_origin)?_total)/counter|omi_episode_compose_seconds/histogram)"}[24h])), evaluated at the following UTC midnight. Repeat with attribution_id="__run__" as the Cloud Run comparison. The billing export has the total SKU rather than the per-family breakout. Use project.id='based-hardware' to match the PromQL scope. Use the billing SQL and rollout/rollback steps in the runbook.

Verification

Audit used ro-prod for GCP and a read-only Grafana credential. Checked source alerts and dashboards, 37 live Cloud Monitoring policies, one Cloud Monitoring dashboard, 269 Grafana rules and 50 Grafana dashboards. Local fallback/STT alerts and resilience dashboards use the in-cluster datasource. The GMP Firestore paging rules use caller/overflow/completed-audio inputs on the existing 15s jobs. No live managed Rules, ClusterRules or GlobalRules were present. Ad-hoc bulk queries should use a window of at least 8m for rate/increase. Release can patch just the two existing bulk PodMonitoring intervals and restore the prior 60s values on rollback. This needs no pod roll.

View guided diff Turn on auto-fix

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T10:49:29.565044Z 99aee0c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Git-on-my-level
Git-on-my-level merged commit 2839c39 into main Nov 19, 2026
67 checks passed
@Git-on-my-level
Git-on-my-level deleted the lane/margin40-lane-a branch November 19, 2026 11:00
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