Skip to content

feat: add support for session replay event triggers#464

Draft
ioannisj wants to merge 3 commits intomainfrom
feat/replay-event-triggers
Draft

feat: add support for session replay event triggers#464
ioannisj wants to merge 3 commits intomainfrom
feat/replay-event-triggers

Conversation

@ioannisj
Copy link
Collaborator

💡 Motivation and Context

Blueprint implementation on PostHog/posthog-ios#496

Adds support for event triggers as an additional ingestion control. When event triggers are defined:

  • each new session will require an activation with a matching event
  • event triggers will be considered with an AND logic along feature flags and sampling
  • calling startSessionRecording() will wait for an event to be triggered, if event triggers are set up
  • on a new session id, if event triggers are configured, session will be stopped and wait for a new event to be matched
  • when waiting for an event activation, the integration is not started

💚 How did you test it?

📝 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 pnpm changeset to generate a changeset file
  • Added the "release" label to the PR to indicate we're publishing new versions for the affected packages

@github-actions
Copy link
Contributor

posthog-android Compliance Report

Date: 2026-03-18 14:24:16 UTC
Duration: 147091ms

⚠️ Some Tests Failed

28/29 tests passed, 1 failed


Capture Tests

⚠️ 28/29 tests passed, 1 failed

View Details
Test Status Duration
Format Validation.Event Has Required Fields 2315ms
Format Validation.Event Has Uuid 2029ms
Format Validation.Event Has Lib Properties 2023ms
Format Validation.Distinct Id Is String 2023ms
Format Validation.Token Is Present 2024ms
Format Validation.Custom Properties Preserved 2022ms
Format Validation.Event Has Timestamp 2020ms
Retry Behavior.Retries On 503 7024ms
Retry Behavior.Does Not Retry On 400 4023ms
Retry Behavior.Does Not Retry On 401 4023ms
Retry Behavior.Respects Retry After Header 7023ms
Retry Behavior.Implements Backoff 17037ms
Retry Behavior.Retries On 500 7025ms
Retry Behavior.Retries On 502 7025ms
Retry Behavior.Retries On 504 7027ms
Retry Behavior.Max Retries Respected 17035ms
Deduplication.Generates Unique Uuids 2037ms
Deduplication.Preserves Uuid On Retry 7023ms
Deduplication.Preserves Uuid And Timestamp On Retry 12019ms
Deduplication.Preserves Uuid And Timestamp On Batch Retry 7029ms
Deduplication.No Duplicate Events In Batch 2032ms
Deduplication.Different Events Have Different Uuids 2028ms
Compression.Sends Gzip When Enabled 2020ms
Batch Format.Uses Proper Batch Structure 2017ms
Batch Format.Flush With No Events Sends Nothing 2015ms
Batch Format.Multiple Events Batched Together 2027ms
Error Handling.Does Not Retry On 403 4019ms
Error Handling.Does Not Retry On 413 4020ms
Error Handling.Retries On 408 7024ms

Failures

error_handling.does_not_retry_on_413

Expected 1 requests, got 2

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