-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Session Replay flush() method do not work before stop() #7255
Comments
Hey, thanks for the report. I guess the reason for this is that The following should work more reliably: replay.flush().finally(() => replay.stop()); This will wait until the flush succeeded and then stop the recording. Does that work for you? |
thanks a lot but I see next type flush(): Promise<void> | void; do I need to check typeof method ? |
Ah, you are right - ugh, this type is not really nice, but I guess we can't change it in a backwards compatible way now 😅 So the better way is: await replay.flush();
replay.stop(); as await should work no matter if it is a promise or not! |
thanks a lot. I think you can update documentation) |
@expcapitaldev which documentation are you referring to? The Readme or the SDK docs? |
any) I can not find any information about flush() method with stop() |
We've added some docs on this here: https://docs.sentry.io/platforms/javascript/session-replay/configuration/#start-and-stop-recording Thanks for bringing this up! |
thank you guys |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using? If you use the CDN bundles, please specify the exact bundle (e.g.
bundle.tracing.min.js
) in your SDK setup.@sentry/angular
SDK Version
7.37.1
Framework Version
"@sentry/angular": "7.37.1",
Link to Sentry event
no
SDK Setup
see #7192 (comment)
Steps to Reproduce
see SDK Setup
Expected Result
flush() method should send all changes to server if after flush() method we will call stop()
Actual Result
flush() method should send all changes to server if after flush() method we will call stop()
we do not see any POST request with data after calling "client.flush();client.stop()" it is only works without "client.stop()" or with "setTimeout(()=>{replay?.stop();},1000)"
The text was updated successfully, but these errors were encountered: