PostHog / PostHog/posthog-android

Bundle source code context lines with Android stack frames

Open
#634 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement feat/error-tracking
Dominant language
Kotlin
Stars
90
Forks
49
Avg merge
2d 5h
Merged PRs (30d)
61

Description

Extracted from PostHog/posthog#43012.

Problem

Captured frames carry only module, function, lineno, and filename (ThrowableCoercer.kt builds them without any surrounding source), so the error UI can't show the lines around a frame.

Scope

  • Emit pre_context, context_line, and post_context for in-app frames.
  • Bundle and upload the source from the Gradle plugin, teach posthog-cli to carry it, and render it on the backend.

Components: SDK, Gradle plugin, posthog-cli, backend. iOS and Flutter-iOS already have source context.

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 with ThrowableCoercer.kt to trace how Android frames are built, then inspect the SDK, Gradle plugin, posthog-cli, and backend components named in the scope. Done means in-app frames carry pre_context, context_line, and post_context, with source bundled, uploaded, transported, and rendered across those components.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
backend, build-system, cli, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.