PostHog / PostHog/posthog-android

Session replay: attach replay debug properties to events

Open
#640 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Session Replay
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.