Improve usability of Replay SDK public APIs (start
/stop
/flush
)
#12810
Labels
Package: replay
Issues related to the Sentry Replay SDK
start
/stop
/flush
)
#12810
Below is a state table of our current public APIs. Notably,
start()
andstartBuffering()
will throw if replay is already started andflush()
is a no-op if replay is currently inactive.We should change to not throw, and instead use a debug level log if replay has already been started. We want to warn users when they do this, but not throw errors since nothing will break as it can be a no-op when this happens.
Additionally,
flush()
should start a session replay if it is called when replay is not enabled because if they callflush()
we can assume they want a replay.Current behavior
start()
startBuffering()
flush()
stop()
Proposed behavior
start()
startBuffering()
flush()
stop()
The text was updated successfully, but these errors were encountered: