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

Support querying sessions by cell index and notebookURI #268

Open
jlewi opened this issue Oct 1, 2024 · 1 comment
Open

Support querying sessions by cell index and notebookURI #268

jlewi opened this issue Oct 1, 2024 · 1 comment

Comments

@jlewi
Copy link
Owner

jlewi commented Oct 1, 2024

A convenient way to be able to find relevant sessions would be to query by selected cell index and notebook URI.

This would make it easier to find sessions associated with a particular cell.

@jlewi
Copy link
Owner Author

jlewi commented Oct 1, 2024

Here's a Google Cloud Logging Query that can do it

gcloud logging read 'logName="projects/foyle-dev/logs/foyle" AND jsonPayload.context.notebookUri="file:///Users/jlewi/git_worklog/foyle/2024_10_01_blank_cells.md" AND  jsonPayload.context.selected=10' --limit 20 --format=json

Note this query doesn't work if selected=0 because the proto serializer doesn't include default values when serializing to JSON.

log.Info("Received full context", "contextId", req.GetContextId(), logs.ZapProto("context", req.GetFullContext()))

We could potentially change that.

If we stored the session proto as JSON in sqlite then we should be able to use sqlite's JSON functionality to run a similar query.

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

1 participant