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

Log user level usage statistics ("Buisiness statistics") #831

Closed
pgulley opened this issue Oct 22, 2024 · 8 comments
Closed

Log user level usage statistics ("Buisiness statistics") #831

pgulley opened this issue Oct 22, 2024 · 8 comments
Assignees
Labels
enhancement New feature or request medium medium priority search

Comments

@pgulley
Copy link
Member

pgulley commented Oct 22, 2024

We want more insight into what typical searches look like. In particular I'd like more insight into date ranges- an ongoing log of queries with just the query time, the start date, and the end date would be very valuable. I can imagine it would also be useful to be able to distinguish usage at the admin vs contributor vs user level, and potentially the collections being used as well.

The ultimate output would ideally be some fun and useful histograms to gaze at thoughtfully in our downtime- which would be useful to prioritize collections in need of attention, and inform our backend indexing architecture.

@pgulley pgulley added enhancement New feature or request search medium medium priority labels Nov 7, 2024
@pgulley
Copy link
Member Author

pgulley commented Nov 7, 2024

Recent traffic related slowdowns bump this up in priority- I think the plan here should be to install a new middleware to log search requests- it should be off by default and togglable within the admin interface without restarting. Extra points if we can then watch the logs go by inside the admin console as well, but just getting the logs in the first place would be swell.
I'll add this to my to-do list for now, since the need is urgent.

@pgulley
Copy link
Member Author

pgulley commented Nov 8, 2024

Just popping in to say that I've started to address this here: https://github.com/pgulley/web-search/tree/logging_middleware
I'll have a PR up relatively soon I hope

@pgulley
Copy link
Member Author

pgulley commented Nov 8, 2024

Debugging, I ended up tangled up in DB migration stuff, so it will have to wait until next week!

@philbudne
Copy link
Contributor

philbudne commented Nov 8, 2024 via email

@pgulley
Copy link
Member Author

pgulley commented Nov 10, 2024

right now I'm just planning on writing logs as a text file- which isn't a super long term solution, but it will work now. I'm not sure what you mean by the properties table- are you talking about using a properties table as a log-store?

@philbudne
Copy link
Contributor

philbudne commented Nov 10, 2024 via email

@pgulley
Copy link
Member Author

pgulley commented Nov 12, 2024

I think the advantage of implementing it with the singleton model is that we can hook it up to the admin console and just toggle it on and off there- I see the advantage from the perspective of minimizing migrations with a properties table- and it would be a nice gadget to have around- If there were a nice way to interact with it then I'd be down.

@pgulley
Copy link
Member Author

pgulley commented Nov 26, 2024

Closed, finally

@pgulley pgulley closed this as completed Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request medium medium priority search
Projects
None yet
Development

No branches or pull requests

3 participants