OTel collector 중간 두고 Datadog + Sentry 동시 전송하는데 Sentry에서 trace 화면이 비어 있고 spans만 따로따로 보입니다.
# collector config
exporters:
datadog:
api: { key: ${DD_KEY} }
otlp/sentry:
endpoint: ingest.sentry.io:443
headers:
x-sentry-auth: "DSN=${SENTRY_DSN}"
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [datadog, otlp/sentry]
Datadog은 정상으로 보이는데 Sentry에서 trace_id 같은 spans도 별개 trace로 표시. trace 화면에서 "trace not found".
설정 어떻게 잡아야 하나요?
댓글 6
Sentry는 OTLP를 받지만 자체 trace context format(W3C trace context와 미세 차이)을 기대합니다. Datadog용 patch가 Sentry로 가는 trace_id를 일부 깨뜨리는 가능성이 큽니다.
해결 — separate pipeline
두 vendor에 같은 OTLP 보내되 pipeline을 별도. Sentry용 processor에서 필요한 attribute 추가.
또는 Sentry SDK 직접 사용
application code에서 Sentry SDK 명시 init → SDK가 OTel과 자동 호환. 이게 더 안정적인 패턴.
SDK 사용 시 trace context 자동 처리. OTel collector는 Datadog만, Sentry는 SDK 직결 — 이 패턴이 가장 깔끔합니다.
Sentry trace context는 b3 header도 호환되는데 W3C와 미세 차이 있습니다. collector에서 propagator 명시:
이거 추가하면 trace_id 그대로 유지됩니다.