jlewi / foyle

AI For Software Operations
https://foyle.io
Apache License 2.0
85 stars 9 forks source link

Add RPC to Query the Logs #217

Open jlewi opened 1 month ago

jlewi commented 1 month ago

Querying the logs is very useful for troubleshooting and observability. See #215.

Right now we are using jq for that. There are a couple friction points with that.

  1. There are multiple log files and multiple sets of logs (RunMe vs. Foyle)
  2. As a result users are prone to search the wrong logs
  3. jq is overly flexible and its hard to remember the correct syntax and flags (e.g. "-c", vs "-s"). Using "select" vs. "map".

I think we should support a query syntax similar to what Google Cloud Logging Supports. I think we can support a subset of it and then increase it over time. Here's what we should support

That would make it easy to support most of the queries in #215.

I think we can return the results as a list of strings containing the log entries.