Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plugins): add teardown functionality to session replay plugin #523

Merged
merged 1 commit into from
Aug 7, 2023

Conversation

kwalker3690
Copy link

Summary

This PR adds a teardown method to the session replay plugin, which is called when either amplitude.remove() or amplitude.init() is called for a subsequent time. This method removes event listeners from the window, stops recording, and flushes the event queue, sending all remaining events.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

Copy link

@jackson-amplitude jackson-amplitude left a comment

Choose a reason for hiding this comment

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

LGTM! Love the organized teardown logic.

Copy link
Collaborator

@kevinpagtakhan kevinpagtakhan left a comment

Choose a reason for hiding this comment

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

lgtm!

@kwalker3690 kwalker3690 merged commit d3538a0 into v1.x Aug 7, 2023
@kwalker3690 kwalker3690 deleted the kwallach/teardown branch August 7, 2023 17:45
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.

3 participants