Exploring Endpoint Execution Logs
PostHogOfficialPublished by PostHog
- Skill
- Review and audit
- Data and AI
- MIT
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
This skill provides a structured approach to investigating individual endpoint execution logs within PostHog. By parsing structured key-value tokens from log entries, it helps identify why specific endpoint runs fail, whether they are hitting the cache, and if recent version changes have introduced regressions. It is designed for targeted troubleshooting of specific endpoints rather than broad system auditing or performance profiling.
What it does
- Retrieves execution logs for a specific named endpoint.
- Filters logs by severity level, time range, or specific error tokens.
- Extracts runtime metadata such as execution path, cache status, duration, and row counts.
- Identifies specific error classes like ResolutionError or HogVMException.
- Supports SQL-based aggregation for analyzing error rates and trends over time.
- Correlates execution failures with specific endpoint versions.
When to use it
- When an endpoint is returning errors or failing to execute.
- When you need to verify if an endpoint is successfully utilizing the cache.
- When investigating why an endpoint returned unexpected row counts.
- When comparing recent execution behavior against historical performance.
- When debugging a specific endpoint version after a recent update.
Advantages
- Provides clear visibility into the success or failure of individual endpoint runs.
- Allows for precise filtering using searchable key-value tokens.
- Enables quick identification of regressions by comparing version-specific logs.
- Offers a path to aggregate data for broader trend analysis via SQL.
- Distinguishes between execution failures and general performance issues.
Usage examples
- “Why is my endpoint weekly_signups failing?”
- The agent retrieves the recent error logs for weekly_signups, identifies the specific error class and execution path, and compares it against previous successful runs to pinpoint the regression.
- “Did the last run of user_activity_report hit the cache?”
- The agent queries the execution logs for the specified endpoint and checks the cache token to confirm if the result was served from the cache or computed inline.
Install
Download the skill as a ZIP:
https://autogineer.com/agent-skills/posthog/exploring-endpoint-execution-logs/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip exploring-endpoint-execution-logs.zip -d .agents/skills
Documentation by PostHog
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=3Token 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.
ERRORto see only failed runs, orINFO,ERRORfor all.search — case-insensitive substring over the message. Because the extra data is in
key=valuetokens, you can searchcache=miss,path=inline,error=ResolutionError, or a specificversion=3.after / before — ISO timestamps to bound the time range.
instance_id — pin a single execution.
limit — 1–500 (default 50).
Workflow
Identify the endpoint by name. If given a URL, parse it from
/api/projects/{team_id}/endpoints/{name}/run.Start broad:
endpoint-logsfor the endpoint with a recent time range. Skim levels and tokens.Narrow to the symptom:
Failures →
level=ERROR; read theerror=token andpath=to see where it broke.Cache concerns →
search=cache=missto see how often runs miss cache.Wrong results → compare
rows=across runs, andversion=to spot a regression after a version bump.
For counts/trends across many runs (e.g. error rate over a week), drop to
execute-sqlagainstlog_entries:SELECT toDate(timestamp) AS day, upper(level) AS level, count() AS runs FROM log_entries WHERE log_source = 'endpoints' AND log_source_id = '<endpoint_uuid>' GROUP BY day, level ORDER BY day DESCGet the endpoint UUID from
endpoint-get(thelog_source_idis the endpoint id, not its name).Summarize: what's failing, since when, on which version/path, and whether it's a config issue (hand off to
diagnosing-endpoint-performance) or a query bug.
Example interaction
User: "weekly_signups started erroring this morning"
Agent steps:
- endpoint-logs weekly_signups, level=ERROR, after=<this morning>
→ several "Endpoint execution failed · path=inline error=ResolutionError version=5"
- endpoint-get weekly_signups → current version is v5 (bumped today)
- endpoint-logs weekly_signups, level=INFO, before=<this morning>
→ prior runs: "path=inline cache=hit ... version=4" succeeded
- "v5 (created this morning) is failing with a ResolutionError on the inline path — it can't
resolve a table or field reference. v4 ran fine. This looks like a bad query in the new
version. Want me to pull the v5 query (endpoint-versions) so we can fix it, or roll back to v4?"Important notes
One entry per run. Don't expect step-by-step traces — endpoints log a single completion line. The detail lives in the tokens, not in multiple lines.
log_source_idis the endpoint UUID, not the name. Forexecute-sql, fetch it viaendpoint-getfirst.Logs are retained ~90 days (the
log_entriesTTL). Older runs won't appear.Execution logs ≠ query performance.
endpoint-logstells you what happened and why a run failed; for "should I materialise / bump cache TTL?" usediagnosing-endpoint-performance, which reasons over config andquery_logcost metrics.Best-effort emission. A log line is emitted after each run but never blocks it — if a run succeeded for the caller but no log shows, the emit was dropped, not the query.
Files
- ATTRIBUTION.mdAdded by AutoGineer885 B
- LICENSELicence file added by AutoGineer1.0 KiB
- SKILL.md6.8 KiB
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- PostHog
- Publisher
- PostHog (Official)
- Source
- PostHog/skills · skills/omnibus/exploring-endpoint-execution-logs · commit a5d30e7
- Licence
- MIT License (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by PostHog or PostHog.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download exploring-endpoint-execution-logs.zip