本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)41k · #6862

exploring-endpoint-execution-logs

できること

このスキルは、エンドポイントの実行ごとに書かれるログを読み、エラーや空の結果などが起きた理由を説明します。エンドポイントがなぜそのように動いたかを知る必要がある人向けです。

使う場面

  • ✓エンドポイントが失敗していて、実行のエラーメッセージを知りたいとき。
  • ✓エンドポイントが行を返さず、その理由を知りたいとき。
  • ✓キャッシュを使ったかを含め、エンドポイントの直近の数回の実行を確認したいとき。

スキルのリンク

https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/exploring-endpoint-execution-logs/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/exploring-endpoint-execution-logs/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“顧客エンドポイントのログを表示して、直近の3回が失敗した理由を教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

実行されるたびに、結果、所要時間、行数を含むログが1件書かれます。このスキルは、特定のエンドポイントのログ項目を検索し、要約します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Exploring endpoint execution logs

Every endpoint run emits one execution log entry to PostHog's log_entries store. This skill reads those entries for a specific endpoint to answer "what happened when it ran?". It is the log-level counterpart to diagnosing-endpoint-performance (which reasons about cache/materialisation strategy from config and query_log).

When to use this skill

  • "Why is my endpoint failing / erroring?"
  • "Show me the logs / recent runs for endpoint X"
  • "Did the last run hit cache? How many rows did it return?"
  • "What happened the last time endpoint Y ran?"

If the question is "this endpoint is slow, what should I change?", use diagnosing-endpoint-performance. If it's project-wide ("what can I clean up?"), use auditing-endpoints.

What an execution log entry looks like

Each run produces exactly one entry. The level is INFO on success and ERROR on failure, and the message carries the extra data as searchable key=value tokens:

Endpoint executed · path=materialized cache=hit duration_ms=142 rows=1024 version=3
Endpoint execution failed · path=inline error=ResolutionError version=3

Token meanings:

Token Values Meaning
path materialized / inline / ducklake / ducklake_fallback Which execution path ran
cache hit / miss Whether the query result cache was used (omitted for ducklake)
duration_ms integer Wall-clock execution time
rows integer Number of result rows returned
version integer Which endpoint version ran
error e.g. ResolutionError, HogVMException Error class / HogQL code name (failures only)

Each run gets a distinct instance_id, so logs group one-per-execution in the viewer.

Available tools

Tool Purpose
endpoint-logs Primary. Execution log entries for one endpoint by name. Filter by level, search, time range, instance_id; limit up to 500.
endpoint-get Endpoint config for context (current version, materialisation, query kind)
execute-sql Fallback / aggregation directly against log_entries (log_source='endpoints')

Filtering

endpoint-logs exposes the standard log filters:

  • level — comma-separated, e.g. ERROR to see only failed runs, or INFO,ERROR for all.
  • search — case-insensitive substring over the message. Because the extra data is in key=value tokens, you can search cache=miss, path=inline, error=ResolutionError, or a specific version=3.
  • after / before — ISO timestamps to bound the time range.
  • instance_id — pin a single execution.
  • limit — 1–500 (default 50).

Workflow

  1. Identify the endpoint by name. If given a URL, parse it from /api/projects/{team_id}/endpoints/{name}/run.

  2. Start broad: endpoint-logs for the endpoint with a recent time range. Skim levels and tokens.

  3. Narrow to the symptom:

    • Failures → level=ERROR; read the error= token and path= to see where it broke.
    • Cache concerns → search=cache=miss to see how often runs miss cache.
    • Wrong results → compare rows= across runs, and version= to spot a regression after a version bump.
  4. For counts/trends across many runs (e.g. error rate over a week), drop to execute-sql against log_entries:

    SELECT toDate(timestamp) AS day, upper(level) AS level, count() AS runs
    FROM log_entries
    WHERE log_source = 'endpoints' AND log_sou
    
よくある質問

実行のたびにログが作られますか?

はい。エンドポイントの実行ごとにログが1件追加され、成功は info、失敗は error と表示されます。

遅い実行も見られますか?

はい。所要時間が各ログに記録されるため、遅い実行を見つけて比べられます。

パフォーマンスのスキルとの違いは何ですか?

このスキルは各実行で何が起きたかを読みます。パフォーマンスのスキルは、キャッシュや設定について推論します。

詳細

作者による元の説明

Explore and diagnose a PostHog endpoint's execution logs — error messages, failed runs, cache misses, slow runs, or unexpected row counts during endpoint invocations. Use when the user says "my endpoint is failing", "show me the logs for endpoint X", "what error did endpoint Y produce", "why did endpoint Z return no rows", "is this endpoint hitting cache", or "check the last N runs". Focused on a single named endpoint's runtime log entries, not project-wide auditing or query performance profiling.

repo: PostHog/posthog

人気

GitHubのスター
41k
ランキング
#6862
ライセンス
—
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル