Repository navigation
chore(monitoring): scrape batch-pipeline workers into the in-cluster Prometheus - #24079
Merged
Merged
Conversation
…Prometheus The prometheus-adapter reads the in-cluster Prometheus, not GMP, so the omi_batch_pipeline_* external rules behind the worker HPA (#23891) matched zero series: nothing scraped the batch-pipeline-worker pods into that Prometheus. Add a batch-pipeline-worker-metrics additionalScrapeConfigs job mirroring diarizer-batch-metrics (#21448): 15s, role pod, prod-omi-backend, keep on the app.kubernetes.io/name label, the http port and Running phase, relabel exactly namespace+pod so the adapter's per-pod freshness join (namespace, worker_release, pod) resolves; priority and worker_release ride the metric samples. Declare the job in expected-targets.prod.yaml as a declared batch target with no coverage alert, and pin the whole contract in test_batch_pipeline_chart.py alongside the worker's other scrape checks.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The prometheus-adapter (
prod-omi-prometheus-adapter) reads the in-clusterPrometheus (
prod-omi-kube-prometheus-stack), not GMP. The external rulesbehind the batch worker HPA (#23891) —
omi_batch_pipeline_admissible_ready_unitsand
omi_batch_pipeline_ready_age_seconds, already present inprod_omi_prometheus_adapter.yaml— match zero series today because no scrapejob selects the
batch-pipeline-workerpods into that Prometheus; they onlyfeed GMP. Until this lands, the worker HPA cannot scale batch to 100%: the
external metrics API returns no values.
What
Adds a
batch-pipeline-worker-metricsjob toadditionalScrapeConfigs,mirroring the
diarizer-batch-metricsprecedent from #21448 (the 2026-10-14diarizer-batch cutover):
scrape_interval: 15s,role: pod,namespaces: [prod-omi-backend]app.kubernetes.io/name: batch-pipeline-workerlabel (selectsevery chart release, not one instance name), the
httpcontainer port(8080 — the same port the chart's GMP PodMonitoring scrapes), and
Runningphase
namespace+pod: the adapter's freshness joins runon (namespace, worker_release, pod), so the scrape must attach those two;priorityandworker_releaseride the metric samples themselves and areleft untouched (no
metric_relabel_configs)Declares the job in
expected-targets.prod.yaml(mechanismadditionalScrapeConfigs,auth: null— the worker's/metricshandler isunauthenticated, namespace
prod-omi-backend,coverage_status: declaredwith no coverage alert, same class as
diarizer-batch-metrics) and pins thewhole shape in
test_batch_pipeline_chart.pynext to the worker's otherscrape contracts. The telemetry contract test enforces values↔inventory
bidirectionally, so both sides land together.
Series this enables (at today's 3 replicas)
omi_batch_pipeline_admissible_ready_unitsomi_batch_pipeline_capacity_refreshed_at_secondsomi_batch_pipeline_ready_age_secondsomi_batch_pipeline_metrics_refreshed_at_secondsRisk
pods. The job scrapes the worker's full
/metricsexposition (as thediarizer job does for its pods), bounded by the runtime's registry — an
O(100) series addition against the 2.25M-series head, ingested locally by
both Prometheus replicas, no Cloud Monitoring reads. Negligible.
rollout lead applies the stack with the pinned-chart runbook (helm upgrade
prod-omi-kube-prometheus-stack, chart 75.15.1, per the monitoring README)in the same window as the prometheus-adapter apply that carries the HPA
rules. No
.github/changes, no flag flip, no IAM change, no data mutation.(today 3; perf(batch): enable production worker autoscaling #23891's maxReplicas 16 bounds the ceiling).
Test plan
across
test_batch_pipeline_chart.py(new pin),test_monitoring_telemetry_contract.py(inventory bidirectional +declared-gap rules),
test_diarizer_batch_prereqs.py(neighbor jobunaffected).
Failure-Class: none