Skip to content

Conversation

waltjones
Copy link
Contributor

Description of the change

Adds triggerReplay method to ReplayManager, with different requirements than the occurrence-centric capture and sendOrDiscardReplay.

  • Initiates send immediately after export, and therefore awaits export.
  • Tolerates triggering before the recorder is ready, so that postDuration triggers work when triggered at code init.
  • triggerReplay is async so that it can be non-blocking for the caller and also return the replayId when it succeeds.
  • Doesn't use occurrence-based _canSendReplay.

There may be an opportunity to refactor triggerReplay and capture to use more shared code. This PR doesn't attempt to solve that. It enables the needed triggers in the short term, allowing more time to consider a preferred refactoring.

Type of change

  • New feature (non-breaking change that adds functionality)

Checklists

Development

  • Lint rules pass locally
  • The code changed/added as part of this pull request has been covered with tests
  • All tests related to the changed code pass in development

@waltjones waltjones marked this pull request as draft October 9, 2025 16:38
@waltjones waltjones force-pushed the waltjones/trigger-replay branch from b54eab8 to 23fc2e0 Compare October 10, 2025 14:10
@waltjones waltjones marked this pull request as ready for review October 10, 2025 14:10
@waltjones waltjones force-pushed the waltjones/trigger-replay branch from 23fc2e0 to a3c32b7 Compare October 10, 2025 14:24
@waltjones waltjones merged commit 8d1a637 into master Oct 10, 2025
6 checks passed
@waltjones waltjones deleted the waltjones/trigger-replay branch October 10, 2025 16:47
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.

2 participants