// DEFINITION

What is Trace?

A journey of a single request through your app and its dependencies.

In plain English

A trace is a record of what happened during a single request — from the moment it hit your app to the moment the response was sent. It includes all the function calls, database queries, and API calls that happened along the way, with timing for each. A trace is made up of 'spans' (individual operations within the trace). If your app calls an external API, that's a span. If it queries a database, that's a span. Traces let you see not just 'what broke' but 'where in the flow it broke' and 'how long each step took'. FlareLog generates W3C-compliant traces automatically.

Why it matters

Logs tell you what happened. Traces tell you the sequence and timing. If your app is slow, logs won't tell you which part is slow — but a trace will show you that the database query took 800ms and the API call took 50ms. If an error occurred, the trace shows you the exact step that failed and what happened before it. For debugging vibe-coded apps, traces are invaluable because they show you the flow the AI generated — which you might not fully understand.

How FlareLog handles it

FlareLog auto-generates W3C traces for every request on Cloudflare Workers (via the Tail Worker) and for every SDK-instrumented request on other platforms. Traces include the request, any subrequests (fetch calls), and error spans. The traceId is shared between logs and traces, so you can correlate them. The MCP server lets your AI read traces by traceId.

FAQ

What's a 'span'?

A span is a single operation within a trace. If your request handler calls fetch('https://api.example.com'), that's a span. If it queries a database, that's a span. A trace is a collection of spans that all share the same traceId. Spans have a start time, end time, name, and attributes (like HTTP method, URL, status code).

Do I need to add trace code to my app?

No. FlareLog's Tail Worker auto-generates a SERVER span for every Cloudflare Workers request. If you use the SDK, it also creates spans for subrequests (fetch calls). You don't need to write any tracing code — it's automatic.

See Trace in action

Start free →

Related terms