feat: 행동 로그 Amplitude 전송 연동#255
Merged
Merged
Conversation
기존 analytics.log() 단일 진입점에서 RDB 적재·GA4 전송에 더해 Amplitude HTTP V2 API로도 fire-and-forget 전송하도록 추가. 미설정 시 no-op이며, 배포 환경변수(AMPLITUDE_ENABLED/API_KEY) 배선 포함. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Walkthrough배포 워크플로가 Amplitude 시크릿을 원격 실행 환경으로 전달하도록 바뀌었고, 원격 배포 스크립트는 ChangesAmplitude 배포 환경 전달
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 관련 이슈
🔍 작업 내용
실제 서비스 사용자의 클릭/이벤트 통계를 PM·디자이너가 대시보드에서 볼 수 있도록,
행동 로그를 Amplitude로도 전송하는 연동을 추가했습니다. (광고 집행 전 분석 툴 사전 설치 요청 대응)
기존 행동 로그 인프라(analytics.log() → RDB 적재 + GA4 전송)에 목적지 하나(Amplitude)를
fan-out으로 추가한 구조라, 이벤트를 심는 호출부 코드는 전혀 바뀌지 않습니다.
📝 변경 사항
AmplitudeProperties/AmplitudeClient추가 — GA4 클라이언트와 동일한 패턴(
@Async("analyticsExecutor")fire-and-forget, 미설정 시 no-op, 예외 전부 흡수)AnalyticsEventLogger에서amplitude.send(...)한 줄 fan-out 추가application.yml에amplitude.*설정 블록 추가release.yml(env/envs),scripts/deploy.sh(-e) 에 AMPLITUDE_* 추가AmplitudeClientTest단위 테스트 추가 (페이로드 변환 규칙 검증)⚙️ 배포 전 필요 작업 (코드 외)
AMPLITUDE_API_KEY= Amplitude 프로젝트 API KeyAMPLITUDE_ENABLED= true💬 리뷰어에게
uid.{id}로 보냅니다.Summary by CodeRabbit
New Features
AMPLITUDE_API_KEY가 설정된 경우에만 관련 추적 옵션이 활성화되며, 필요한 환경값이 자동으로 전달됩니다.Bug Fixes