feat(server): expose in-app frame config and captureException options - #670
Draft
cat-ph wants to merge 2 commits into
Draft
feat(server): expose in-app frame config and captureException options#670cat-ph wants to merge 2 commits into
cat-ph wants to merge 2 commits into
Conversation
This was referenced Aug 3, 2026
cat-ph
force-pushed
the
cat/java-et-server-config
branch
from
August 3, 2026 23:03
b4e866a to
ffe3132
Compare
5 tasks
cat-ph
force-pushed
the
cat/java-et-server-config
branch
from
August 5, 2026 11:41
ffe3132 to
2174c3c
Compare
cat-ph
force-pushed
the
cat/java-et-coercer
branch
from
August 5, 2026 11:41
7e81e8d to
71672e6
Compare
cat-ph
force-pushed
the
cat/java-et-server-config
branch
from
August 7, 2026 21:54
2174c3c to
9c02cbf
Compare
- PostHogConfig.inAppIncludes/inAppExcludes control in_app frame classification (prefix match, excludes win); inAppExcludes defaults to DEFAULT_IN_APP_EXCLUDES (JDK/Kotlin/framework noise) so zero-config users get a your-code vs framework split out of the box. - New captureException(exception[, distinctId], options) overloads with the same option-merging semantics as capture(..., options): custom props, $groups, $set/$set_once, timestamp, and flag enrichment via snapshot or appendFeatureFlags; reserved props ($exception_level, ...) overridable via options properties; request-context resolution and personless fallback unchanged.
cat-ph
force-pushed
the
cat/java-et-server-config
branch
from
August 7, 2026 22:21
9c02cbf to
d6d6b47
Compare
cat-ph
force-pushed
the
cat/java-et-coercer
branch
from
August 7, 2026 22:21
32939f8 to
4c2b895
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
💡 Motivation and Context
Second PR in the 4-PR JVM error-tracking stack. It exposes the in-app classification configuration surface on the server SDK and adds the missing
captureExceptionoverloads.releaseIdentifierexposure + stateless parity fix shipped separately in #668 (merged); this PR now carries only the in-app classification config and capture options.Contains:
feat(server): expose in-app frame config and captureException options:PostHogConfig.inAppIncludes/inAppExcludescontrolin_appclassification of captured frames (class-name prefix match; excludes always win).inAppExcludesdefaults to a newPostHogConfig.DEFAULT_IN_APP_EXCLUDESlist of common JVM/framework prefixes (JDK, Kotlin, Spring, Netty, servlet containers, HTTP clients, the PostHog SDK itself) so zero-config users get a sensible your-code vs framework split. Assigning your own list replaces the defaults.Builder.captureException(exception, distinctId, options)/captureException(exception, options)overloads takePostHogCaptureOptionswith the same merging semantics ascapture(..., options): custom properties,$groups,$set/$set_once, timestamp, and feature-flag enrichment via a pre-evaluatedflagssnapshot orappendFeatureFlags. Reserved exception properties (e.g.$exception_level,$exception_fingerprint) can be overridden through options properties. Request-context distinct-id resolution and personless fallback behave exactly like the existing overloads. Because the options overload sits next to the existing properties overload at the same arity, Java callers that passed an explicit untypednullas the third argument now need to cast it — called out in the changeset and the KDoc.docs(server): use the canonical proguard upload command in releaseIdentifier KDoc— the KDoc landed in fix: attach map_id to frames from stateless exception capture #668 cites the hiddenposthog-cli exp proguard uploadalias; use the canonicalposthog-cli proguard upload.💚 How did you test it?
posthog-server(7 inPostHogConfigTest, 6 inPostHogTest): defaults and overrides for the new config,DEFAULT_IN_APP_EXCLUDEScontents, exclude-beats-include classification, and each newcaptureExceptionoverload including options merging, reserved-property overrides, personless fallback, andmap_idpresence/absence on the options path../gradlew :posthog:test :posthog-server:test :posthog:apiCheck :posthog-server:apiCheckpass;spotlessCheckclean. API dumps regenerated; theposthog-serverdiff is additive only on top of fix: attach map_id to frames from stateless exception capture #668's entries, which now come frommain.📝 Checklist
If releasing new changes
pnpm changesetto generate a changeset file🔗 Stacked PR
Position 2 of 4. Base:
cat/java-et-coercer(PR #669).captureExceptionoptionscat/java-et-uncaught— opt-in server uncaught-exception capturecat/java-et-logback— newposthog-server-logbackappender moduleReview after its parent; the diff shown here is only this PR's own commits once the parent merges.