feat(ingest): label er_ingest_events_total skipped_noise by rule_id
CI / Test api (push) Successful in 54s
CI / Test ingest-api (push) Successful in 57s
CI / Lint and typecheck admin-ui (push) Successful in 1m48s
CI / Validate Docker build (push) Successful in 5m19s

Break down noise filter counters per noise policy rule for Prometheus observability.

Paperclip-Agent: David Santos (urlKey david-santos; id 0b1fcf92-5fe3-4ac0-9f29-df4ab72f5376)
Paperclip-Issue: BIT-26791
Paperclip-Run: cea24469-2886-457d-9f6f-09d83aaf9e4a
This commit is contained in:
David Santos committed 2026-07-17 23:01:35 +00:00
1 parent caeb37ff0a
commit 23704d2e59
7 files changed
+43 -11

No files matched your search

+2 -2
View File
@@ -72,7 +72,7 @@ Automation or Grafana can **poll** that endpoint on an interval (with read key)
|--------|--------|---------|
| `er_ingest_request_duration_seconds` | `status_code` | End-to-end POST latency (SLO: watch p95/p99) |
| `er_ingest_requests_total` | `status_code` | Request volume by outcome class |
| `er_ingest_events_total` | `outcome` | `stored`, `skipped_noise`, `error` |
| `er_ingest_events_total` | `outcome`, `rule_id` | `stored` / `error` use empty `rule_id`; `skipped_noise` sets noise policy id (e.g. `resize_observer_loop`) |
| `er_ingest_batch_size` | — | Histogram of events per request |
| `er_ingest_active_connections` | — | In-flight requests (gauge) |
@@ -84,7 +84,7 @@ Plus `er_ingest_*` process defaults from `prom-client`.
1. **Ingest availability:** `sum(rate(er_ingest_requests_total[5m])) by (status_code)`.
2. **Ingest latency:** histogram quantiles on `er_ingest_request_duration_seconds` (e.g. `histogram_quantile(0.95, …)`).
3. **Noise vs stored:** `rate(er_ingest_events_total{outcome="stored"}[5m])` vs `skipped_noise`.
3. **Noise vs stored:** `rate(er_ingest_events_total{outcome="stored"}[5m])` vs `skipped_noise`. Per-rule noise: `sum(rate(er_ingest_events_total{outcome="skipped_noise"}[5m])) by (rule_id)`.
4. **Open incidents:** `er_incidents_total` by `state` (after stats refresh).
5. **Hub HTTP errors:** `sum(rate(er_api_http_requests_total{status_code=~"5.."}[5m]))`.
+1 -1
View File
@@ -121,7 +121,7 @@ When **`Idempotency-Key`** is reused with a **different** JSON body, the API ret
## 7. Noise rules — events “disappear”
If the response shows `results[]` entries with `"skipped": true`, the event matched a **noise rule** (`rule_id`, `reason`). This is expected for filtered traffic. Check `noise_filtered_count` and compare with `er_ingest_events_total{outcome="skipped_noise"}` in Prometheus.
If the response shows `results[]` entries with `"skipped": true`, the event matched a **noise rule** (`rule_id`, `reason`). This is expected for filtered traffic. Check `noise_filtered_count` and compare with `er_ingest_events_total{outcome="skipped_noise"}` in Prometheus (series also carry `rule_id`).
---
+3
View File
@@ -203,6 +203,9 @@ scrape_configs:
# Ingest throughput (events/sec)
sum(rate(er_ingest_events_total[5m])) by (outcome)
# Noise skips by rule (BIT-26791)
sum(rate(er_ingest_events_total{outcome="skipped_noise"}[5m])) by (rule_id)
# Ingest request rate by status
sum(rate(er_ingest_requests_total[5m])) by (status_code)