본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)22k · #10239

cloud-logging-query-generation

하는 일

이 스킬은 일상적인 요청을 Google Cloud 로그용 Logging Query Language 검색으로 바꿉니다. 디버깅 중 특정 로그 항목을 찾아야 하는 사람을 위한 스킬입니다.

사용하는 경우

  • ✓특정 오류, 서비스 또는 리소스에 대해 Google Cloud 로그를 검색하고 싶을 때.
  • ✓문제를 디버깅하고 있어서 정확한 로그 필터가 필요할 때.
  • ✓로그 쿼리가 아무것도 반환하지 않아 올바른 버전이 필요할 때.

스킬 링크

https://github.com/google/skills/blob/main/skills/cloud/cloud-logging-query-generation/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/google/skills/blob/main/skills/cloud/cloud-logging-query-generation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“지난 1시간 동안 Cloud Run 서비스에서 발생한 모든 500 오류를 보여 주는 Cloud Logging 쿼리를 작성해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

요청을 Logging Query Language로 바꿉니다. 큰따옴표, 대문자 AND, OR, NOT, 괄호로 묶은 용어를 사용합니다. 인스턴스 이름과 ID를 혼동하는 등 흔한 실수도 피합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Generate Logging Query Language queries

Use this skill to generate correct Logging Query Language (LQL) queries for Cloud Logging.

Attribution

MUST READ: Before executing any gcloud, REST API, or MCP command, you MUST read Usage Attribution. For commands executed directly in the terminal (never in generated scripts, Terraform, or user code), prefix gcloud with CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:cloud-logging-query-generation)" and append agent-skills/1.0 (skill:cloud-logging-query-generation) to User-Agent headers.

Core rules

  1. Strict syntax requirements:

    • Always use double quotes (") for string literals. Do not use single quotes (').
    • Write boolean operators in all capitals: AND, OR, NOT.
    • Always use parentheses to group terms and explicitly enforce precedence.
  2. Common pitfalls:

    • Instance ID vs. Instance Name: For the gce_instance resource type, do NOT compare instance names to instance IDs. Instance names are strings (for example, my-instance). Instance IDs are numeric. If you only have the name, then search by instance name, SEARCH("my-instance"), or use resource.labels.instance_name if that label is available for the resource.
    • Resource Type Accuracy: Do not guess resource types. You must look up the correct resource.type value in the service-specific reference files. For example, use internal_http_lb_rule for Internal HTTP(S) Load Balancer rules when filtering by forwarding rule name or region (instead of http_load_balancer).
  3. Output format and placeholders:

    • Output only the raw LQL query text. Do not include conversational filler. Do not wrap the query in markdown code blocks unless explicitly requested by the user. Valid LQL comments (using --) are allowed, and are the ONLY acceptable way to include explanations or warnings.
    • Never block on missing variables. If the user's request lacks specific identifiers (like a project ID, instance name, or IP address), do not ask them for clarification. If the variable is required for a functional query (like a log bucket name for a regional log), insert an uppercase placeholder string wrapped in angle brackets (for example, "<PROJECT_ID>"). CRITICALLY: If you include a placeholder for a variable the user omitted, it will act as an explicit filter that causes logs to be missed. Therefore, you MUST omit the entire filter/line containing the placeholder if the field is not strictly required. For example, completely omit resource.labels.instance_id="..." if the user didn't specify an instance, but you MUST include logName=".../projects/<PROJECT_ID>/..." with a placeholder if constructing a regional log bucket query where a project ID is strictly required.
  4. Preferred fields:

    • Include resource.type and log_id restrictions when the query targets specific Google Cloud services or resources. Global queries (for example, "latest error logs") do not require these restrictions.

Detailed reference

Refer to references/api_reference.md for LQL syntax rules, including Operators, NULL handling, SEARCH, and Regex.

Service reference files

Before generating a query, you MUST read the examples for the specific service. LQL schemas and resource.type values are service-specific. Do not stop reading after finding the Base Schema in the file. You must verify if there are specific requirements for state tracking (like previousState) or resource-specific log IDs detailed in the paragraphs or specific query examples below the schema block.

For the following services, read the exact file listed:

자주 묻는 질문

SQL 데이터베이스도 조회할 수 있나요?

아닙니다. Cloud Logging용 쿼리만 만들며, SQL이나 Spanner 같은 데이터베이스용은 아닙니다.

인스턴스 이름과 ID가 왜 중요한가요?

이름은 텍스트이고 ID는 숫자이므로, 쿼리가 올바른 쪽과 맞아야 합니다.

어떤 문법을 항상 쓰나요?

텍스트에는 큰따옴표, 대문자 AND, OR, NOT, 용어를 묶는 괄호를 씁니다.

상세 정보

작성자의 원본 설명

Generates Logging Query Language (LQL) queries for Cloud Logging on Google Cloud 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.

repo: google/skills

인기도

GitHub 스타
22k
순위
#10239
라이선스
Apache-2.0
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬