python student-tests/telemetry_outage.py
1. baseline (exporter queue capacity 200 batches, memory_limiter 400 MiB heap, container limit 512 MiB):
   t=   15s collector heap= 42.5 rss= 165.7 MiB queues={'loki': 0, 'prometheus': 0, 'tempo': 0} send_failed_total=0 TelemetryExportFailing=inactive http={'201': 136, 'upload 202': 2}
2. t=17s docker compose stop tempo loki (traces and logs stores)
   t=   32s collector heap= 27.2 rss= 169.6 MiB queues={'loki': 3, 'prometheus': 0, 'tempo': 3} send_failed_total=0 TelemetryExportFailing=inactive http={'201': 288, 'upload 202': 6}
   t=   47s collector heap= 33.6 rss= 169.6 MiB queues={'loki': 11, 'prometheus': 0, 'tempo': 11} send_failed_total=0 TelemetryExportFailing=inactive http={'201': 423, 'upload 202': 9}
   t=   62s collector heap= 39.2 rss= 170.1 MiB queues={'loki': 18, 'prometheus': 0, 'tempo': 18} send_failed_total=0 TelemetryExportFailing=inactive http={'201': 547, 'upload 202': 12}
   t=   77s collector heap= 43.6 rss= 170.1 MiB queues={'loki': 26, 'prometheus': 0, 'tempo': 26} send_failed_total=0 TelemetryExportFailing=inactive http={'201': 679, 'upload 202': 15}
   t=   92s collector heap= 28.0 rss= 170.8 MiB queues={'loki': 33, 'prometheus': 0, 'tempo': 33} send_failed_total=0 TelemetryExportFailing=pending  http={'201': 811, 'upload 202': 17}
   t=  107s collector heap= 32.7 rss= 170.8 MiB queues={'loki': 40, 'prometheus': 0, 'tempo': 41} send_failed_total=0 TelemetryExportFailing=pending  http={'201': 946, 'upload 202': 20}
   t=  122s collector heap= 37.8 rss= 170.8 MiB queues={'loki': 48, 'prometheus': 0, 'tempo': 48} send_failed_total=0 TelemetryExportFailing=pending  http={'201': 1079, 'upload 202': 23}
   t=  137s collector heap= 42.6 rss= 170.8 MiB queues={'loki': 55, 'prometheus': 1, 'tempo': 55} send_failed_total=0 TelemetryExportFailing=pending  http={'201': 1215, 'upload 202': 26}
   t=  152s collector heap= 47.0 rss= 170.8 MiB queues={'loki': 63, 'prometheus': 0, 'tempo': 63} send_failed_total=0 TelemetryExportFailing=firing   http={'201': 1346, 'upload 202': 29}
   t=  167s collector heap= 32.3 rss= 170.8 MiB queues={'loki': 70, 'prometheus': 0, 'tempo': 70} send_failed_total=0 TelemetryExportFailing=firing   http={'201': 1478, 'upload 202': 32}
   t=  182s collector heap= 39.0 rss= 171.5 MiB queues={'loki': 78, 'prometheus': 0, 'tempo': 78} send_failed_total=0 TelemetryExportFailing=firing   http={'201': 1613, 'upload 202': 35}
   t=  197s collector heap= 45.3 rss= 175.0 MiB queues={'loki': 85, 'prometheus': 0, 'tempo': 85} send_failed_total=0 TelemetryExportFailing=firing   http={'201': 1742, 'upload 202': 38}
   upload 519f5171-09af-47e7-a0ea-65245c398527 made during the outage -> ready (business path unaffected)
   during the outage: every business request succeeded {'201': 1742, 'upload 202': 38}; collector RSS max 175 MiB (heap max 47 MiB < 400 MiB limit); exporter queue max 85 of 200 batches; TelemetryExportFailing firing at t=152s
3. t=200s docker compose start tempo loki
   t=  215s collector heap= 50.3 rss= 175.0 MiB queues={'loki': 93, 'prometheus': 0, 'tempo': 93} send_failed_total=0 TelemetryExportFailing=firing   http={'201': 1896, 'upload 202': 41}
   t=  230s collector heap= 51.7 rss= 175.6 MiB queues={'loki': 1, 'prometheus': 0, 'tempo': 0} send_failed_total=0 TelemetryExportFailing=firing   http={'201': 2030, 'upload 202': 44}
   t=  245s collector heap= 57.1 rss= 176.3 MiB queues={'loki': 0, 'prometheus': 0, 'tempo': 0} send_failed_total=0 TelemetryExportFailing=inactive http={'201': 2152, 'upload 202': 47}
   queues drained and TelemetryExportFailing resolved at t=245s
   upload a9b297a8-98b1-4fcb-a8a3-61b5c74473d3 from the middle of the outage: log (X-Request-Id 35573634eee641e9b9eee43ccbf50fc0) and trace ee597afda36071ba1c880f8d3b933b48 arrived after recovery (they waited in the collector queue); telemetry items dropped by exporters during the run: 0
4. docker compose stop otel-collector for 60 s (the SDK cannot export at all)
   API answered {'201': 538, 'upload 202': 12} while the collector was down (no errors); API replica RSS 147 -> 148 MiB (SDK queues are bounded: 2048 records per signal)
PASS: telemetry stores and the collector down -> business API unaffected, bounded collector memory and queues, delayed telemetry delivered after recovery, drops are counted
