Skip to content

Instantly share code, notes, and snippets.

@Kylep342
Created January 29, 2026 23:46
Show Gist options
  • Select an option

  • Save Kylep342/bfc91e38cb537be7c05c9062d7b24920 to your computer and use it in GitHub Desktop.

Select an option

Save Kylep342/bfc91e38cb537be7c05c9062d7b24920 to your computer and use it in GitHub Desktop.
GCP logs query to find text in structlog
resource.type="k8s_container"
resource.labels.project_id="your-gcp-project"
resource.labels.location="us-east3"
resource.labels.cluster_name="your-cluster-name"
resource.labels.namespace_name="your-namespace-name"
labels.k8s-pod/app="your-k8s-pod-app-label"
labels.k8s-pod/service="your-k8s-pod-app-label" severity>DEFAULT
jsonPayload.error =~ "^.*thing to find in line.*$"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment