Find why a published app fails
Read a published app's logs and traces on the platform with aicoded logs and aicoded traces,
or the logs, traces and trace tools of aicoded mcp, follow a failed request through its
trace, and fix the code. Read production only when the developer asks: its logs hold what the
app logged while people used it.
Steps
-
Ask the developer what failed and when, such as "saving a ticket failed at about 9:10". The platform keeps 30 days, and one read covers at most 7 days and 1000 rows (E-PUB-015, E-PUB-016), and an answer of at most 16 MiB (E-PUB-020).
-
Read the errors of that time, in the app's folder or with
--app.--envisprevieworproductionand must be given:aicoded logs --env production --since 2h --level ERRORWith MCP, call
logswithapp,envproduction,since2handlevelERROR. A line that belongs to a request ends withtrace <id>. -
Read that request's spans, indented below the span that holds them, with the error codes of the spans that failed:
aicoded traces --env production --trace 4bf92f3577b34da6a3ce929d0e0e4736With MCP, call
tracewith theapp,envandtrace_id. Without--trace,aicoded traceslists the newest spans, and thetracestool the newest traces,errors_onlyfor those with a failed span. -
Read the page of the error code a span or a line shows, such as
aicoded explain E-SQL-001, find the code that made it, write a test inaicoded devthat fails the same way, and fix it. Logs and spans hold the error's kinds and codes, never its text, outsideaicoded dev; see telemetry. -
Commit, run
aicoded check, and publish only when the developer asks.
Rules
- Never copy log lines or span attributes into code, tests, commits or anything else: they can hold what the app's users entered.
- Your sign-in reads only apps you own. Another builder's app is E-PUB-005, and an app never published E-PUB-019. When the platform cannot read logs right now (E-PUB-018), try again later.
- Every read is written to the platform's audit log, with the app, the range and the filters.