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

Session Id Refresh Callback #328

Open
Archish27 opened this issue Apr 29, 2024 · 2 comments
Open

Session Id Refresh Callback #328

Archish27 opened this issue Apr 29, 2024 · 2 comments

Comments

@Archish27
Copy link
Contributor

When session expires we need a callback or hook to identify that the session has ended based on that we can do clean up of cached session id. Or trigger any custom logic as when required if callback implemented.

@breedx-splk
Copy link
Contributor

Hey @Archish27. This seems like a perfectly reasonable request to me...but can you be a little more specific about what you're trying to do when notified of a session change? There is code already in place to listen for a session id expiration and generate a notification "event" that contains the new session id and the previous session id.

If you're caching the session ID elsewhere in your app or in your custom telemetry, then this will be a larger problem for you. You should always be calling OpenTelemetryRum.getRumSessionId() any time you need to reference the session ID.

@Archish27
Copy link
Contributor Author

Hey @Archish27. This seems like a perfectly reasonable request to me...but can you be a little more specific about what you're trying to do when notified of a session change? There is code already in place to listen for a session id expiration and generate a notification "event" that contains the new session id and the previous session id.

If you're caching the session ID elsewhere in your app or in your custom telemetry, then this will be a larger problem for you. You should always be calling OpenTelemetryRum.getRumSessionId() any time you need to reference the session ID.

Use case is we do screen recording so let say if session.id is changed we need to stop recording. The other use case there are some application threads running so, in a way need a callback to cleanup resources on change session event.

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

No branches or pull requests

2 participants