cloud-logging
Installation
SKILL.md
Cloud Logging
This skill provides utilities for analyzing logs, errors, and system health across Google Cloud deployments.
- Prioritize Logs with
severity>= "ERROR" as they tend to be less verbose. - Constrain logs around the time of investigation (possibly going back a few hours/days to find smoking guns).
Logs DOs and DONT's
Ingesting Logs into an LMM memory can easily saturate your context.
- [BAD] DO NOT ingest big files. Antipattern:
ReadFile path/to/access_logs_raw.json.- It's ok to get raw logs, but also use
jqor scripts to read them without polluting your context window. - [GOOD] Use simple maniuplation like:
jq -r '.[] | .httpRequest.status'to get a list of statuses. - [GOOD] Reduce size with scripts such as
scripts/cloudlogging2apachelogs.py <big_logfile.json>(provided in the skill)
- It's ok to get raw logs, but also use
- [BAD] Do not call long-running calls without precautions, eg
gcloud logging read- [GOOD] Rather prepend some reasonable
timeout 60 gcloud logging read ..., or - [BEST] Use the
run_shell_commandtool withis_background: trueand poll the results being dumped to file periodically.
- [GOOD] Rather prepend some reasonable