Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the OpenTelemetry Collector image version and migrates the filtering configuration to use the new Semantic Conventions. Review feedback identified an invalid image version that needs correction and a potential runtime error in the OTTL filtering logic due to missing attributes, suggesting the use of default values to prevent filter failures.
|
|
||
| otel-collector: | ||
| image: otel/opentelemetry-collector-contrib:0.115.0 | ||
| image: otel/opentelemetry-collector-contrib:0.152.1 |
There was a problem hiding this comment.
| - 'IsMatch(attributes["url.path"], "^/actuator.*")' | ||
| - 'IsMatch(attributes["url.path"], "^/favicon.*")' | ||
| - 'attributes["http.response.status_code"] == 404 and not IsMatch(attributes["url.path"], "^/(api|swagger-ui|api-docs).*")' |
There was a problem hiding this comment.
OTTL(OpenTelemetry Transformation Language)의 IsMatch 함수는 첫 번째 인자가 nil일 경우 에러를 발생시킵니다. 모든 스팬이 url.path 속성을 가지고 있지는 않으므로(예: DB 호출이나 내부 작업 스팬), 속성이 누락된 경우를 대비해 ?? ""를 사용하여 빈 문자열을 기본값으로 제공하는 것이 안전합니다. error_mode: ignore 설정이 있더라도, 에러 발생 시 해당 필터 조건이 무시되어 결과적으로 노이즈 스팬이 필터링되지 않고 수집될 수 있습니다.
- 'IsMatch(attributes["url.path"] ?? "", "^/actuator.*")'
- 'IsMatch(attributes["url.path"] ?? "", "^/favicon.*")'
- '(attributes["http.response.status_code"] ?? 0) == 404 and not IsMatch(attributes["url.path"] ?? "", "^/(api|swagger-ui|api-docs).*")'
📢 기능 설명
필요시 실행결과 스크린샷 첨부
연결된 issue
연결된 issue를 자동을 닫기 위해 아래 {이슈넘버}를 입력해주세요.
close #{이슈넘버}
✅ 체크리스트