observer_pipeline_runs
observer_pipeline_runs, Observer Servisinin ingest.accepted.v1 ile baslayan lifecycle'i takip ederek terminal durumda olusturdugu performans ve akis ozet kayitlarini tutar.
Bu tablo hem basarili (completed) hem de kalici basarisiz (permanent_failed) akislari raporlar.
Kolonlar
| Kolon | Tip | Null | Anlami |
|---|---|---|---|
id | bigint | hayir | Birincil anahtar |
trace_id | varchar(64) | hayir | Lifecycle izleme kimligi |
device_id | varchar(21) | hayir | Cihaz kimligi |
stream_id | bigint | hayir | Stream kimligi |
start_event | varchar(64) | hayir | Baslangic eventi (ingest.accepted.v1) |
terminal_status | varchar(24) | hayir | completed veya permanent_failed |
failed_stage | varchar(40) | evet | Kalici hatada son fail eden stage |
ingest_process_ms | int | evet | Ingest process suresi |
stream_process_ms | int | evet | Stream process suresi |
calibration_process_ms | int | evet | Calibration process suresi |
raw_writer_process_ms | int | evet | Raw Writer process suresi |
synthesis_process_ms | int | evet | Synthesis process suresi |
window_process_ms | int | evet | Window process suresi |
rule_process_ms | int | evet | Rule process suresi |
end_to_end_ms | int | hayir | Akis toplam suresi |
retry_total | int | hayir | Toplam retry sayisi |
attempt_total | int | hayir | Toplam deneme sayisi |
error_total | int | hayir | Toplam hata adedi |
error_rate_pct | decimal(5,2) | hayir | Hata yuzdesi |
cleanup_done | boolean | hayir | device_buffer temizligi yapildi mi |
buffer_key | varchar(80) | evet | Temizlenen key (device_buffer:{device_id}) |
started_at | timestamp | hayir | Akis baslangic zamani |
completed_at | timestamp | hayir | Terminal durum zamani |
create_time | timestamp | hayir | Kayit olusturma zamani |
Indeksler
| Indeks | Tip | Aciklama |
|---|---|---|
id | Primary Key | Tablo birincil anahtari |
trace_id | Unique | Her lifecycle tek kayit |
(device_id, completed_at) | B-Tree | Cihaz bazli performans sorgulari |
(terminal_status, completed_at) | B-Tree | Basari/basarisizlik dagilimi |
(error_rate_pct, completed_at) | B-Tree | Darbogaz/hata yuzdesi analizi |
(failed_stage, completed_at) | B-Tree | Stage bazli hata toplulugu |
Retention ve Arsiv Politikasi
- Sicak veri (OLTP sorgulari):
90 gun - Ozet rapor/veri ambarina aktarma: gunluk batch
- Arsiv katmani (object storage / cold DB):
12 ay - Arsiv sonrasi ana tabloda purge: aylik job
Not: Purge sadece completed_at < now() - interval '90 days' olan kayitlara uygulanmalidir.
Ornek Kayitlar
- Basarili Akis
- Kalici Basarisizlik
{
"id": 1,
"trace_id": "obs-2026-04-14-0001",
"device_id": "400000011D081B70",
"stream_id": 9823412,
"start_event": "ingest.accepted.v1",
"terminal_status": "completed",
"failed_stage": null,
"ingest_process_ms": 9,
"stream_process_ms": 14,
"calibration_process_ms": 10,
"raw_writer_process_ms": 15,
"synthesis_process_ms": 18,
"window_process_ms": 21,
"rule_process_ms": 19,
"end_to_end_ms": 106,
"retry_total": 0,
"attempt_total": 1,
"error_total": 0,
"error_rate_pct": 0.00,
"cleanup_done": true,
"buffer_key": "device_buffer:400000011D081B70",
"started_at": "2026-04-14T10:20:00Z",
"completed_at": "2026-04-14T10:20:06Z",
"create_time": "2026-04-14T10:20:06Z"
}
Ozet: Lifecycle basariyla tamamlanmis, tum stage sureleri yazilmis ve device buffer temizligi tamamlanmis.
{
"id": 2,
"trace_id": "obs-2026-04-14-0002",
"device_id": "400000011D081B71",
"stream_id": 9823419,
"start_event": "ingest.accepted.v1",
"terminal_status": "permanent_failed",
"failed_stage": "synthesis",
"ingest_process_ms": 8,
"stream_process_ms": 13,
"calibration_process_ms": 11,
"raw_writer_process_ms": 14,
"synthesis_process_ms": null,
"window_process_ms": null,
"rule_process_ms": null,
"end_to_end_ms": 65000,
"retry_total": 3,
"attempt_total": 4,
"error_total": 4,
"error_rate_pct": 100.00,
"cleanup_done": true,
"buffer_key": "device_buffer:400000011D081B71",
"started_at": "2026-04-14T11:00:00Z",
"completed_at": "2026-04-14T11:01:05Z",
"create_time": "2026-04-14T11:01:05Z"
}
Ozet: Synthesis asamasinda 3 retry sonrasi kalici basarisizlik olusmus, event log kaydi yapilmis ve buffer temizlenmis.