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

"begin_session" metrics are recorded during logout action #5478

Open
devincowan opened this issue May 6, 2024 · 0 comments
Open

"begin_session" metrics are recorded during logout action #5478

devincowan opened this issue May 6, 2024 · 0 comments
Labels
bug Broad category when more specific Label can't be found Reporting and Metrics User analytics heap, NSF reporting, ELK, Performance Indicators

Comments

@devincowan
Copy link
Contributor

devincowan commented May 6, 2024

Description of the bug
hs_tracking records login, logout, and begin_session variables in the db (which are later exported for metrics).
In local testing, it appears that the begin_session is recorded during the logout event.

Steps to reproduce the bug:

  1. Add a breakpoint at session.record('begin_session', msg)
  2. Login, see that the breakpoint is not tripped
  3. Logout, see that the breakpoint is tripped

Alternative:

  1. Python shell
from hs_tracking.models import Variable
Variable.objects.filter(name="begin_session").last().get_value()
  1. Repeat the above before/after login and logout and witness that the "begin_session" variable is created after logout rather than after login.

Expected behavior
begin_session should be recorded at the beginning of a session.

Additional information
HS v2.13.9
Here is our SessionManager class:
https://github.com/hydroshare/hydroshare/blob/2.13.9/hs_tracking/models.py#L25-L67

@devincowan devincowan added the Reporting and Metrics User analytics heap, NSF reporting, ELK, Performance Indicators label May 6, 2024
@devincowan devincowan added this to Backlog in HydroShare Issue Management Board via automation May 6, 2024
@devincowan devincowan added the bug Broad category when more specific Label can't be found label May 6, 2024
@devincowan devincowan moved this from Backlog to Bugs in HydroShare Issue Management Board May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Broad category when more specific Label can't be found Reporting and Metrics User analytics heap, NSF reporting, ELK, Performance Indicators
Development

No branches or pull requests

1 participant