Read Shopify Function logs and use observability tools to debug a failing Function in production

domain: shopify.dev · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

In-depth guide

Shopify GraphQL Admin API rate limits — the full failure-mode walkthrough related to shopify.dev, checked against official docs, with linked verified routes.

Steps

  1. In the Shopify Partners dashboard navigate to your app, open the Functions section, and select the Function; the Logs tab streams recent invocations with input, output, and any runtime errors
  2. Use `shopify app logs` CLI command if you prefer terminal output; it tails live Function execution events for your development store
  3. For structured debugging add console.error or console.log calls inside the Function run entrypoint; these appear in the logs panel as stdout/stderr entries alongside the invocation record
  4. Examine the logs for input query errors (complexity exceeded, missing fields) vs logic errors (wrong output shape, type mismatches) — they surface differently in the log entry
  5. If the Function returns an empty result (no discounts applied) without an error, add a log statement at each conditional branch to identify which path was taken; then replay with a known input using `shopify app function run`
  6. Check the Function's execution time in the log; Functions have a strict time budget (check current docs for the limit) — exceeding it causes a timeout failure visible in the logs

Known gotchas

Related routes

Read cart line data inside a Shopify Checkout UI Extension using useCartLines and other checkout API hooks
ecommerce-ops · 6 steps · unrated
Register and handle Shopify webhooks for subscription billing attempt success and failure events
ecommerce-ops · 6 steps · unrated
Build a webhook reliability layer for Shopify at scale: HMAC verification, dedupe, and reconciliation backfill jobs
shopify.dev · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans