Skip to content

chore: 네트워크 디버깅을 위한 Chucker 라이브러리 연동#286

Merged
easyhooon merged 2 commits intodevelopfrom
BOOK-520-chore/#285
Mar 9, 2026
Merged

chore: 네트워크 디버깅을 위한 Chucker 라이브러리 연동#286
easyhooon merged 2 commits intodevelopfrom
BOOK-520-chore/#285

Conversation

@easyhooon
Copy link
Contributor

@easyhooon easyhooon commented Mar 9, 2026

🔗 관련 이슈

📙 작업 설명

  • Chucker 라이브러리 연동 및 동작 확인

🧪 테스트 내역 (선택)

  • 주요 기능 정상 동작 확인
  • 브라우저/기기에서 동작 확인
  • 엣지 케이스 테스트 완료
  • 기존 기능 영향 없음

📸 스크린샷 또는 시연 영상 (선택)

기능 미리보기 기능 미리보기
API 호출 목록 상세 정보(Overview / Request / Response)

💬 추가 설명 or 리뷰 포인트 (선택)

  • 앱 c to c 단자 연결해서 LogCat으로 디버깅할 필요없이 핸드폰에 설치만 되어있어도 알림, launcher shortcut등으로 접근해서 확인할 수 있는 라이브러리인 Chucker를 연동했습니다.
  • release 빌드시 no-op 로 설정하여, 라이브러리 동작 비활성화되도록 하였습니다. debug앱 디버깅용

Summary by CodeRabbit

릴리스 노트

  • 릴리스

    • 앱 버전이 1.3.0에서 1.4.0으로 업그레이드되었습니다.
  • 개선 사항

    • 네트워크 요청 처리 및 성능 모니터링 인프라가 개선되었습니다.

@coderabbitai
Copy link

coderabbitai bot commented Mar 9, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5dfb55e6-9975-4ac5-acb3-3aa22ccc932d

📥 Commits

Reviewing files that changed from the base of the PR and between a367d46 and 43154fc.

📒 Files selected for processing (1)
  • gradle/libs.versions.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • gradle/libs.versions.toml

Walkthrough

Chucker 디버깅 라이브러리를 프로젝트에 추가하고 DI 모듈에서 ChuckerInterceptor를 제공해 OkHttpClient 빌드 파이프라인에 삽입했습니다. 또한 Gradle 버전 관리 파일과 모듈 빌드스크립트에 debug/release 의존성을 선언하고 앱 버전 정보를 올렸습니다.

Changes

Cohort / File(s) Summary
버전/라이브러리 선언
gradle/libs.versions.toml
앱 버전(1.3.0→1.4.0, code 9→11) 업데이트 및 Chucker 버전(4.3.1)과 chucker, chucker-no-op 라이브러 항목 추가
모듈 빌드스크립트
core/network/build.gradle.kts
debugImplementation(libs.chucker)releaseImplementation(libs.chucker-no-op) 의존성 추가
네트워크 DI / 클라이언트 구성
core/network/src/main/kotlin/.../NetworkGraph.kt
provideChuckerInterceptor(@ApplicationContext context: Context): ChuckerInterceptor 추가 및 provideOkHttpClient(..., chuckerInterceptor: ChuckerInterceptor)에 ChuckerInterceptor를 OkHttpClient 빌더에 연결

Sequence Diagram(s)

sequenceDiagram
    participant App as 클라이언트
    participant Retrofit as Retrofit
    participant OkHttp as OkHttpClient
    participant Chucker as ChuckerInterceptor
    participant Server as 외부서버

    App->>Retrofit: API 호출
    Retrofit->>OkHttp: 요청 전달
    OkHttp->>Chucker: 요청/응답 가로채기
    Chucker-->>OkHttp: 검사용 데이터 로깅/표시
    OkHttp->>Server: 네트워크 요청 전송
    Server-->>OkHttp: 응답 반환
    OkHttp->>Retrofit: 응답 전달
    Retrofit-->>App: 결과 반환
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

개요

Chucker 네트워크 디버깅 라이브러리를 프로젝트에 추가하고 OkHttpClient에 통합합니다. 디버그 빌드에서는 전체 기능을 사용하고 릴리스 빌드에서는 no-op 버전을 사용하도록 구성했습니다.

변경 사항

코호트 / 파일 요약
Chucker 의존성 선언
gradle/libs.versions.toml
Chucker 라이브러리 버전 4.3.1을 추가하고, 디버그용(chucker)과 릴리스용(chucker-no-op) 두 가지 라이브러리 선언 추가. 앱 버전명/코드 업데이트(1.4.0 / 11).
Chucker 빌드 의존성
core/network/build.gradle.kts
debugImplementation과 releaseImplementation에 각각 Chucker 라이브러리 의존성 추가.
네트워크 DI 설정
core/network/src/main/kotlin/com/ninecraft/booket/core/network/di/NetworkGraph.kt
ChuckerInterceptor 제공 함수 추가 및 OkHttpClient 빌더에 Chucker 인터셉터 연동.

토끼의 한마디

🐰 코드 속 작은 창문이 열렸네,
요청과 응답이 춤추는 밤이에요.
Chucker 한 줌으로 모든 게 보여요,
디버깅 길라잡이, 토끼가 환영해요! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 Chucker 라이브러리 연동이라는 주요 변경사항을 명확하게 요약하고 있습니다.
Linked Issues check ✅ Passed Pull request가 연결된 이슈 #285의 모든 코딩 관련 요구사항을 충족합니다: Chucker 라이브러리 의존성 추가 [#285], Retrofit ChuckerInterceptor 연동 [#285].
Out of Scope Changes check ✅ Passed 모든 변경사항이 Chucker 라이브러리 연동의 범위 내에 있으며, 앱 버전 업데이트는 라이브러리 통합에 동반되는 정상적인 변경입니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch BOOK-520-chore/#285

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@core/network/src/main/kotlin/com/ninecraft/booket/core/network/di/NetworkGraph.kt`:
- Around line 89-109: provideChuckerInterceptor 및 OkHttp 클라이언트 설정에서
ChuckerInterceptor를 기본 생성자로 사용해 민감 헤더가 수집되고 있으니, provideChuckerInterceptor에서
ChuckerInterceptor(context) 대신 ChuckerInterceptor.Builder(context)로 생성하고
addHeaderToMask("Authorization"), addHeaderToMask("Cookie"),
addHeaderToMask("Set-Cookie") 등을 호출해 인증 관련 헤더를 마스킹하도록 변경한 뒤 provideOkHttpClient의
인자로 넘기도록 수정하세요; 대상 식별자는 provideChuckerInterceptor, provideOkHttpClient,
ChuckerInterceptor(context)/ChuckerInterceptor.Builder를 참고하세요.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 91b29e4c-74a3-4433-96f7-b8e530baca2f

📥 Commits

Reviewing files that changed from the base of the PR and between 6226536 and a367d46.

📒 Files selected for processing (3)
  • core/network/build.gradle.kts
  • core/network/src/main/kotlin/com/ninecraft/booket/core/network/di/NetworkGraph.kt
  • gradle/libs.versions.toml

Comment on lines +89 to +109
@Provides
fun provideChuckerInterceptor(
@ApplicationContext context: Context,
): ChuckerInterceptor {
return ChuckerInterceptor(context)
}

@Provides
fun provideOkHttpClient(
httpLoggingInterceptor: HttpLoggingInterceptor,
tokenInterceptor: TokenInterceptor,
tokenAuthenticator: TokenAuthenticator,
chuckerInterceptor: ChuckerInterceptor,
): OkHttpClient {
return OkHttpClient.Builder()
.connectTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.readTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.writeTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.addInterceptor(tokenInterceptor)
.authenticator(tokenAuthenticator)
.addInterceptor(chuckerInterceptor)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Chucker 4.3.1 ChuckerInterceptor Builder redactHeaders Authorization Cookie Set-Cookie Android OkHttp

💡 Result:

In Chucker, header redaction is configured on ChuckerInterceptor.Builder via redactHeaders(vararg String)—so to hide auth/cookie values you can do:

val chucker = ChuckerInterceptor.Builder(context)
  .redactHeaders("Authorization", "Cookie", "Set-Cookie")
  .build()

val okHttp = OkHttpClient.Builder()
  .addInterceptor(chucker)
  .build()

Chucker will replace the values of those headers with ** in the Chucker UI/logged transactions. [1]

Also, I couldn’t find a Chucker 4.3.1 artifact published to common indexes; the latest listed in early 2026 appears to be 4.3.0. [2]

Sources: [1] [2]


🏁 Script executed:

# Find build configuration files to identify Chucker version
find . -type f \( -name "*.gradle" -o -name "*.gradle.kts" -o -name "*.toml" \) | head -20

Repository: YAPP-Github/Reed-Android

Length of output: 696


🏁 Script executed:

# Search for Chucker dependency declaration
rg "chucker|Chucker" -t gradle -t kotlin | head -30

Repository: YAPP-Github/Reed-Android

Length of output: 959


🏁 Script executed:

# Read the actual NetworkGraph.kt file
cat -n core/network/src/main/kotlin/com/ninecraft/booket/core/network/di/NetworkGraph.kt | sed -n '80,120p'

Repository: YAPP-Github/Reed-Android

Length of output: 1676


🏁 Script executed:

# Find version catalog/libs definition
find . -type f -name "*.versions.toml" -o -name "libs.gradle.kts"

Repository: YAPP-Github/Reed-Android

Length of output: 95


🏁 Script executed:

# Search for Chucker version definition in gradle files
rg "chucker.*=" -A 2 -B 2 --type gradle --type kotlin

Repository: YAPP-Github/Reed-Android

Length of output: 50


🏁 Script executed:

# Read the version catalog
cat gradle/libs.versions.toml

Repository: YAPP-Github/Reed-Android

Length of output: 11177


인증 헤더는 Chucker 수집 대상에서 제외해 주세요.

현재 코드는 ChuckerInterceptor(context) 기본 생성자로 생성되어 Authorization, Cookie, Set-Cookie 같은 민감 헤더가 그대로 저장될 수 있습니다. 디버그 빌드여도 기기에서 열람·공유 가능한 네트워크 캡처가 남기 때문에 보안/프라이버시 관점에서 위험합니다. 93번 줄에서 Builder로 변경하면서 인증 관련 헤더를 마스킹하세요.

민감 헤더 마스킹 예시
     fun provideChuckerInterceptor(
         `@ApplicationContext` context: Context,
     ): ChuckerInterceptor {
-        return ChuckerInterceptor(context)
+        return ChuckerInterceptor.Builder(context)
+            .redactHeaders("Authorization", "Cookie", "Set-Cookie")
+            .build()
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
@Provides
fun provideChuckerInterceptor(
@ApplicationContext context: Context,
): ChuckerInterceptor {
return ChuckerInterceptor(context)
}
@Provides
fun provideOkHttpClient(
httpLoggingInterceptor: HttpLoggingInterceptor,
tokenInterceptor: TokenInterceptor,
tokenAuthenticator: TokenAuthenticator,
chuckerInterceptor: ChuckerInterceptor,
): OkHttpClient {
return OkHttpClient.Builder()
.connectTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.readTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.writeTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.addInterceptor(tokenInterceptor)
.authenticator(tokenAuthenticator)
.addInterceptor(chuckerInterceptor)
`@Provides`
fun provideChuckerInterceptor(
`@ApplicationContext` context: Context,
): ChuckerInterceptor {
return ChuckerInterceptor.Builder(context)
.redactHeaders("Authorization", "Cookie", "Set-Cookie")
.build()
}
`@Provides`
fun provideOkHttpClient(
httpLoggingInterceptor: HttpLoggingInterceptor,
tokenInterceptor: TokenInterceptor,
tokenAuthenticator: TokenAuthenticator,
chuckerInterceptor: ChuckerInterceptor,
): OkHttpClient {
return OkHttpClient.Builder()
.connectTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.readTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.writeTimeout(MaxTimeoutMillis, TimeUnit.MILLISECONDS)
.addInterceptor(tokenInterceptor)
.authenticator(tokenAuthenticator)
.addInterceptor(chuckerInterceptor)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@core/network/src/main/kotlin/com/ninecraft/booket/core/network/di/NetworkGraph.kt`
around lines 89 - 109, provideChuckerInterceptor 및 OkHttp 클라이언트 설정에서
ChuckerInterceptor를 기본 생성자로 사용해 민감 헤더가 수집되고 있으니, provideChuckerInterceptor에서
ChuckerInterceptor(context) 대신 ChuckerInterceptor.Builder(context)로 생성하고
addHeaderToMask("Authorization"), addHeaderToMask("Cookie"),
addHeaderToMask("Set-Cookie") 등을 호출해 인증 관련 헤더를 마스킹하도록 변경한 뒤 provideOkHttpClient의
인자로 넘기도록 수정하세요; 대상 식별자는 provideChuckerInterceptor, provideOkHttpClient,
ChuckerInterceptor(context)/ChuckerInterceptor.Builder를 참고하세요.

versionName 1.3.0 -> 1.4.0
versionCode 9 -> 11
@easyhooon easyhooon merged commit 74a8ce9 into develop Mar 9, 2026
4 checks passed
@easyhooon easyhooon deleted the BOOK-520-chore/#285 branch March 9, 2026 16:19
@easyhooon easyhooon changed the title [BOOK-520] chore: 네트워크 디버깅을 위한 Chucker 라이브러리 연동 chore: 네트워크 디버깅을 위한 Chucker 라이브러리 연동 Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BOOK-520/chore] 네트워크 디버깅을 위한 Chucker 라이브러리 연동

1 participant