forked from mtusi2026/mtusi2026lab7
Контракт, публичные тесты и README задания оставлены от lab7. Co-authored-by: Cursor <cursoragent@cursor.com>
876 B
876 B
High API error rate
Signal: messenger_http_requests_total. Numerator is status_class="5xx". Denominator is every instrumented business request. /health/*, /docs and /openapi.json are not in this ratio, so a bad password (401) is not an incident.
- Open the Messenger dashboard and compare the 5xx ratio with p95 duration.
- In Tempo, open a server span with
http.response.status_code >= 500. The span attributehttp.routeis the template, not a user id. - In Loki, query
{service_name="messenger-api"}and matchtrace_idfrom that span. The log line hasevent,severity,trace_idandspan_id. - If the span stops inside the database client or the pool-used gauge is at
DB_POOL_MAXwith waiters, the cause is Postgres, not the HTTP handler itself. - After the dependency recovers, the 5m ratio falls and
HighApiErrorRateleavesfiring.