Repository navigation
docs(capture-exception): specify the ignored exception types option - #95
Conversation
posthog-ios and posthog-android both expose errorTrackingConfig.ignoredExceptionTypes, and the spec said nothing about it. posthog-ios #894 changed its default from ["RCTFatalException"] to [], so the two now agree on the empty default. Records the shared contract: the option is optional; where it exists it defaults to empty, drops matching $exception events on every path before the capture pipeline, and matches case-sensitively across the whole exception chain. The matched identifier stays platform-idiomatic. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: e399626d-2a51-4f82-bd36-0ca50f42eff2
…gnored exception types
a816089 to
a0bded3
Compare
…ception types change
Picked this one up and pushed six fixes on top of the bot's commit:
Also looked at scenario tagging, the no-throw clause having no scenario, and whether to mention posthog-js remote suppression rules; left those as they are. |
|
|
||
| ## Impact | ||
|
|
||
| Not a breaking change, and no SDK has to move: it records what posthog-ios and posthog-android |
There was a problem hiding this comment.
1. [P2 / MINOR] Include KMP in the archived rationale and impact analysis
Location: openspec/changes/archive/2026-10-04-specify-ignored-exception-types/proposal.md:46, RIGHT
Related location: design.md:8–9
The new blanket claim that “no SDK has to move,” together with “only the two mobile SDKs have it,” misses KMP’s supported public forwarding surface.
At KMP commit 7c2f4318a137d91718a84e52005ad3cf8a111ac3, applications can configure:
val errorTracking = ErrorTrackingConfig(
ignoredExceptionTypes = emptyList()
)The public configuration exposes this option with an empty default. Apple setup appends its mapped values to the native ignore list rather than replacing that list.
KMP’s build declaration pins the native version exactly; its version catalog selects posthog-ios 3.64.1. The exact native source at that release defaults to ["RCTFatalException"].
Consequently, source inspection shows that ordinary KMP Apple setup with an empty common list retains the old native default. That differs from this PR’s new empty-default contract. KMP shares native matchers rather than providing a third independent implementation, but it still exposes the public option and has a separate dependency-alignment concern.
This is pre-existing SDK drift and newly inaccurate archive text, not a runtime regression caused by this specification PR. Its impact is an incomplete conformance inventory and migration assessment.
Consider describing these as two native implementations also exposed through KMP, adding the KMP dependency qualification alongside the existing platform gaps, and qualifying “no SDK has to move.” Keep the normative requirement and its optionality unchanged; no KMP implementation change is required in this PR.
Deterministic verification: Compare the cited public field, Apple append assignment, exact dependency declaration, version catalog, and native default. These sources were inspected directly. No automated behavioral regression test is applicable to the archive wording correction; the resulting native configuration was not executed.
There was a problem hiding this comment.
🤖 An AI agent wrote this on behalf of @ioannisj.
Fixed in 4d9ec50. The archive now lists posthog-kmp as forwarding to the two native implementations, drops "no SDK has to move", and calls out that its exact posthog-ios 3.64.1 pin predates PostHog/posthog-ios#894, so KMP Apple apps on defaults still drop RCTFatalException until that pin moves.
KMP Android appends to posthog-android's empty list, so that side already conforms. Requirement text is unchanged, and the pin bump is KMP work.
turnipdabeets
left a comment
There was a problem hiding this comment.
The iOS and Android details check out. The description still ends with "Draft — please confirm the scope call above before merging". I'm fine with putting it in the spec even though only the mobile SDKs have it today, so consider that confirmed from my side.
| - Dropping SHALL be silent apart from a debug log, and SHALL NOT throw. | ||
| - Matching SHALL consider every exception in the chain (every `$exception_list` entry, or every | ||
| link of the cause chain the SDK would serialize), not only the outermost one, and SHALL be | ||
| case-sensitive. |
There was a problem hiding this comment.
nit: since Android matches by class, case sensitivity only applies to string matching (iOS and the serialized-payload path). Might be worth saying so here, so the mynoisyerror scenario doesn't read as applying to Android's class list.
There was a problem hiding this comment.
🤖 An AI agent wrote this on behalf of @ioannisj.
Scoped it in 90381ba. Case sensitivity now only applies where an SDK compares identifiers as strings (iOS, and Android's payload path), and the spec notes Android's Class list has no case to compare.
The mynoisyerror scenario is limited to string-matching SDKs too, so it no longer reads as applying to Android's class list.
| equality in its documented form: posthog-ios compares the bare `type`; posthog-android rejoins | ||
| `module` and `type` into the qualified class name for events handed to the generic capture API. | ||
|
|
||
| #### Scenario: default configuration drops nothing |
There was a problem hiding this comment.
nit: these scenarios are prose, while the rest of the spec uses the harness steps with an (@both) tag. Not blocking, but they'd need a @client-style tag to be wired up later.
There was a problem hiding this comment.
Yeah I think this can come with the adapter work
Problem
posthog-ios and posthog-android both ship
errorTrackingConfig.ignoredExceptionTypes, butcapture-exceptionnever specified it. Their defaults only agreed once posthog-ios#894 changed the iOS default to[].Changes
$exceptionpath, whole chain, case-sensitive string matching, identifier form documented per SDK.Testing
openspec validate --specs --strictpasses 64/64 on 1.4.1, the version CI pins.Agent context
DRI: @ioannisj
Autonomy: Human-driven (agent-assisted)
Created with PostHog Desktop