부모 티켓
1개 티켓

백로그

0
티켓 없음

할 일

0
티켓 없음

진행 중

0
티켓 없음

리뷰

1
낮음 7103c210
서브 티켓 [P6] 9WAY 연동 API + 동기화

9WAY 연동 + Sentry 모니터링 — OAuth + SyncService + Sentry initializer + 테스트

## 목표 2개 티켓 동시 구현: 9WAY 연동 API + Sentry 에러 모니터링. ## 작업 1: 9WAY 연동 API + 동기화 ### 현재 상태 - Auth::NinewaysController 스텁 (redirect, callback) — allow_unauthenticated_access - My::NinewaysSyncsController 스텁 (create) - Api::V1::NinewaysController 스텁 (webhook) — allow_unauthenticated_access + skip_forgery_protection - User: nineways_uid, nineways_strength_type, nineways_dna_traits(jsonb), nineways_synced_at ### 구현 사항 1. **Nineways::SyncService** (app/services/nineways/sync_service.rb) - 9WAY API 호출 → User 필드 업데이트 (strength_type, dna_traits, synced_at) - DI 패턴, 에러 처리 2. **Auth::NinewaysController** - redirect: 9WAY OAuth URL로 리다이렉트 - callback: code → token → user info → User 업데이트 3. **My::NinewaysSyncsController#create** - 수동 동기화 버튼 → SyncService 호출 4. **Api::V1::NinewaysController#webhook** - 9WAY 웹훅 수신 → User 업데이트 5. **NinewaysSyncAllJob** (app/jobs/nineways_sync_all_job.rb) - nineways_uid가 있는 모든 유저 동기화 6. **테스트**: 서비스 + 컨트롤러 (API mock) ## 작업 2: Sentry 에러 모니터링 ### 구현 사항 1. **config/initializers/sentry.rb** ```ruby Sentry.init do |config| config.dsn = ENV["SENTRY_DSN"] config.breadcrumbs_logger = [:active_support_logger, :http_logger] config.traces_sample_rate = 0.1 config.environment = Rails.env config.enabled_environments = %w[production staging] end ``` 2. **ApplicationController에 Sentry 유저 컨텍스트** ```ruby before_action :set_sentry_context def set_sentry_context Sentry.set_user(id: Current.user&.id, email: Current.user&.email_address) if Current.user end ``` 3. **테스트**: initializer 로드 확인 ### ⚠️ 주의 - services/nineways/ + auth/ + api/ + config/initializers/ 범위 (developer-2는 ahoy 작업 중) - 9WAY API URL: ENV["NINEWAYS_API_URL"], ENV["NINEWAYS_API_KEY"] - sentry-ruby, sentry-rails gem은 Gemfile에 이미 포함 ## 대시보드 기록 (MCP) - 시작: `AddActivityLogTool` (ticket_id: "c20ae5ba-7f13-4d5e-8547-dd5d4dee521e", message: "9WAY + Sentry 시작") - 완료: `AddActivityLogTool` (message: "9WAY + Sentry 완료", details 필수) ## 완료 절차 1. `UpdateTicketStatusTool`로 두 서브 티켓 모두 → `review` 2. `AddActivityLogTool`로 완료 기록 3. `SendMessage`로 팀리드에게 보고 (summary: "9WAY + Sentry 구현 완료") ⚠️ SendMessage 필수!

D
developer-1
25 days

완료 (30일)

0
티켓 없음