Gate OkHttp body capture on active Session Replay
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- kotlin
- Domain
- networking
Research direction
Start in sentry-okhttp/src/main/java/io/sentry/okhttp/SentryOkHttpInterceptor.kt, reviewing the capture condition around lines 112-118 and the peekBody call around lines 318-327. Confirm that body capture only occurs while Session Replay is recording or buffering, and that known streaming responses such as text/event-stream are skipped before peekBody().
Written by the indexing model from the issue text.
Description
OkHttp captures allowlisted response bodies even when Session Replay is neither recording nor buffering. For SSE responses, peekBody(150KB + 1) can delay events until the connection closes.
Gate body capture on active Session Replay. Skip known streaming content types, at minimum text/event-stream, before calling peekBody().
Captured body contents are only used for Session Replay; spans, breadcrumbs, and failed-request events use sizes, status, and headers rather than body contents.
Relevant implementation: capture condition and peekBody call.
- Dominant language
- Kotlin
- Stars
- 1.4k
- Forks
- 478
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 70
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/sentry-java
-
Feature Java Platform: Java Spans
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-java#5984 · 1 comment ·
-
Android Task Traces
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-java#5376 · 1 comment ·
-
Android Docs Errors
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
getsentry/sentry-java#5375 · 1 comment ·
-
Android good first issue Task User Feedbacks
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
getsentry/sentry-java#5354 · 1 comment ·
-
Android Platform: Java
Difficulty 3/5 1-2 days Newbie friendliness 78/100
getsentry/sentry-java#6134 · 1 comment ·
All issues in getsentry/sentry-java
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
helsemelding-json-schema json-schema-core
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
contributor: external needs review
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100