Errors Groups
npx machina-cli add skill yu-iskw/google-cloud-observability-plugin/errors-groups --openclawErrors Groups
List aggregated error groups from Cloud Error Reporting.
Purpose
Identify the most frequent and impactful errors in a project.
Inputs
project(optional): The Google Cloud project ID to list error groups from.service(optional): Filter by service name.limit(optional): Maximum number of groups to return. Defaults to 10.order_by(optional): Sort the results. Valid values arelast-seen,created,count,affected-users. Prefix with-for descending (e.g.,-count).time_range(optional): The time range for which to list error groups. Examples:1h,1d,30d.
Behavior
- Execute
gcloud beta error-reporting groups list --project=[PROJECT] --service=[SERVICE] --limit=[LIMIT] --sort-by=[ORDER_BY] --time-range=[TIME_RANGE] --format=json. - If
projectis not provided, use the active project fromgcp-context. - If
order_byis not provided, defaults to-countto show most frequent errors first.
Output
Returns a JSON list of error groups.
References
Source
git clone https://github.com/yu-iskw/google-cloud-observability-plugin/blob/main/skills/errors-groups/SKILL.mdView on GitHub Overview
This skill lists aggregated error groups from Cloud Error Reporting to identify the most frequent and impactful issues in a project. It supports optional filters (project, service, time_range) and sorting (by count, last-seen, created, or affected-users) with a default limit of 10.
How This Skill Works
The skill constructs and executes the gcloud beta error-reporting groups list command using the provided flags (project, service, limit, order_by, time_range). If no project is specified, it uses the active project from gcp-context, and if order_by is absent it defaults to -count to surface the most frequent errors first; the output is returned as JSON.
When to Use It
- Identify the most frequent and impactful errors in a project to prioritize fixes.
- During incident response to surface recently seen or high-impact error groups.
- Weekly health checks to monitor trends in error groups over time.
- Narrow down issues for a specific service by filtering with the service parameter.
- Onboard a new service and verify error collection by listing its error groups.
Quick Start
- Step 1: Set your project context (or rely on gcp-context): gcloud config set project [PROJECT] or ensure the correct context is active.
- Step 2: List error groups with your desired filters, e.g., gcloud beta error-reporting groups list --project=[PROJECT] --limit=10 --time-range=24h --format=json.
- Step 3: Review the JSON output to identify top error groups and plan remediation efforts.
Best Practices
- Always specify a meaningful time_range to focus on relevant periods (e.g., 1h, 24h, 7d).
- Use limit to control output volume and review only the top groups first.
- Sort by -count to identify the most frequent errors before exploring other orders (last-seen, created, affected-users).
- Filter by service when isolating issues to a particular component or microservice.
- Cross-reference error groups with affected-users metrics to gauge business impact.
Example Use Cases
- List the top 10 error groups in project 'my-prod' for the last 24 hours: gcloud beta error-reporting groups list --project=my-prod --limit=10 --time-range=24h --format=json
- Show the most recently seen errors for service 'payment-service' over the last 7 days: gcloud beta error-reporting groups list --service=payment-service --time-range=7d --sort-by=-last-seen --format=json
- Find the 20 most frequent error groups in the active project over 30 days: gcloud beta error-reporting groups list --limit=20 --time-range=30d --format=json
- Validate error collection for the active project by listing with default settings: gcloud beta error-reporting groups list --format=json
- During incident response, fetch top 5 error groups from the last hour to triage rapidly: gcloud beta error-reporting groups list --limit=5 --time-range=1h --format=json