Skip to content

chore: Alloy v1.21.0 도입 및 filelog 정렬 통일 - #268

Open
geonusp wants to merge 5 commits into
mainfrom
chore/alloy-v1.21.0-adoption-direct
Open

geonusp wants to merge 5 commits into
mainfrom
chore/alloy-v1.21.0-adoption-direct

Conversation

@geonusp

@geonusp geonusp commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

🧰 Chore PR

🔗 GitHub Issue


🧩 한눈에 요약

무엇을 변경했나?

  • 인프라
  • 설정파일
  • 빌드 파일
  • CI
  • 의존성
  • 런타임/비즈니스 로직 리팩터링 없음 (있으면 Refactor PR 템플릿 사용)

왜 필요한가?

  • Alloy v1.21.0에 포함된 filelog 정렬 수정에 맞춰 기존 우회 설정을 제거하고, receiver의 정렬 설정을 직접 사용하도록 변경했다.

범위

  • Included: Alloy 이미지 v1.21.0 업그레이드, filelog 설정 이전, 회전 로그 순서 검증 추가, 로컬 민감 파일 ignore 규칙 추가, CI 컨테이너가 임시 Alloy 설정 파일을 읽도록 권한 수정
  • Not included: WSL Docker Desktop에서 로그 파일이 Alloy에 노출되지 않는 문제의 원인 확인([bug] WSL에서 Docker 로그 파일 마운트가 비어 Alloy 수집 검증 실패 #267), 운영 서버 적용

🧪 테스트 / 검증

로컬

  • Command: python deploy/observability/scripts/verify-log-pipeline.py
  • Result: PowerShell에서 전체 검증 PASS. 권한 수정 후 WSL에서는 Alloy가 설정을 읽고 기동하지만, Docker -> Alloy -> Loki 단계는 여전히 타임아웃되어 #267에서 조사 중이다.

CI

Smoke / 수동 검증

테스트 공백

  • WSL 실행에서만 첫 Docker 로그 수집 단계가 실패한다. 원인은 미확정이며 #267에서 조사한다.

🧭 영향 범위

  • 설정/환경변수 변경 없음
  • 설정/환경변수 변경 있음 (항목: Alloy 이미지 버전 및 filelog receiver 설정)
  • CI/빌드 파이프라인 영향 없음
  • CI/빌드 파이프라인 영향 있음
  • 의존성 변경 없음
  • 의존성 변경 있음 (Grafana Alloy v1.19.2 → v1.21.0)

⚠️ 리스크 & 롤백

리스크

롤백

  • 단순 revert로 가능
  • 버전 pin/되돌리기 필요 (대상: Alloy 이미지와 filelog 설정, 방법: 기존 v1.19.2 설정으로 revert)
  • 배포 롤백(이전 태그/이미지) 가능

💬 리뷰 가이드

- Alloy 앱 이미지 태그를 v1.21.0으로 고정

- 검증: v1.21.0 이미지 확인 및 Alloy 설정 검증 통과
- Alloy filelog 정렬을 receiver 수준 ordering_criteria로 적용

- 파일 수집 순서를 oldest-to-newest 기준으로 고정

- 검증: Alloy v1.21.0 설정 검증 및 파이프라인 테스트 통과
- 임시 file exporter로 Alloy가 내보낸 로그 순서를 직접 확인

- 110개 회전 로그가 오래된 순서대로 전달되는지 검증

- 검증: Alloy 로그 파이프라인 통합 테스트 통과
- PEM 키와 Firebase Admin SDK 자격증명 파일을 Git 제외 대상으로 지정
- Terraform plan/state 및 로컬 API 키 백업 파일 제외
- 검증: git check-ignore로 대상 백업 파일 제외 확인
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 77e43c89-18e3-45f8-8ccd-66257a643ec4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@geonusp geonusp self-assigned this Oct 19, 2026
@geonusp
geonusp marked this pull request as draft October 19, 2026 20:31
- 임시 Alloy 설정 파일을 컨테이너에서도 읽을 수 있도록 권한을 0644로 설정

- compose 설정 파일의 0600 권한과 Alloy capability 제한은 유지

- Python 문법 및 diff 검사 통과; WSL E2E는 #267과 같은 Docker 로그 수집 타임아웃으로 종료
@geonusp
geonusp marked this pull request as ready for review October 20, 2026 07:23
@geonusp geonusp added the fix label Oct 20, 2026

@PHJ2000 PHJ2000 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

확인했습니다. 기존 버전에서 업그레이드할 때 이미 수집한 로그를 다시 읽는 문제가 있어 인라인으로 남겼습니다. 해당 부분 보완 부탁드립니다.

suggestion: deploy/observability/README.md에 아직 v1.19.2와 file_input 우회 설정을 사용한다고 적혀 있습니다. 이번 변경에 맞춰 문서도 갱신해 주세요.

Comment on lines +14 to +16
include = ["/var/log/docker/*/*-json.log", "/var/log/docker/*/*-json.log.[1-4]"]
storage = otelcol.storage.file.docker.handler
start_at = "beginning"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

block : 기존 버전에서 업그레이드할 때 저장된 읽기 위치를 이어받도록 보완해 주세요.

기존 file_input을 제거하면서 입력기 ID가 docker_files에서 기본값인 file_input으로 바뀌어, 같은 볼륨을 사용해도 기존 읽기 상태를 찾지 못합니다. 실제로 v1.19.2에서 로그를 수집한 뒤 파일과 상태 저장 디렉터리를 유지한 채 이번 설정으로 전환하니, 이미 수집한 로그를 처음부터 다시 읽고 출력했습니다.

현재 테스트는 새 버전에서의 재시작만 확인하므로, 기존 버전에서 수집한 상태로 업그레이드해도 이전 로그를 다시 보내지 않는지 검증하는 테스트도 추가해 주세요.

@PHJ2000

PHJ2000 commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

참고: 이번 버전 변경을 살펴보다가 흥미로운 의존성 관리 방식을 발견해서 공유합니다.

Alloy가 내부적으로 사용하는 Loki 라이브러리를 v3.7.8 같은 정식 버전 대신 특정 커밋(5cf8c23a258d)으로 고정하고 있더라고요. 필요한 호환성 수정이 정식 릴리스에는 아직 없어서, 그 수정이 포함된 브랜치의 특정 시점을 가져다 쓰는 방식이라고 합니다.

브랜치의 최신 코드를 계속 따라가는 게 아니라 커밋을 고정해서 항상 같은 코드로 빌드되게 한다는 점이 신기했습니다. Go에서는 이런 버전 표기를 pseudo-version이라고 하네요.

관련 upstream 설명

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants