lab6: observability — OTel Collector, Prometheus, Loki, Tempo, Grafana

This commit is contained in:
2026-11-13 13:20:46 +03:00
parent 470d9d6f1e
commit 5945e035e0
63 changed files with 6436 additions and 19 deletions
@@ -0,0 +1,33 @@
groups:
- name: api
interval: 30s
rules:
- alert: HighErrorRate
expr: |
(
sum(rate(http_requests_total{status_class="5xx"}[5m]))
/
sum(rate(http_requests_total[5m]))
) > 0.05
for: 2m
labels:
severity: warning
component: api
annotations:
summary: "API 5xx ratio > 5% for 2m"
description: "Current 5xx ratio: {{ $value | humanizePercentage }}"
runbook: "infra/otel/runbooks/high-error-rate.md"
- alert: HighLatency
expr: |
histogram_quantile(
0.95,
sum(rate(http_request_duration_seconds_bucket[5m])) by (le)
) > 2.0
for: 5m
labels:
severity: warning
component: api
annotations:
summary: "API p95 latency > 2s for 5m"
description: "p95 latency: {{ $value | humanizeDuration }}"