---
title: "Travel Observability, Trace ve Correlation Model"
description: "Search'ten booking ve servicing'e kadar travel transaction'larını correlation ID, distributed trace, metrics ve structured event modeliyle izleyin."
slug: "travel-observability-trace-correlation-model"
translationKey: "architecture-travel-observability-trace-correlation"
locale: "tr"
type: "guide"
category: "architecture"
tags: ["observability","trace","correlation","metrics","booking","travel"]
publishedAt: "2026-09-27"
updatedAt: "2026-09-27"
reviewedAt: "2026-09-27"
technicalVerifiedAt: "2026-09-27"
codeExampleStatus: "illustrative"
---

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

```mermaid
%% title: Travel transaction correlation chain
%% description: Search, offer, booking, payment ve provider execution kimliklerinin tek trace zincirinde bağlanması.
flowchart LR
  A[searchId] --> B[offerId / offerVersion]
  B --> C[bookingIntentId]
  C --> D[bookingAttemptId]
  C --> E[paymentAttemptId]
  D --> F[providerReference]
  F --> G[bookingId]
  G --> H[servicingAttemptId]
```

## 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:

```json
{
  "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.
