Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ services:
- catchtable-net

otel-collector:
image: otel/opentelemetry-collector-contrib:0.115.0
image: otel/opentelemetry-collector-contrib:0.152.1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

otel/opentelemetry-collector-contrib:0.152.1 이미지는 공식 Docker Hub 레포지토리에서 확인되지 않는 버전입니다. 현재 최신 안정 버전은 0.118.0 부근이며, 기존 0.115.0에서 업데이트를 의도하셨다면 버전을 다시 확인해 주시기 바랍니다. 잘못된 버전 설정은 배포 시 이미지 풀(pull) 실패로 인해 컨테이너가 실행되지 않는 원인이 됩니다.

    image: otel/opentelemetry-collector-contrib:0.118.0

container_name: catchtable-otel-collector
volumes:
- ./monitoring/otel-collector-config.yml:/etc/otelcol-contrib/config.yaml:ro
Expand Down
10 changes: 5 additions & 5 deletions monitoring/otel-collector-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ receivers:
endpoint: 0.0.0.0:4317

processors:
# OTel Semantic Conventions v1.23.0 이후 속성명 변경 (http.target → url.path 등) 호환 위해
# coalesce(??)로 구버전·신버전 속성 둘 다 시도.
# OTel Java Agent 2.x는 새 Semantic Conventions(url.path, http.response.status_code) 사용.
# error_mode: ignore로 attribute 누락 시 안전 처리.
filter/drop_noise:
error_mode: ignore
traces:
span:
- 'IsMatch(attributes["http.target"] ?? attributes["url.path"] ?? "", "^/actuator.*")'
- 'IsMatch(attributes["http.target"] ?? attributes["url.path"] ?? "", "^/favicon.*")'
- '(attributes["http.status_code"] ?? attributes["http.response.status_code"]) == 404 and not IsMatch(attributes["http.target"] ?? attributes["url.path"] ?? "", "^/(api|swagger-ui|api-docs).*")'
- '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).*")'
Comment on lines +14 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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).*")'


batch:
timeout: 5s
Expand Down
Loading