-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
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 response
SDK Setup
Sentry.init({
dns: myDNS,
// without Replay intergation here, because we do not want create webworker now
...,
replaysSessionSampleRate: 0, // I understand that 0 do not start session, I want to start and init with delay
replaysOnErrorSampleRate: 0,
});
...
private myStart(){
const client: Client | undefined = Sentry.getCurrentHub().getClient();
// enableReplay for example from variable from server
if (client) {
const currentReplayIntegration: Replay | null = client.getIntegration(Replay);
if (enableReplay) {
const options: BrowserOptions = client.getOptions();
options.replaysSessionSampleRate = 1; // I understand that I need to start with 1
if (currentReplayIntegration) {
currentReplayIntegration.flush();
currentReplayIntegration.stop();
// TODO if I have current session and I do not know now it is is progress or not I can not check it and I want to finish current replay session and start new or start new, I can safety use flush and stop
// in some cases session do not started (I see in network that POST request do not send to sentry server), also it is do not work with timeout for example, for example after 3-5 calling method myStart() you can check that issue
currentReplayIntegration.start();
} else {
client.addIntegration(this.getSentryReplayIntegration());
}
} else {
if (currentReplayIntegration) {
currentReplayIntegration.flush();
currentReplayIntegration.stop();
}
}
} else {
// unexpected case, log error here
}
}Steps to Reproduce
see above
Expected Result
after ReplayIntergation.stop() I can call .start() and new session should be started and send to the server
Actual Result
looks like after stop() new session can not started but I see new Worker created with new ID but POST requests do not send to the server in all
Metadata
Metadata
Assignees
Labels
No labels