View traces and transactions
Turn on tracing in the Sentry SDK, then see a request's transactions and spans on one time axis, and a project's transactions by name with their durations and failure rate.
Replace project-id with the project's id and trace-id with a trace id (32 hexadecimal characters, as an event's Trace field shows it).
Turn on tracing
Set tracesSampleRate above 0 in Sentry.init (0.1 sends one in ten). Every sampled page load,
navigation and server request then arrives as a transaction with its spans, and the browser's and
the server's transactions of one request share a trace.
Transactions have their own per-minute and per-month quotas, so a burst of traces is refused for transactions only and errors keep flowing; they do count towards the organization's storage quota, which covers every kind of data (see Quotas). Spans are metered (see What is Error Tracking?).
Prerequisites
- Permission for
errors:GetEventson the project. Without it, the Transactions tab says "You can see this project but not its transactions."; a trace shows only the parts in projects you may read, and is not found when that is none of it. - To read a trace through the API or the CLI,
errors:GetEventson the service,rn:ews:de1:<organization id>:errors:*; without it the request is refused with403, even when you may read the project. The console's trace page needs it only on the projects. - In the console, also
errors:ListProjectson the project to open it (without it the project is not found).
Open a trace
- Open an issue whose event has a Trace, and choose the trace id. Or, on the Transactions tab, open a transaction name and choose one of its Slowest examples.
- The Waterfall shows every transaction of the trace with its spans on one time axis: the
server's request under the browser's
fetchthat made it, and errors marked on the span they happened in. Open a row for its details.
The header shows the trace's duration, transactions, spans, errors and, for a page load, its web vitals (LCP, FCP, CLS, TTFB, INP, FID) when the SDK measured them. A transaction whose own clock puts it more than 50 ms outside its caller's span is drawn where that span starts, and its details say how far its clock was off. Errors in this trace lists the trace's errors. When no transaction of the trace was sampled, the page says "No transaction of this trace was sampled." and shows only the errors.
dcloud errors traces get trace-idGET /errors/api/traces/trace-idThe answer has the trace's transactions, errors, the waterfall rows, hidden (rows in
projects you may not read) and profiled (transactions that have a profile).
List a project's transactions
- Open the project, then the Transactions tab.
- Choose 24 h or 7 days.
- (Optional) Choose a transaction for its 10 slowest examples, each of which opens its trace.
dcloud errors transactions list project-id --range 7dGET /errors/api/projects/project-id/transactions?range=7dRows come most frequent first, up to limit (50 by default, at most 200).
Each row is one name and operation:
- Count: extrapolated from each trace's sample rate, with the sampled count beneath it when the two differ.
- p50, p75, p95: durations.
- Failure rate: the share of transactions whose status is set and is not
ok,cancelledorunknown.
A name the SDK took from the raw URL (a Next.js App Router page load, for one) is listed by its
shape: a path segment that looks like an id (digits, a hex or UUID string with a digit in it, or 25
characters or more) shows as *, so /orders/4810 and /orders/4811 are the one row /orders/*.
What is not stored
Request cookies, credential headers and query strings (in URLs and span data) of a transaction are
not stored. Standalone spans (span streaming, traceLifecycle: "stream") are not supported yet:
the ingest answers them with a one-hour rate limit, and nothing shows.