Travel Observability, Trace ve Correlation Model
Search'ten booking ve servicing'e kadar travel transaction'larını correlation ID, distributed trace, metrics ve structured event modeliyle izleyin.
Travel sisteminde observability yalnız HTTP latency grafiği değildir. Amaç, bir kullanıcının search request'inden confirmed booking, payment ve servicing sonucuna kadar tüm evidence zincirini takip edebilmektir.
Correlation chain
Travel transaction correlation chain
ID katmanları
Ayrı identity'leri koruyun:
- trace ID,
- search ID,
- offer ID/version,
- booking intent ID,
- booking attempt ID,
- payment attempt ID,
- canonical booking ID,
- provider booking reference,
- servicing attempt ID.
Birini diğerinin yerine kullanmayın.
Structured events
Her önemli transition için structured event üretin:
{
"event": "booking.state.changed",
"bookingId": "bk_42",
"bookingIntentId": "bi_123",
"from": "UNKNOWN",
"to": "CONFIRMED",
"source": "reconciliation",
"provider": "supplier-a",
"providerReference": "ABC123",
"traceId": "tr_..."
}PII event payload'a taşınmamalıdır.
Metrics hierarchy
Search
- supplier success/error,
- latency percentiles,
- partial result rate,
- offer count,
- mapping/dedup rate.
Offer / Reprice
- offer age,
- reprice mismatch,
- expiry/unavailable rate.
Booking
- confirmation rate,
- UNKNOWN rate,
- duplicate prevention,
- reconciliation age.
Payment
- authorize/capture/refund success,
- divergence count.
Servicing
- change/cancel/refund latency,
- UNKNOWN rate,
- manual intervention.
Trace spans
Provider call'larını ayrı span yapın:
- adapter,
- operation,
- provider,
- timeout budget,
- response classification.
Raw request/response'u trace içine koymayın; sensitive data leakage riski vardır.
Logs vs events vs metrics
- log: debugging detail,
- event: domain transition evidence,
- metric: aggregation/trend,
- trace: causal request chain.
Aynı bilgiyi kontrolsüz dört kez kopyalamak yerine purpose bazlı schema kullanın.
SLO
Sadece uptime değil business SLO tanımlayın:
- search completion,
- booking confirmation,
- UNKNOWN resolution,
- reconciliation age,
- servicing completion.
Alerting
Alert candidate:
- provider p95 latency spike,
- UNKNOWN backlog age,
- payment/booking divergence,
- duplicate booking signal,
- webhook signature failure,
- reconciliation queue growth.
Failure modes
- providerReference ile trace bulunamaması,
- PII'nin loglara düşmesi,
- high-cardinality metric label,
- trace sampling yüzünden failed booking'in kaybı,
- clock skew,
- inconsistent state names.
Production checklist
- canonical correlation IDs,
- structured domain events,
- provider spans,
- PII redaction,
- metric cardinality limits,
- SLOs,
- error/UNKNOWN biased trace retention,
- searchable provider reference,
- cross-service clock/time standard.
Benzer bir entegrasyon mu planlıyorsunuz?
Gereksinim, feed/API tasarımı ve production yaklaşımını birlikte değerlendirebiliriz.