Implement observable messenger, SLO alerts and measured incident scenarios

This commit is contained in:
2026-10-23 13:09:22 +03:00
parent 470d9d6f1e
commit b7540190c1
66 changed files with 96519 additions and 39 deletions
+11
View File
@@ -0,0 +1,11 @@
otel-collector-1 | 2026-10-17T00:34:45.921Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/tempo", "otelcol.component.kind": "exporter", "otelcol.signal": "traces", "error": "no more retries left: failed to make an HTTP request: Post \"http://tempo:4318/v1/traces\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "dropped_items": 64}
otel-collector-1 | 2026-10-17T00:34:50.578Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/tempo", "otelcol.component.kind": "exporter", "otelcol.signal": "traces", "error": "no more retries left: failed to make an HTTP request: Post \"http://tempo:4318/v1/traces\": dial tcp: lookup tempo on 127.0.0.11:53: server misbehaving", "dropped_items": 64}
otel-collector-1 | 2026-10-17T00:34:52.384Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/loki", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "error": "no more retries left: failed to make an HTTP request: Post \"http://loki:3100/otlp/v1/logs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "dropped_items": 20}
otel-collector-1 | 2026-10-17T00:34:53.047Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/loki", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "error": "no more retries left: failed to make an HTTP request: Post \"http://loki:3100/otlp/v1/logs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "dropped_items": 19}
otel-collector-1 | 2026-10-17T00:35:16.662Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/tempo", "otelcol.component.kind": "exporter", "otelcol.signal": "traces", "error": "no more retries left: failed to make an HTTP request: Post \"http://tempo:4318/v1/traces\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "dropped_items": 64}
otel-collector-1 | 2026-10-17T00:35:17.013Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/tempo", "otelcol.component.kind": "exporter", "otelcol.signal": "traces", "error": "no more retries left: failed to make an HTTP request: Post \"http://tempo:4318/v1/traces\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "dropped_items": 64}
otel-collector-1 | 2026-10-17T00:35:21.315Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/loki", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "error": "no more retries left: failed to make an HTTP request: Post \"http://loki:3100/otlp/v1/logs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "dropped_items": 19}
otel-collector-1 | 2026-10-17T00:35:23.027Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/loki", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "error": "no more retries left: failed to make an HTTP request: Post \"http://loki:3100/otlp/v1/logs\": dial tcp: lookup loki on 127.0.0.11:53: server misbehaving", "dropped_items": 19}
otel-collector-1 | 2026-10-17T00:35:43.566Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/tempo", "otelcol.component.kind": "exporter", "otelcol.signal": "traces", "error": "no more retries left: failed to make an HTTP request: Post \"http://tempo:4318/v1/traces\": dial tcp: lookup tempo on 127.0.0.11:53: server misbehaving", "dropped_items": 64}
otel-collector-1 | 2026-10-17T00:35:45.774Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/loki", "otelcol.component.kind": "exporter", "otelcol.signal": "logs", "error": "no more retries left: failed to make an HTTP request: Post \"http://loki:3100/otlp/v1/logs\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)", "dropped_items": 19}
otel-collector-1 | 2026-10-17T00:35:46.659Z error internal/queue_sender.go:49 Exporting failed. Dropping data. {"resource": {"service.instance.id": "a9227f33-088d-41ed-b93b-a290f1e71ab6", "service.name": "otelcol-contrib", "service.version": "0.140.1"}, "otelcol.component.id": "otlphttp/tempo", "otelcol.component.kind": "exporter", "otelcol.signal": "traces", "error": "no more retries left: failed to make an HTTP request: Post \"http://tempo:4318/v1/traces\": dial tcp: lookup tempo on 127.0.0.11:53: no such host", "dropped_items": 64}
+233
View File
@@ -0,0 +1,233 @@
{
"batches": [
{
"resource": {
"attributes": [
{
"key": "deployment.environment.name",
"value": {
"stringValue": "lab"
}
},
{
"key": "service.instance.id",
"value": {
"stringValue": "52c93b4d96bd40299416de6bfdabd5a7"
}
},
{
"key": "service.version",
"value": {
"stringValue": "lab6-v1"
}
},
{
"key": "telemetry.sdk.language",
"value": {
"stringValue": "python"
}
},
{
"key": "telemetry.sdk.name",
"value": {
"stringValue": "opentelemetry"
}
},
{
"key": "telemetry.sdk.version",
"value": {
"stringValue": "1.45.1"
}
},
{
"key": "service.name",
"value": {
"stringValue": "messenger-api"
}
}
]
},
"scopeSpans": [
{
"scope": {
"name": "fastapi",
"version": "0.143.2"
},
"spans": [
{
"traceId": "zgA5cXn1SteXOQoPbCAwFg==",
"spanId": "itnQlL+Fnf8=",
"parentSpanId": "gcQqGXTvfVw=",
"name": "fastapi.dependencies",
"kind": "SPAN_KIND_INTERNAL",
"startTimeUnixNano": "1792196927830342630",
"endTimeUnixNano": "1792196927830450902",
"attributes": [
{
"key": "code.function.name",
"value": {
"stringValue": "src.app.create_app.<locals>.create_message"
}
}
],
"status": {}
},
{
"traceId": "zgA5cXn1SteXOQoPbCAwFg==",
"spanId": "OJOZuDOh1v0=",
"parentSpanId": "gcQqGXTvfVw=",
"name": "fastapi.endpoint",
"kind": "SPAN_KIND_INTERNAL",
"startTimeUnixNano": "1792196927830513761",
"endTimeUnixNano": "1792196928832275672",
"attributes": [
{
"key": "code.function.name",
"value": {
"stringValue": "src.app.create_app.<locals>.create_message"
}
},
{
"key": "error.type",
"value": {
"stringValue": "psycopg.errors.LockNotAvailable"
}
}
],
"status": {
"code": "STATUS_CODE_ERROR"
}
},
{
"traceId": "zgA5cXn1SteXOQoPbCAwFg==",
"spanId": "sc90cQibGCc=",
"parentSpanId": "xNQMHSS3TVo=",
"name": "POST /api/v1/chats/{chat_id}/messages",
"kind": "SPAN_KIND_SERVER",
"startTimeUnixNano": "1792196927829935734",
"endTimeUnixNano": "1792196928832908059",
"attributes": [
{
"key": "server.port",
"value": {
"intValue": "8080"
}
},
{
"key": "url.scheme",
"value": {
"stringValue": "http"
}
},
{
"key": "network.protocol.version",
"value": {
"stringValue": "1.1"
}
},
{
"key": "http.response.status_code",
"value": {
"intValue": "503"
}
},
{
"key": "error.type",
"value": {
"stringValue": "503"
}
},
{
"key": "http.request.method",
"value": {
"stringValue": "POST"
}
},
{
"key": "url.path",
"value": {
"stringValue": "/api/v1/chats/6ccd528d-8829-446e-8cf3-1c2e770f2ad0/messages"
}
},
{
"key": "server.address",
"value": {
"stringValue": "127.0.0.1"
}
},
{
"key": "http.route",
"value": {
"stringValue": "/api/v1/chats/{chat_id}/messages"
}
}
],
"status": {
"code": "STATUS_CODE_ERROR"
}
}
]
},
{
"scope": {
"name": "messenger"
},
"spans": [
{
"traceId": "zgA5cXn1SteXOQoPbCAwFg==",
"spanId": "gWhOJ42erpA=",
"parentSpanId": "OJOZuDOh1v0=",
"name": "db.session.authenticate",
"kind": "SPAN_KIND_INTERNAL",
"startTimeUnixNano": "1792196927830580880",
"endTimeUnixNano": "1792196928832212284",
"attributes": [
{
"key": "db.system.name",
"value": {
"stringValue": "postgresql"
}
}
],
"status": {
"code": "STATUS_CODE_ERROR"
}
},
{
"traceId": "zgA5cXn1SteXOQoPbCAwFg==",
"spanId": "gcQqGXTvfVw=",
"parentSpanId": "xNQMHSS3TVo=",
"name": "POST /api/v1/chats/{chat_id}/messages",
"kind": "SPAN_KIND_SERVER",
"startTimeUnixNano": "1792196927830090105",
"endTimeUnixNano": "1792196928833353246",
"attributes": [
{
"key": "http.response.status_code",
"value": {
"intValue": "503"
}
},
{
"key": "http.request.method",
"value": {
"stringValue": "POST"
}
},
{
"key": "http.route",
"value": {
"stringValue": "/api/v1/chats/{chat_id}/messages"
}
}
],
"status": {
"code": "STATUS_CODE_ERROR"
}
}
]
}
]
}
]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 102 KiB