Реализовать наблюдаемость и доказательства уровня 4

This commit is contained in:
EgorAnti
2026-11-19 20:08:50 +03:00
parent 470d9d6f1e
commit 935de06050
195 changed files with 19333 additions and 53 deletions
@@ -0,0 +1,43 @@
{
"captured_at": "2026-11-19T16:36:47.0833934Z",
"api_5xx": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {},
"value": [
1795106207.063,
"0.5846403015440146"
]
}
]
}
},
"alerts": {
"status": "success",
"data": {
"alerts": [
{
"labels": {
"alertname": "MessengerApiHighErrorRate",
"severity": "warning",
"slo": "api-availability"
},
"annotations": {
"description": "Five-minute 5xx ratio is above 5% for two minutes.",
"runbook": "infra/otel/runbooks.md#api-high-error-rate",
"summary": "Messenger API 5xx ratio exceeds 5%"
},
"state": "firing",
"activeAt": "2026-11-19T16:34:37.684164819Z",
"value": "9.644768265300965e-01"
}
]
}
},
"alert_firing": true,
"jdbc_spans_hint": "Grafana Explore -> Tempo: { resource.service.name = \"messenger-api\" && span.db.system.name = \"postgresql\" }",
"correlated_logs_hint": "Grafana Explore -> Loki: {service_name=\"messenger-api\"} | json | level=\"ERROR\""
}
@@ -0,0 +1,200 @@
[
{
"at": "2026-11-19T16:34:00.5253128Z",
"ready_status": 503,
"business_status": 401,
"duration_ms": 4240.2
},
{
"at": "2026-11-19T16:34:05.8085003Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4040.7
},
{
"at": "2026-11-19T16:34:10.8602421Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4034.5
},
{
"at": "2026-11-19T16:34:15.9061557Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4035.0
},
{
"at": "2026-11-19T16:34:20.9495283Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4019.5
},
{
"at": "2026-11-19T16:34:25.9764025Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4018.2
},
{
"at": "2026-11-19T16:34:31.0048332Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4024.0
},
{
"at": "2026-11-19T16:34:36.0394294Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4033.6
},
{
"at": "2026-11-19T16:34:41.0840646Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4028.6
},
{
"at": "2026-11-19T16:34:46.1268110Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4076.1
},
{
"at": "2026-11-19T16:34:51.2134687Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4013.2
},
{
"at": "2026-11-19T16:34:56.2358974Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4022.9
},
{
"at": "2026-11-19T16:35:01.2714634Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4029.5
},
{
"at": "2026-11-19T16:35:06.3066502Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4023.7
},
{
"at": "2026-11-19T16:35:11.3429193Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4030.3
},
{
"at": "2026-11-19T16:35:16.3792975Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4031.5
},
{
"at": "2026-11-19T16:35:21.4180181Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4013.5
},
{
"at": "2026-11-19T16:35:26.4479913Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4025.9
},
{
"at": "2026-11-19T16:35:31.4865276Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4028.5
},
{
"at": "2026-11-19T16:35:36.5299328Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4026.3
},
{
"at": "2026-11-19T16:35:41.5598609Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4026.4
},
{
"at": "2026-11-19T16:35:46.5956509Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4023.2
},
{
"at": "2026-11-19T16:35:51.6212244Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4012.7
},
{
"at": "2026-11-19T16:35:56.6416286Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4030.0
},
{
"at": "2026-11-19T16:36:01.6791804Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4022.7
},
{
"at": "2026-11-19T16:36:06.7040114Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4021.4
},
{
"at": "2026-11-19T16:36:11.7306456Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4029.9
},
{
"at": "2026-11-19T16:36:16.7621800Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4028.0
},
{
"at": "2026-11-19T16:36:21.8035195Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4014.1
},
{
"at": "2026-11-19T16:36:26.8302112Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4018.8
},
{
"at": "2026-11-19T16:36:31.8595958Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4027.3
},
{
"at": "2026-11-19T16:36:36.8893717Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4029.3
},
{
"at": "2026-11-19T16:36:41.9284299Z",
"ready_status": 503,
"business_status": 503,
"duration_ms": 4032.4
}
]
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,26 @@
{
"captured_at": "2026-11-19T16:41:55.2729486+00:00",
"readiness_recovered": true,
"alerts": {
"status": "success",
"data": {
"alerts": []
}
},
"alert_resolved": true,
"api_5xx_ratio": {
"status": "success",
"data": {
"resultType": "vector",
"result": [
{
"metric": {},
"value": [
1795106515.309,
"0"
]
}
]
}
}
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,361 @@
{
"traces": [
{
"traceID": "71d67516856cb51d3fd6187fdf2817f",
"rootServiceName": "messenger-worker",
"rootTraceName": "messenger",
"startTimeUnixNano": "1795106139953505266",
"durationMs": 1,
"spanSet": {
"spans": [
{
"spanID": "03631e0ae3ce65a9",
"startTimeUnixNano": "1795106139953505266",
"durationNanos": "1393486",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
},
"spanSets": [
{
"spans": [
{
"spanID": "03631e0ae3ce65a9",
"startTimeUnixNano": "1795106139953505266",
"durationNanos": "1393486",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
}
],
"serviceStats": {
"messenger-worker": {
"spanCount": 1,
"errorCount": 1
}
}
},
{
"traceID": "cc2248aee1659a6529b09fd076ff8e02",
"rootServiceName": "messenger-worker",
"rootTraceName": "messenger",
"startTimeUnixNano": "1795106052953980568",
"durationMs": 1,
"spanSet": {
"spans": [
{
"spanID": "7ffc924466fe3b7f",
"startTimeUnixNano": "1795106052953980568",
"durationNanos": "1763744",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
},
"spanSets": [
{
"spans": [
{
"spanID": "7ffc924466fe3b7f",
"startTimeUnixNano": "1795106052953980568",
"durationNanos": "1763744",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
}
],
"serviceStats": {
"messenger-worker": {
"spanCount": 1,
"errorCount": 1
}
}
},
{
"traceID": "9e389058dfdf137e833785ddbb0d1f6f",
"rootServiceName": "messenger-worker",
"rootTraceName": "messenger",
"startTimeUnixNano": "1795106043478695215",
"spanSet": {
"spans": [
{
"spanID": "c89fe13bd4a61fa4",
"startTimeUnixNano": "1795106043478695215",
"durationNanos": "953569",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
},
"spanSets": [
{
"spans": [
{
"spanID": "c89fe13bd4a61fa4",
"startTimeUnixNano": "1795106043478695215",
"durationNanos": "953569",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
}
],
"serviceStats": {
"messenger-worker": {
"spanCount": 1,
"errorCount": 1
}
}
},
{
"traceID": "6a35aedc38417630096d551d8d504d6e",
"rootServiceName": "messenger-worker",
"rootTraceName": "messenger",
"startTimeUnixNano": "1795106041627390774",
"durationMs": 18,
"spanSet": {
"spans": [
{
"spanID": "d68a32afe63bf2f2",
"startTimeUnixNano": "1795106041627390774",
"durationNanos": "18820885",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
},
"spanSets": [
{
"spans": [
{
"spanID": "d68a32afe63bf2f2",
"startTimeUnixNano": "1795106041627390774",
"durationNanos": "18820885",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 1
}
],
"serviceStats": {
"messenger-worker": {
"spanCount": 1,
"errorCount": 1
}
}
},
{
"traceID": "696ba634a1655319ddc27bdcd88edb88",
"rootServiceName": "messenger-api",
"rootTraceName": "ExpiredLeaseReaper.recoverExpired",
"startTimeUnixNano": "1795106040066361178",
"durationMs": 5017,
"spanSet": {
"spans": [
{
"spanID": "bb6cc6ecea134b52",
"startTimeUnixNano": "1795106040066669462",
"durationNanos": "33951674",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
},
{
"spanID": "27022a80d9f3f062",
"startTimeUnixNano": "1795106040104844852",
"durationNanos": "1526278",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 2
},
"spanSets": [
{
"spans": [
{
"spanID": "bb6cc6ecea134b52",
"startTimeUnixNano": "1795106040066669462",
"durationNanos": "33951674",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
},
{
"spanID": "27022a80d9f3f062",
"startTimeUnixNano": "1795106040104844852",
"durationNanos": "1526278",
"attributes": [
{
"key": "db.system",
"value": {
"stringValue": "postgresql"
}
},
{
"key": "status",
"value": {
"stringValue": "error"
}
}
]
}
],
"matched": 2
}
],
"serviceStats": {
"messenger-api": {
"spanCount": 3,
"errorCount": 3
}
}
}
],
"metrics": {
"inspectedBytes": "280709",
"completedJobs": 3,
"totalJobs": 3
}
}