Skip to content

Feature/analytics ga4 forwarding#244

Merged
Junhyukkkk merged 3 commits into
developfrom
feature/analytics-ga4-forwarding
Jun 21, 2026
Merged

Feature/analytics ga4 forwarding#244
Junhyukkkk merged 3 commits into
developfrom
feature/analytics-ga4-forwarding

Conversation

@Junhyukkkk

Copy link
Copy Markdown
Member

📌 관련 이슈

  • closes #

🔍 작업 내용

PM·디자이너가 행동 로그를 GA4 대시보드에서 직접 볼 수 있도록, 기존 analytics_events RDB 적재는 그대로 두고 같은 이벤트를 GA4(Measurement
Protocol)로도 전송
하는 이중 write를 추가했습니다.

모든 이벤트가 이미 AnalyticsEventLogger.log() 한 곳을 통과하므로, 거기에 전송 한 줄을 더해 23종 이벤트 전부 개별 수정 없이 GA4로 흘러갑니다.
GA 전송은 외부 HTTP라 @Async fire-and-forget으로 분리해, 실패·지연이 RDB 적재나 요청 처리에 영향을 주지 않습니다(기존 "예외 흡수" 철학 유지).
자격증명 미설정 시 no-op이라, 시크릿을 넣기 전까지는 동작이 전혀 바뀌지 않습니다.

📝 변경 사항

  • GA4 전송 추가
    • GoogleAnalyticsClient 신규 — GA4 Measurement Protocol(HTTP POST) 전송. @Async("analyticsExecutor") fire-and-forget, 모든 예외 흡수, 미설정
      시 no-op, 2초 타임아웃
    • GoogleAnalyticsProperties 신규 — google.analytics.*(enabled/measurementId/apiSecret/endpoint). 셋 다 채워졌을 때만 실제 전송
    • AnalyticsEventLogger — RDB 적재 직후 googleAnalytics.send(...) 호출(resolve한 값 재사용)
    • AsyncConfiganalyticsExecutor 빈 추가(큐 초과 시 DiscardPolicy, 분석 데이터라 유실 허용)
    • application.ymlgoogle.analytics 설정 블록(전부 기본값 → 미설정도 정상 빌드/구동)
  • 운영 배선
    • release.ymlGA_ENABLED/GA_MEASUREMENT_ID/GA_API_SECRETenv: + envs:로 EC2까지 전달
    • deploy.sh — Gemini 블록과 동일하게 GA_MEASUREMENT_ID가 있을 때만 docker run -e로 주입(없으면 안전하게 무시)
  • 테스트
    • GoogleAnalyticsClientTest 신규 — 페이로드 변환 규칙 검증(client_id 우선순위, user_id 문자열화, params 병합, null 제외·100자 절단)

RDB 적재와 동시에 같은 이벤트를 GA4로 전송(이중 write). @async
  fire-and-forget, 예외 흡수, 미설정 시 no-op.
GitHub Secrets(GA_ENABLED/GA_MEASUREMENT_ID/GA_API_SECRET) → release.yml → deploy.sh 조건부 -e
  주입(GA_MEASUREMENT_ID 있을 때만).
@Junhyukkkk Junhyukkkk self-assigned this Jun 21, 2026
@coderabbitai

coderabbitai Bot commented Jun 21, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@Junhyukkkk, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 42 minutes and 15 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 60537adc-a4c4-4bab-a7bc-304c01b47596

📥 Commits

Reviewing files that changed from the base of the PR and between 024f680 and 1423218.

📒 Files selected for processing (8)
  • .github/workflows/release.yml
  • scripts/deploy.sh
  • src/main/java/com/ject/vs/analytics/AnalyticsEventLogger.java
  • src/main/java/com/ject/vs/analytics/GoogleAnalyticsClient.java
  • src/main/java/com/ject/vs/analytics/GoogleAnalyticsProperties.java
  • src/main/java/com/ject/vs/config/AsyncConfig.java
  • src/main/resources/application.yml
  • src/unitTest/java/com/ject/vs/analytics/GoogleAnalyticsClientTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/analytics-ga4-forwarding

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 and usage tips.

@github-actions

Copy link
Copy Markdown

빌드 성공
배포 준비 완료!

@Junhyukkkk Junhyukkkk merged commit 289d5f4 into develop Jun 21, 2026
6 checks passed
@Junhyukkkk Junhyukkkk deleted the feature/analytics-ga4-forwarding branch June 21, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant