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

investigating-logs

하는 일

이 스킬은 PostHog 로그를 읽어 서비스가 정상인지, 오류 급증의 원인이 무엇인지, 로그 스트림이 무엇을 말하는지 답합니다. 빠른 답이 필요한 개발자와 당직 담당자를 위한 것입니다.

사용하는 경우

  • ✓변경 후 서비스나 배포가 작동하는지 확인하고 싶을 때.
  • ✓오류가 늘어서 무엇이 바뀌었는지 알고 싶을 때.
  • ✓알림이나 사용자가 보고한 실패에 대한 로그 증거가 필요할 때.

스킬 링크

https://github.com/PostHog/posthog/blob/master/products/logs/skills/investigating-logs/SKILL.md

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

사용 방법

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

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

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

AI에게 요청하는 예시

“마지막 배포가 무엇을 망가뜨렸나요? 로그를 확인해서 무엇이 바뀌었는지 알려 주세요.”

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

작동 방식

먼저 로그를 반복되는 패턴으로 묶고 이전 시간과 비교해서, 무엇이 다른지 보여 줍니다. 원시 로그 행은 마지막에야 읽습니다.

기술 내용 (원본 SKILL.md)

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

Investigating logs

Investigation is a narrowing problem: summarize before you read. One posthog:logs-patterns call compresses millions of lines into at most 200 templates, and one posthog:logs-patterns-diff call answers "what is different about now vs. before" directly. Raw rows (posthog:query-logs) are the last step of an investigation, never the first.

When to use this skill

  • "Check the logs" / "is service X healthy?" / "did my deploy (or model bump, config change, migration) break anything?"
  • "Why are errors up?" / "explain this spike" / incident triage — "what changed?"
  • "What is this service logging?" — orienting in an unfamiliar or noisy stream.
  • Finding the log evidence for a failure reported elsewhere (an alert, an error-tracking issue, a user complaint).

When not to use this skill

  • Creating or tuning log alerts — that's authoring-log-alerts.
  • Analytics over product events, persons, or insights — that's querying-posthog-data.
  • HogQL exposes a logs table via posthog:execute-sql, but do not investigate through it: hand-written SQL over logs routinely hits read-byte caps and re-derives what the tools below do in one cheap call. Reserve SQL for the rare case of joining log-derived facts with non-log data.

Tools

Tool Job
posthog:logs-services-create Top-25 services with log_count, error_count, error_rate, sparkline. Orientation.
posthog:logs-patterns Mine one window's message templates, ordered by frequency. "What is this stream saying?"
posthog:logs-patterns-diff Diff templates between two windows: new / rate-shifted / gone. "What changed?"
posthog:logs-count / posthog:logs-count-ranges Scalar and time-bucketed counts for a filter. Localize volume before pulling rows.
posthog:logs-sparkline-query Volume over time broken down by severity or service (the one bucketed view with a breakdown).
posthog:logs-facet-values-create Distribution of severity/service (or a resource attribute) under a filter.
posthog:logs-attributes-list / posthog:logs-attribute-values-list Discover attribute keys and values before building filters.
posthog:query-logs Raw rows. Endpoint of every drill-down, entry point of none.

Each tool's own description documents its parameters and response shape — read it before calling.

Pick the workflow by question shape

"Is it healthy?" — post-deploy / post-change verification

The user changed something (deploy, model bump, config, migration) and wants to know the logs still look right.

  1. Pin down the change time and the affected service(s). Ask if the user hasn't said; the diff is meaningless without a boundary.
  2. Orient with posthog:logs-services-create: is the service still logging at all, and what is its error_rate now? A service that went silent fails verification just as hard as one that started erroring.
  3. posthog:logs-patterns-diff with query.dateRange from the change time to now and baselineDateRange set to a comparable window just before the change, scoped to serviceNames. New error/fatal templates right after a change are the classic regression signature; large rate_ratio shifts on existing error templates are the second thing to check.
  4. Check volume continuity with posthog:logs-count-ranges spanning before and after the boundary: a rate discontinuity (crash loop, restart storm, silence) shows up here even when message content looks unchanged.
  5. Drill only the suspects: pivot each suspicious pattern to raw lines via its match_regex with posthog:query-logs.

A pass verdict needs all three: no new error templates, no large error rate_ratio shifts, and continuous volume. Say which windows you compared — "healthy" is o

자주 묻는 질문

원시 로그 행을 먼저 읽지 않는 이유는 무엇인가요?

행이 너무 많아서 읽을 수 없으므로, 요약이 중요한 패턴을 먼저 보여 줍니다.

로그를 쿼리하려면 SQL을 써야 하나요?

보통은 아닙니다. 스킬은 요약 도구를 추천하는데, 로그에 직접 쓴 SQL은 읽기 제한에 자주 걸리기 때문입니다.

알림도 만들 수 있나요?

아니요. 로그 알림의 생성이나 조정은 별도의 스킬이 다룹니다.

상세 정보

작성자의 원본 설명

Investigate logs in a PostHog project: verify a service or deployment is healthy, explain an error spike, triage an incident, or understand what a log stream is saying. Use when the user asks to "check the logs", asks whether a service, deploy, release, or change is working or broke anything, asks why errors are up or what changed, or wants the root cause of failures visible in logs. Routes the logs MCP tools (services overview, pattern mining, before/after pattern diffing, bucketed counts, facets, raw rows) so investigations start from summaries instead of raw rows or hand-written SQL over th

repo: PostHog/posthog

인기도

GitHub 스타
41k
순위
#6889
라이선스
—
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

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

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬