-
Notifications
You must be signed in to change notification settings - Fork 61
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
Use of SessionIdTimeoutHandler class #860
Comments
I think you got it. Sessions are intended to timeout after some period of inactivity, default is 15 minutes as you noted. Inactivity is defined as no user behavior, which means no telemetry being created. A foregrounded app is not considered inactive. Hopefully that helps. |
Also keep in mind that the |
Thank you @breedx-splk for the explanation. Can you also confirm this? |
I think that's right. Even if the app is backgrounded, if the max time for a session to live expires, a new session should id should be created. Is this a problem or not matching your expectations? Can you try it? I added
I backgrounded the app and saw no changes while backgrounded, but certainly once foregrounded again the session changed soon after. |
@breedx-splk, I was just wondering why we have these two classes, when the check inside the session manager class itself is enough to expire a session and create a new session. |
Ok, I think I understand what you're asking now. Maybe I can clarify:
These two classes are collaborators -- the I think what you were trying to suggest is that one of the timeout checks might be redundant because they are ORed together. I think what you might be overlooking (or that the code doesn't yet make clear enough) is that there are intended to be two separate timeouts --
I think we've broken something about this along the way through refactoring, though. |
@breedx-splk, Thanks for the detailed explanation! I got it that both the classes are used for different timeouts. But when the user overrides the default timeouts the checks become redundant as you shared. Maybe this is how it’s supposed to work? |
I think that's not how it's supposed to work, so I submitted #887 to address this. Thanks for talking this out. |
Thanks @breedx-splk! I saw the changes. The new config makes the timeout usages very clear. |
Thanks @ddas09. Please feel welcome to submit a PR review. This kind of feedback is very helpful, and a gray checkmark of approval with/without comments is still very much needed in the otel community. 🙏🏻 |
Hi Team, I am trying to understand the use of the
SessionIdTimeoutHandler
class. As per my understanding there are two classes -OtelRumConfig
hereOtelRumConfig
here without any activity (span, logs).The only scenario when I think the
SessionIdTimeoutHandler
class hasTimedOut check to be useful is if the timeout is not overridden from theOtelRumConfig
API. In this case the handler class would timeout the session If the app is in the background and no activity (spans) happens for >15 minutesBut if the timeout is set in the config API it would override the value in both the
SessionIdTimeoutHandler
andSessionManagerImpl
class. In this case If the app is in the background and no activity (spans) happens for >15 minutes, the next time the app comes foreground and any span is created, the check in theSessionManagerImpl
class only would fail. Since thesessionLifetimeNanos
is 15 minutes now.Please help me to understand if I am missing something!
The text was updated successfully, but these errors were encountered: