Repository navigation
perf(monitoring): cut sync GMP sidecar allocation and ingestion - #22089
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1ac936557c
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| apiVersion: monitoring.googleapis.com/v1beta | ||
| kind: RunMonitoring | ||
| metadata: | ||
| name: omi-cloud-run-sync-metrics |
There was a problem hiding this comment.
Preserve the native GMP job label
When these three services adopt this config, changing the RunMonitoring name also changes their native GMP job label to omi-cloud-run-sync-metrics, but the checked-in direct GMP queries still select job="omi-cloud-run-application-metrics"—including sync-only mappings such as omi_sync_dispatch_attempts_total and omi_sync_intake_total in backend/charts/monitoring/gmp-shadow-mappings.json. After deployment, monitoring_gmp_shadow.py will therefore report those comparisons as unproven, while shared-family comparisons can use only non-sync producers and produce misleading results. Keep the existing monitoring name or update every direct GMP consumer to include the new job label.
Useful? React with 👍 / 👎.
* Revert "perf(monitoring): cut sync GMP sidecar allocation and ingestion (#22089)" This reverts commit 26c4c39. * fix(deploy): re-land cheap GMP collectors with pinned existing-secret versions * fix(deploy): use revision-local env for public GMP collector config * test(deploy): attach revision-local configs with Secret Manager denied * chore(deploy): scope failure-class update to prevention artifacts * fix(deploy): keep secret metadata out of preflight logs * fix(deploy): normalize retained application secret annotations
Sync/backfill/integration currently reserve a 1-vCPU/512Mi GMP collector per instance and ingest the full backend registry every 30s. This reduces only those three collectors to 0.08 vCPU / 128Mi, uses a separate 60s RunMonitoring config/secret, and filters metrics to checked consumers. The RunMonitoring name and native GMP
joblabel remainomi-cloud-run-application-metricsfor existing direct-query selectors. App resources andcpu-throttling=falseremain unchanged; the shared backend/listen config stays broad at 30s.The allowlist preserves the dev/prod sync exporter's families, sync/summary/storage fallbacks, and direct sentinel batch-pipeline, accept-to-summary histogram, summary-terminal/debt and live-transcript-outcome metrics. Current fleet_gate/david_gate use durable state, projection logs and native Cloud Run request metrics, which are unaffected.
Conservative modeled gross savings: prod ~$107/day at Oct-16 population, ~$152/day at Oct-17 run rate; dev ~$16/day and ~$12/day respectively. These combine allocated compute reductions and seven measured dropped families; the 60s interval and live-STT fallback filtering add savings not priced here. Constant population and prior blended rates assumed; autoscaling/CUD allocation can change realized savings. Nothing has been deployed.
Validation:
nice -n 19 .../python -m pytest -q backend/tests/unit/test_attach_cloud_run_gmp_sidecar.py backend/tests/unit/test_fleet_deployment.py: 84 passed, throughomi-heavy.nice -n 19 gcloud run services replace --dry-run(subprocesses inherit niceness) against all three dev services, with unchanged application limits and traffic. Full exported services were identical before/after. Existing config bindings were retained for these resource probes; no secret write or payload read.Control-plane validation does not prove runtime scrape/load health at the smaller envelope. Before production promotion, check collector readiness, memory/OOM/restarts and fresh retained samples under load. The steady scrape interval adds up to 30s delay. Cloud tier:
dev-operatorfor dry-run validation,ro-devfor aggregate sample reads; no deployed revision or traffic changes.Rollback: restore prior traffic-selected revisions (numeric config versions are pinned), then revert this PR before the next deployment. That restores 1 vCPU/512Mi and the broad 30s config without changing billing mode. Do not merge as part of this task.