Skip to content

feat(error-tracking): standardize exception event metadata - #193

Draft
hpouillot wants to merge 1 commit into
mainfrom
hp/exception-event-metadata
Draft

feat(error-tracking): standardize exception event metadata#193
hpouillot wants to merge 1 commit into
mainfrom
hp/exception-event-metadata

Conversation

@hpouillot

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

Standardize Elixir exception events across Logger crash reports and Plug request boundaries with the cross-SDK metadata contract.

Canonical contract: https://github.com/PostHog/sdk-specs/blob/main/openspec/specs/exception-event-metadata/spec.md

💚 How did you test it?

  • mix test test/posthog/handler_test.exs test/posthog/integrations/plug_test.exs: 61 passed
  • mix format

📝 Checklist

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

If releasing new changes

  • Ran sampo add to generate a changeset file

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Implemented with pi from the shared OpenSpec contract. Logger crash events and Plug request failures now report stable boundary metadata without allowing generic context to overwrite canonical fields.

@hpouillot hpouillot self-assigned this Aug 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

posthog-elixir Compliance Report

Date: 2026-08-26 08:26:30 UTC
Duration: 117685ms

✅ All Tests Passed!

46/46 tests passed


Capture Tests

29/29 tests passed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 610ms
Format Validation.Event Has Uuid 610ms
Format Validation.Event Has Lib Properties 610ms
Format Validation.Distinct Id Is String 610ms
Format Validation.Token Is Present 610ms
Format Validation.Custom Properties Preserved 611ms
Format Validation.Event Has Timestamp 610ms
Retry Behavior.Retries On 503 5616ms
Retry Behavior.Does Not Retry On 400 2614ms
Retry Behavior.Does Not Retry On 401 2613ms
Retry Behavior.Respects Retry After Header 5616ms
Retry Behavior.Implements Backoff 15625ms
Retry Behavior.Retries On 500 5615ms
Retry Behavior.Retries On 502 5616ms
Retry Behavior.Retries On 504 5615ms
Retry Behavior.Max Retries Respected 15625ms
Deduplication.Generates Unique Uuids 621ms
Deduplication.Preserves Uuid On Retry 5615ms
Deduplication.Preserves Uuid And Timestamp On Retry 10621ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 5620ms
Deduplication.No Duplicate Events In Batch 615ms
Deduplication.Different Events Have Different Uuids 612ms
Compression.Sends Gzip When Enabled 610ms
Batch Format.Uses Proper Batch Structure 609ms
Batch Format.Flush With No Events Sends Nothing 607ms
Batch Format.Multiple Events Batched Together 615ms
Error Handling.Does Not Retry On 403 2613ms
Error Handling.Does Not Retry On 413 2613ms
Error Handling.Retries On 408 5614ms

Feature_Flags Tests

17/17 tests passed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 609ms
Request Payload.Flags Request Uses V2 Query Param 610ms
Request Payload.Flags Request Hits Flags Path Not Decide 609ms
Request Payload.Flags Request Omits Authorization Header 610ms
Request Payload.Token In Flags Body Matches Init 609ms
Request Payload.Groups Round Trip 609ms
Request Payload.Groups Default To Empty Object 609ms
Request Payload.Disable Geoip False Propagates As Geoip Disable False 609ms
Request Payload.Disable Geoip Omitted Defaults To False 610ms
Request Payload.Flag Keys To Evaluate Contains Only Requested Key 609ms
Request Lifecycle.No Flags Request On Init Alone 5ms
Request Lifecycle.No Flags Request On Normal Capture 607ms
Request Lifecycle.Two Flag Calls Produce Two Remote Requests 1216ms
Request Lifecycle.Mock Response Value Is Returned To Caller 609ms
Retry Behavior.Retries Flags On 502 913ms
Retry Behavior.Retries Flags On 504 912ms
Side Effect Events.Get Feature Flag Captures Feature Flag Called Event 1214ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant