Conversation
There was a problem hiding this comment.
Code Review
This pull request increases the memory limit for a service in the production Docker Compose configuration and introduces filters in the OpenTelemetry collector to exclude Kafka background protocol traces. Feedback highlights that the memory increase to 400M may cause the total resource limits to exceed the host's 2GB capacity, potentially leading to system instability. It is also suggested to refactor the Kafka trace filters using a regular expression for better maintainability and to include the 'LeaveGroup' span in the exclusion list.
| resources: | ||
| limits: | ||
| memory: 250M | ||
| memory: 400M |
There was a problem hiding this comment.
Jaeger 서비스의 메모리 제한을 400M으로 증설하셨습니다. 하지만 파일 상단(10번 라인) 주석에 명시된 t3.small 인스턴스의 전체 메모리는 2GB(약 2048MB)입니다. 현재 설정된 모든 서비스의 제한(limits) 합계는 약 2,580MB로, 호스트의 물리 메모리 용량을 초과하고 있습니다. 이는 서비스 부하 시 OOM Killer에 의해 프로세스가 강제 종료되는 등 시스템 전체의 불안정성을 초래할 수 있습니다. 특히 이번 PR에서 Kafka 백그라운드 트레이스 필터링을 적용하여 Jaeger로 유입되는 데이터 양이 줄어들 것으로 예상되므로, 메모리 제한을 늘리는 대신 기존의 250M를 유지하거나 다른 서비스의 리소스를 조정하는 방향을 검토해 주시기 바랍니다.
| - 'attributes["http.response.status_code"] == 404 and not IsMatch(attributes["url.path"], "^/(api|swagger-ui|api-docs).*")' | ||
| # Kafka 백그라운드 프로토콜 trace 차단 (consumer poll/heartbeat/rebalance 등). | ||
| # Producer.send와 @KafkaListener의 실제 메시지 처리 trace는 그대로 보존 — 부하 테스트 분석에 필요. | ||
| - 'name == "Heartbeat" or name == "OffsetCommit" or name == "JoinGroup" or name == "SyncGroup" or name == "FindCoordinator" or name == "Coordinator Discover" or name == "Fetch"' |
There was a problem hiding this comment.
Kafka의 여러 백그라운드 스팬 이름을 개별적으로 비교하는 대신, OTTL(OpenTelemetry Transformation Language)의 IsMatch 함수와 정규표현식을 사용하면 설정이 훨씬 간결해지고 유지보수가 용이해집니다. 또한, 컨슈머가 그룹을 나갈 때 발생하는 LeaveGroup 스팬도 필터링 대상에 포함하는 것이 노이즈 제거 측면에서 좋습니다.
- 'IsMatch(name, "^(Heartbeat|OffsetCommit|JoinGroup|SyncGroup|LeaveGroup|FindCoordinator|Coordinator Discover|Fetch)$")'
📢 기능 설명
필요시 실행결과 스크린샷 첨부
연결된 issue
연결된 issue를 자동을 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #{이슈넘버}
✅ 체크리스트