Repository navigation
feat(error-tracking): standardize exception event metadata - #898
Conversation
posthog-python Compliance ReportDate: 2026-10-08T10:27:14.852744+00:00 ✅ All Tests Passed!121/121 tests passed Capture_V1 Tests✅ 95/95 tests passed View Details
Capture_Ai Tests✅ 5/5 tests passed View Details
Feature_Flags Tests✅ 17/17 tests passed View Details
Feature_Flags_Local_Evaluation Tests✅ 4/4 tests passed View Details
|
Prompt To Fix All With AI### Issue 1
posthog/exception_utils.py:696-698
**Repeated members are omitted**
When an exception object occupies multiple valid positions in an `ExceptionGroup` tree, the shared `seen_exception_ids` set discards every occurrence after the first, causing `$exception_list` to omit members and report incomplete group structure.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "fix(error-tracking): preserve explicit t..." | Re-trigger Greptile |
marandaneto
left a comment
There was a problem hiding this comment.
Automated advisory code review.
|
This change introduces backwards-incompatible public schema/API/contract changes: Reserved exception properties supplied through capture_exception(..., properties=...) can no longer override SDK-generated or processor-owned values. If thats intentional, thats ok, but i think its not as designed, user provided props should always win |
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the |
|
This PR was closed due to lack of activity. Feel free to reopen if it's still relevant. |
|
@marandaneto Following up on the reserved-property compatibility concern: the current PR preserves the existing behavior in this major version—caller properties still win—and emits a |
|
Added the two release-hardening follow-ups in
Local validation: 2,237 passed, 15 skipped, 36 subtests; full Ruff; full mypy baseline; public API check; warning-as-error import. |
💡 Motivation and Context
Standardize Python exception events with the cross-SDK metadata contract so severity, capture source, mechanism semantics, nested linkage, and reserved property ownership are predictable.
Canonical contract: https://github.com/PostHog/sdk-specs/blob/main/openspec/specs/exception-event-metadata/spec.md
💚 How did you test it?
📝 Checklist
If releasing new changes
sampo addto generate a changeset file🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Implemented with pi from the shared OpenSpec contract. Integration-only capture metadata is kept out of the public API while manual and automatic capture paths preserve their existing behavior.