
Exploring Endpoint Execution Logs
FreeDiagnose issues with PostHog endpoint logs efficiently.
Free · Opens the source repo
What Exploring Endpoint Execution Logs does
The Exploring Endpoint Execution Logs skill provides a focused approach to diagnosing issues with specific PostHog endpoints by analyzing their execution logs. Each invocation of an endpoint generates a log entry that captures critical information, including success or failure status, execution duration, cache usage, and the number of rows returned. This skill allows users to query these logs to understand what happened during the execution of an endpoint, making it invaluable for troubleshooting errors and performance issues.
When users encounter problems such as an endpoint failing or returning unexpected results, they can utilize this skill to retrieve relevant log entries. The skill supports filtering logs by various parameters, including log level (INFO or ERROR), search terms, timestamps, and instance IDs. This enables users to pinpoint specific issues, such as identifying error messages or determining whether the endpoint utilized cached results. The structured log entries, which include key-value pairs, provide detailed insights into the execution path and any errors encountered, allowing for effective diagnosis of the root cause.
This skill is particularly useful for developers and data engineers who work with PostHog and need to quickly assess the health and performance of their endpoints. By focusing on individual endpoint logs rather than broader project audits, users can efficiently troubleshoot specific problems without being overwhelmed by extraneous information. Whether it's investigating a recent failure or analyzing trends in execution performance, this skill offers the necessary tools to enhance endpoint reliability and performance.
In summary, the Exploring Endpoint Execution Logs skill is a targeted solution for diagnosing endpoint issues within PostHog, providing users with the ability to quickly access and analyze execution logs to resolve problems effectively.
When to use it
Use this skill when you need to investigate specific errors or performance issues related to a single PostHog endpoint.
When not to use it
Avoid using this skill for project-wide audits or performance profiling, as it is designed for individual endpoint analysis only.
What you can build with it
Diagnosing a Failing Endpoint
When an endpoint starts failing, use this skill to retrieve recent logs and identify the error messages.
Analyzing Cache Performance
Check if an endpoint is hitting the cache by searching for cache-related tokens in the logs.
Investigating Unexpected Results
Compare the number of rows returned across different runs to identify potential issues with data consistency.
How to install Exploring Endpoint Execution Logs
View source1. Install with the skills CLI
npx skills add posthog/posthog/exploring-endpoint-execution-logs --agent claude-code2. Or install it manually
Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.
Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs
Inside SKILL.md
Written by posthogExploring 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.
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.
- Failures →
-
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.
Frequently asked questions about Exploring Endpoint Execution Logs
Similar skills
Agent Host Debug Logs
Analyze Agent Host debug logs for deeper insights.
Code OSS Dev - Launch + Debug
Launch and debug Code OSS with isolated profiles.
Phoenix CLI
Debug LLM applications with structured analysis tools.
Power Automate Debugging
Diagnose and fix Power Automate flow errors effectively.
Arize Trace
Inspect and export traces for LLM applications.
Runtime Behavior Probe
Investigate real runtime behavior with precision.
