All skills
google avatar

/cloud-logging-query-generation

@becc4b8
by googlegoogle/skills21k stars
1,698

Generates Logging Query Language (LQL) queries for Google Cloud Logging from natural language. Use this skill when you need to query log data or when you are debugging issues. You can filter log data by Google Cloud service. Don't use this skill to query other databases, such as SQL or Cloud Spanner.

Use this Skill: https://skilld.dev/gh/google/skills/cloud-logging-query-generation

This session only. Nothing lands on disk.

referencesquery_cloud_functions.md

≈507 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Cloud Run Functions LQL queries

Base schema and structural patterns

Cloud Functions logs differ significantly depending on whether you are targeting 1st Gen or 2nd Gen functions.

1st Gen Functions

  • Resource Type: resource.type="cloud_function"
  • Log ID: log_id("cloudfunctions.googleapis.com/cloud-functions")
  • Execution Correlation: To find all logs for a single execution, filter by labels.execution_id="<EXECUTION_ID>".
  • Targeting: Filter by resource.labels.function_name="<FUNCTION_NAME>" and resource.labels.region="<REGION>".

2nd Gen Functions (Cloud Run Functions)

Because 2nd Gen runs natively on Cloud Run infrastructure, its logs share the standard Cloud Run schema and suffer from interleaved concurrency.

  • Resource Type: resource.type="cloud_run_revision"
  • Log ID: Use log_id("run.googleapis.com/requests") for invocation telemetry (latency, HTTP status codes, request URLs). Use log_id("run.googleapis.com/stdout") or log_id("run.googleapis.com/stderr") for application container output.
  • Execution Correlation: The most reliable way to correlate a single concurrent execution is via trace ID: trace="projects/<PROJECT_ID>/traces/<TRACE_ID>". (Fallback: labels.execution_id only if the user's runtime SDK is explicitly injecting it).
  • Targeting: Filter by resource.labels.service_name="<FUNCTION_NAME>" and resource.labels.location="<REGION>".

Example queries

Finds execution errors for 1st generation Cloud Functions.

Variables to replace: None

resource.type="cloud_function" AND
log_id("cloudfunctions.googleapis.com/cloud-functions") AND
severity >= ERROR

Finds execution errors for 2nd generation Cloud Functions.

Variables to replace: None

resource.type="cloud_run_revision" AND
(log_id("run.googleapis.com/stdout") OR
 log_id("run.googleapis.com/stderr") OR
 log_id("run.googleapis.com/requests")) AND
severity >= ERROR

Source: SKILL.md on GitHub

No alerts9d3 checks · Risk SAFE
  • Gen Agent Trust Hub9d

    This skill is designed to generate Logging Query Language (LQL) queries for Google Cloud Logging from natural language input. It provides comprehensive reference guides, syntax rules, and examples for various Google Cloud services. No security issues were detected.

  • Socket9d

    No alerts

  • Snyk9d

    Risk: LOW · No issues

Signed by skilld at becc4b8. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 2 weeks ago
metadata
{
  "version": "1.0.0",
  "category": "CloudObservabilityAndMonitoring"
}

README badge

README badge for google/skills/cloud-logging-query-generation