Skip to content

Cloud Trace Querying

Lets an agent search, inspect and diagnose Google Cloud Trace latency and error data.

Repository
google/skills
Stars
21,782
Licence
Apache-2.0
Files
15 files

What it does

Once installed, the agent can search Google Cloud Trace for slow or failing requests, pull the full span tree for a trace, fetch related Cloud Logging entries, and generate Cloud Console links. It follows built-in diagnostic workflows for latency and errors and can present results as indented ASCII timelines or A2UI graph JSON. It is aimed at engineers investigating slow services in Google Cloud.

Great for

  • Engineers on Google Cloud who need to find why a checkout or booking request is slow
  • SRE or on-call staff correlating trace spans with application error logs
  • Teams wanting a repeatable query pattern for Cloud Trace filters like latency and root span

Skip it if

  • Non-GCP telemetry or general database query tuning, which the skill itself says it does not cover
  • Users without a Google Cloud project, billing and API access, since every command needs them
  • Anyone expecting read-only safety by default: the skill tells the agent to run bash tools directly and report results, so review commands before approving

Try asking

  • “Find traces for /v1/booking/book that took at least 1.5 seconds in project my-project”
  • “Fetch the full span hierarchy for trace ID abc123 and show where the time was spent”
  • “Pull ERROR-level logs correlated with a slow trace and summarise likely root causes”
  • “Give me a console link to this trace span so I can open it in the browser”
Step-by-step guide: how to use Cloud Trace QueryingInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 15 original files, the Apache-2.0 licence and an attribution note.

    cloud-trace-querying.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip cloud-trace-querying.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip cloud-trace-querying.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Give the project ID explicitly in your prompt to avoid the agent guessing it from local config
  • Start with a narrow filter such as root span plus latency threshold, then drill into one trace ID
  • Check that the logged-in account has IAM access to the logs, since empty log results can mean missing permissions rather than no data

What's inside

  • assets/formatting/a2ui/single_span/display.a2ui.json
  • assets/formatting/a2ui/trace_chart/display.a2ui.json
  • assets/formatting/a2ui/trace_flow/display.a2ui.json
  • assets/formatting/a2ui/traces_heat_map/display.a2ui.json
  • assets/formatting/ascii/single_span/display.txt
  • assets/formatting/ascii/trace_chart/display.txt
  • assets/formatting/ascii/trace_flow/display.txt
  • assets/formatting/ascii/traces_heat_map/display.txt
  • assets/queries/billing_errors/query.txt
  • assets/queries/billing_errors/SCENARIO.md
  • assets/queries/checkout_latency/query.txt
  • assets/queries/checkout_latency/SCENARIO.md
  • assets/queries/customer_spans/query.txt
  • assets/queries/customer_spans/SCENARIO.md
  • SKILL.md

Redistributed unmodified from google/skills under the Apache-2.0 licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.