로그·메트릭·트레이스 연결 경로

로그·메트릭·트레이스 연결 경로 An architecture diagram generated by Archify. 애플리케이션 · SDK · JSON 로그 · /metrics · Architecture component 애플리케이션 SDK · JSON 로그 · /metrics OTel Collector · 트레이스 파이프라인 · Architecture component OTel Collector 트레이스 파이프라인 Grafana Alloy · Kubernetes 로그 수집 · Architecture component Grafana Alloy Kubernetes 로그 수집 Tempo · 트레이스 저장·검색 · Architecture component Tempo 트레이스 저장·검색 Loki · 로그 저장·검색 · Architecture component Loki 로그 저장·검색 Prometheus · 메트릭·exemplar 저장 · Architecture component Prometheus 메트릭·exemplar 저장 Grafana · 데이터소스 링크·Explore · Architecture component Grafana 데이터소스 링크·Explore OTLP traces OTLP JSON logs scrape 응답 TraceQL LogQL PromQL Legend 프런트엔드 백엔드 서비스 데이터 저장소

이 장의 실제 전송 경로

  • • 트레이스만 OTLP Collector를 통과한다
  • • stdout 로그는 SDK trace exporter가 자동 수집하지 않는다
  • • 메트릭은 OpenMetrics scrape와 exemplar 저장 설정이 필요하다

동일한 식별자와 이름

  • • trace_id는 로그 필드와 exemplar에 같은 형식으로 기록한다
  • • resource service.name과 Loki/Prometheus label 매핑을 맞춘다
  • • trace_id를 일반 metric/stream label로 만들지 않는다

연결의 범위

  • • Tempo가 로그·메트릭을 자동 결합하는 허브는 아니다
  • • Grafana에 실제 데이터소스 UID와 링크를 설정한다
  • • 샘플링·보존·누락으로 해당 트레이스가 없을 수도 있다