-
Notifications
You must be signed in to change notification settings - Fork 73
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
Question: Ability to query clickhouse to get user session messages #180
Comments
No, I don't think that's the way to go. While we do store session id in Clickhouse, Clickhouse is primarily an analytics tool for statistical queries such as session duration, message count per session etc. With Laminar, we store sessions in Postgres as well, and you can see them in our frontend in the sessions view. I will improve the doc with screenshots later this weekend, but here's a good starting point: https://docs.lmnr.ai/tracing/structure#grouping-traces If you need other features in the sessions view than what we currently offer, we are always looking for feedback! |
@dinmukhamedm Thanks a lot for the guidance, so for my use case we are associating session with traces and hence we are looking for query the traces for a particular session, afaik i see an endpoint to get all sessions which is reading sessions from database but in our case we need something like GET /sessions/:sessionId which returns us all the traces of a particular session as we would like to use it in our dashboard for our app. Do you think it makes sense here? |
@Mohit21GoJs I get what you mean. This data can be queried from Postgres. It would essentially be something (roughly) like:
The traces table is already indexed on I didn't quite get from your message though – is this something you would like to see in Laminar or something you would want to implement yourself using Laminar's data stores? |
@dinmukhamedm Thanks for the solution. I believe the database query will work but in my opinion this is a feature that should be owned by lmnr app server as it is owning the database and if you believe this api can help laminar vision i can create a task and create a pull request. |
Hi Team,
I would like to know is it recommended to query the clickhouse to query the user session history, we have an app which would like to retrieve history of messages in a session, i believe it can be achieved through clickhouse, is this a recommended practice?
The text was updated successfully, but these errors were encountered: