Loading...
Loading...
Query Cloud Trace spans, filter by latency thresholds or error status, correlate distributed traces with Cloud Logging, and diagnose latency bottlenecks across Google Cloud services. Use when investigating slow requests, analyzing trace hierarchies, or resolving latency regressions. Do NOT use for querying non-GCP telemetry or database query optimization outside Cloud Trace.
npx skill4agent add google/skills cloud-trace-queryingcloud-trace-querying[!IMPORTANT] AUTONOMOUS TOOL EXECUTION MANDATE: You MUST execute the tool scripts directly in bash to query telemetry. Do NOT just describe query strings or write Python scripts. Run the provided bash tools directly and report the exact results.
gcloudgcloud auth login && gcloud auth application-default login<PROJECT_ID>bash scripts/get_trace_project/run.shgcloud config set project <PROJECT_ID>gcloud services enable cloudtrace.googleapis.com logging.googleapis.combash scripts/get_trace_project/run.sh/v1/booking/bookbash scripts/search_traces/run.sh --filter 'root:/v1/booking/book latency:1.5s' --projects '<PROJECT_ID>'--filter--filter ''--filter 'root:'latency:<duration>latency:1.5sexamplestrace_idduration_secondsbash scripts/fetch_entire_trace/run.sh --trace-id '<TRACE_ID>' --project '<PROJECT_ID>'bash scripts/fetch_related_logs/run.sh --trace-id '<TRACE_ID>' --trace-projects '<PROJECT_ID>'severity: "ERROR"fetch_related_logs_Defaultbash scripts/fetch_trace_span/run.sh --trace-id '<TRACE_ID>' --span-id '<SPAN_ID>' --project '<PROJECT_ID>'bash scripts/generate_links/run.sh --trace-id '<TRACE_ID>' --project '<PROJECT_ID>' [--span-id '<SPAN_ID>']|--500 Internal Server Error503 Service UnavailableGoogleAPICallErrorroot:latency:+span:error:true