PostHog / PostHog/posthog-android
Session replay: attach replay debug properties to events
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 90
- Forks
- 49
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 61
Description
Part of the replay parity tracker PostHog/posthog#30889.
Problem
When replay is active, posthog-js attaches replay debug properties ($recording_status, $sdk_debug_replay_*) to every captured analytics event, so you can tell from an event whether replay was recording. The Android SDK attaches none: buildProperties() in PostHog.kt adds session/window/SDK-info props but no $recording_status / $sdk_debug_*.
Scope
- Attach the replay debug properties to captured (non-snapshot) events while recording, matching the web SDK keys.
Reference: posthog-js packages/browser/src/posthog-core.ts:1558 (extend(properties, this.sessionRecording.sdkDebugProperties)), session-recording.ts, and the keys in constants.ts.
Parity across SDKs
- Android: PostHog/posthog-android#640 (this issue)
- iOS: PostHog/posthog-ios#726
- React Native: PostHog/posthog-js#4185
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.
Research direction
Start in PostHog.kt, where buildProperties() currently adds session, window, and SDK information, and compare the referenced posthog-js session-recording implementation and constants. Trace how Android identifies active replay and captured non-snapshot events. Done means recording events include the matching $recording_status and $sdk_debug_* properties, while snapshot events do not.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100