feat(collectors): opt-in HTTP endpoint probes with bundled alerts #72
All Vouch review confidence checks passed
Residual risk 0.28 = Change Risk (0.50) × (1 − Review Confidence (0.45)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 612 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 56% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.384
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #72"
general
weight: 0.35
claude[bot]
Why
A gateway can refuse every connection while all of its pods stay
Running, for example when its Envoy starts without listeners. No alert fires today.uponly proves that each pod's/metricsanswers when scraped directly by pod IP. Nothing checks the path a real caller takes: DNS → load-balancer VIP → proxy listener → route → backend.What
The cluster collector can now probe a list of URLs, opt-in, using the
http_checkreceiver, and the chart ships alert rules for it.otelcol-k8sat the pinned operator's collector version, 0.162.0 (checked in the distribution'smanifest.yaml). At that version the component type ishttp_check;httpcheckis a deprecated alias. It is added to the cluster collector's metrics pipeline. That collector is a single replica, so each URL is checked once per interval. Targets are passed through verbatim (headers,tls,proxy_url,validations, …). The schema only requiresendpointorendpoints.targetsis non-empty. The receiver and the rule pack share one helper,lgtm.httpcheck.enabled.alerts/httpcheck.yaml. It is gated inalerting.yamland can be dropped withlgtm.alerting.exclude: [httpcheck].- HTTP endpoint unreachable (critical,
for: 2m): no HTTP response at all, i.e. connection refused, timeout, TLS or DNS failure. Any status, 401/403 included, counts as reachable. The annotation names the URL anderror.message.- HTTP endpoint returning server errors (warning,
for: 5m): a 5xx. The annotation names the URL and the status code.- Both rules compare sample timestamps: is the newest error/5xx sample as new as the newest check? OTLP-ingested series carry no staleness markers, so a rule that read values would keep seeing the last
error=1for the whole 5m lookback after recovery. The timestamp comparison clears on the next good check. Both rules usegt 0, quote the dotted names, and setnoDataState: OK.- A README section, "HTTP endpoint probes", covers what reachable means and the in-cluster vantage point. The probe cannot see failures only on the outside path, and kube-proxy/Cilium route in-cluster traffic for a LoadBalancer IP straight to its endpoints. It also covers egress: neither the chart's NetworkPolicy nor the operator's restricts collector egress, since both are ingress-only. Under default-deny, consumers need their own rule. Because policy is evaluated after the Service DNAT, it must allow the gateway pods, not an
ipBlockof the VIP. The section includes an example policy.- ADR-0020, plus the values comments.
- New
examples/values-httpcheck.yaml, which the existing example render loops pick up.-
validate_alerts.pynow renders with that overlay, so the opt-in pack gets the uid, refId and dotted-label checks.- A new CI step asserts the gating both ways, the per-target timeout merge,
exclude, and that the schema rejects a target without an endpoint.Verification
helm templateoutput is identical tomain's for the defaults,collectors.enabled=false, every existing example, andhttpcheck.enabled=truewith no targets. Only the randomly generated passwords and certs differ, as they do between any two renders.ct lint(chart-testing v3.14.0) passes on the defaults and with--helm-lint-extra-args "-f examples/values-httpcheck.yaml".helm lint,make template,validate_alerts.py(27 rules),validate_dashboards.py, kubeconform (default, httpcheck, mtls) andmake docs-validateall pass.http_checkconfig passesvalidateonopentelemetry-collector-k8s:0.162.0.NoTranslationandtype-and-unit-labels, probing nginx targets:- metric and label names as documented (
httpcheck.status,httpcheck.error,httpcheck.duration,http.url,http.status_class,http.status_code,error.message);- a 403 target fires nothing;
- a 503 target fires only the server-errors rule;
- a stopped host fires only the unreachable rule (
… no such host), while its stale2xx=1series was still visible;- after the host came back, the unreachable rule went empty on the next check while the stale error series was still in the lookback.
🤖 Generated with Claude Code