Skip to main content

google-cloud-logs-search-by-string

#post

Searching Google Cloud logs

  • I was asked which users had looked at particular data in an app recently
  • translation:
    • output a list of user emails
    • who made queries that included specific text in a specific query param
    • over the past two months
  • show the query that accomplishes that
  • show filters scoped to the relevant fields vs naked/unscoped filters at root level (can be handy, e.g. for unique strings like all logs relating to a particular request ID; though never necessary and probably slower than the equivalent field-specific syntax; just convenient when authoring one-off queries)
  • show the output
  • abstract the reusable takeaways