Archive grade 4 traces, alerts and bounded outage evidence

This commit is contained in:
Artyom
2026-11-06 21:17:45 +03:00
parent cd9d91550a
commit 0fc02496fe
32 changed files with 3829 additions and 4 deletions
@@ -1,9 +1,9 @@
## Implementation
- [ ] 1. Durable context migration, repository and publisher wiring; propagation/retry tests
- [ ] 2. Safe S3 spans and process/pool/queue/worker/time-to-ready metrics; unit checks
- [ ] 3. Dashboards, SLO recording/alert rules and runbooks; configuration validation
- [x] 1. Durable context migration, repository and publisher wiring; propagation/retry tests
- [x] 2. Safe S3 spans and process/pool/queue/worker/time-to-ready metrics; unit checks
- [x] 3. Dashboards, SLO recording/alert rules and runbooks; configuration validation
## Verification
- [ ] 4. make check/validate/lint/student-test; real smoke, persistence and failover after changes
- [x] 4. make check/validate/lint/student-test; real smoke, persistence and failover after changes
- [ ] 5. End-to-end and retry traces, dashboards, leaks and cardinality
- [ ] 6. Worker and database incidents: evidence, firing/resolved and diagnosis
- [ ] 7. Storage outage: availability, bounded memory, lost signals and recovery
@@ -0,0 +1,30 @@
# lab6-observability-resilience Specification
## Purpose
TBD - created by archiving change complete-lab6-observability-resilience. Update Purpose after archive.
## Requirements
### Requirement: Durable distributed context
The system SHALL preserve W3C context through API, transactional outbox, relay producer and worker consumer including retries, and expose safe database and S3 client spans.
#### Scenario: Deferred delivery and retry
- **WHEN** an accepted upload is delivered after relay restart or retried after S3 failure
- **THEN** its producer and consumer spans share the originating trace and causally valid parents, without adding fields to the normative job payload
### Requirement: Operational signals and SLO
The system SHALL expose queue depth and oldest age, database pool usage and waiting, worker saturation, process CPU/RAM and durable time-to-ready; dashboards SHALL show histogram percentiles and error ratio and define availability and ready SLO windows.
#### Scenario: Stopped worker
- **WHEN** queued uploads wait for a stopped worker
- **THEN** depth and age increase, a queue-lag alert fires and resolves after recovery
#### Scenario: Unavailable database
- **WHEN** PostgreSQL becomes unavailable
- **THEN** API failure metrics and database client spans distinguish the dependency failure and an error-rate alert fires and resolves
### Requirement: Bounded observability failure
Collector SHALL use memory limits, batching and bounded queues; unavailable telemetry storage SHALL NOT prevent business requests or cause unbounded memory growth.
#### Scenario: Storage outage
- **WHEN** telemetry storage is stopped during requests
- **THEN** business smoke passes, measured memory remains within container limits, losses are recorded, and exports resume after recovery