Langsung ke konten
Skillpedia
Deploy & cloud (DevOps)41k Β· #6862

exploring-endpoint-execution-logs

Fungsinya

Skill ini membaca entri log yang ditulis untuk setiap eksekusi endpoint dan menjelaskan apa yang terjadi, seperti error atau hasil kosong. Ditujukan untuk orang yang perlu tahu mengapa sebuah endpoint berperilaku tertentu.

Kapan dipakai

  • βœ“Saat sebuah endpoint gagal dan Anda ingin pesan error dari eksekusinya.
  • βœ“Saat sebuah endpoint tidak mengembalikan baris dan Anda ingin tahu alasannya.
  • βœ“Saat Anda ingin memeriksa beberapa eksekusi terakhir dari sebuah endpoint, termasuk apakah eksekusi itu menggunakan cache.

Link skill

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

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/PostHog/posthog/blob/master/products/endpoints/skills/exploring-endpoint-execution-logs/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œTampilkan log endpoint pelanggan saya dan beri tahu saya mengapa tiga eksekusi terakhir gagal.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Setiap eksekusi menulis satu entri log dengan hasil, durasi, dan jumlah baris. Skill mencari entri tersebut untuk endpoint tertentu dan merangkumnya.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
    
Pertanyaan umum

Apakah setiap eksekusi membuat log?

Ya. Setiap eksekusi endpoint menambahkan satu entri log, yang berlabel info saat berhasil dan error saat gagal.

Bisakah saya melihat eksekusi yang lambat?

Bisa. Durasi dicatat di setiap entri log, sehingga eksekusi yang lambat dapat ditemukan dan dibandingkan.

Apa bedanya dengan skill performa?

Skill ini membaca apa yang terjadi di setiap eksekusi, sedangkan skill performa menalar tentang cache dan konfigurasi.

Detail

Deskripsi asli dari pembuat

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

Popularitas

Bintang GitHub
41k
Peringkat
#6862
Lisensi
β€”
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa