Skip to content

Update replay triggers and config defaults#1346

Merged
waltjones merged 3 commits into
masterfrom
waltjones/update-replay-triggers
Oct 7, 2025
Merged

Update replay triggers and config defaults#1346
waltjones merged 3 commits into
masterfrom
waltjones/update-replay-triggers

Conversation

@waltjones

@waltjones waltjones commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

Description of the change

Replay triggers are predicates that decide whether conditions to capture and send a replay are met. A replay context is the relevant state at the time the predicates are applied. This context is matched against the configured triggers to determine whether a replay should be captured.

Trigger defaults in the config have been updated to both improve readability of the config and simplify applying the defaults in code.

  triggerDefaults: {
    samplingRatio: 1.0,
    preDuration: 300,
    postDuration: 5,
  },

This PR updates replay triggers to

  • centralize management in ReplayManager
  • update structure of defaults
  • add triggers for navigation and direct triggers

Note
The recorder is not updated to use new trigger options yet. This will be added in a follow up PR.

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 force-pushed the waltjones/update-replay-triggers branch from 9af3743 to db5706a Compare October 6, 2025 13:41

@matux matux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found two potential issues, everything else looks great.

Comment thread src/browser/replay/replayPredicates.js
Comment thread test/replay/integration/replayManager.bufferIndex.checkoutResilience.test.js Outdated
@waltjones

Copy link
Copy Markdown
Contributor Author

Good catch on those.

@matux matux left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@waltjones waltjones merged commit f4a031f into master Oct 7, 2025
4 checks passed
@waltjones waltjones deleted the waltjones/update-replay-triggers branch October 7, 2025 12:53
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