---
title: "Tracing"
description: "Follow requests, background jobs, and agent runs across services, and see where they fail or slow down."
url: https://docs.sentry.io/concepts/key-terms/tracing/
---

# Tracing | Sentry Docs

## [What's Tracing?](https://docs.sentry.io/concepts/key-terms/tracing.md#whats-tracing)

Tracing captures the timing and flow of operations through your application, like requests, background jobs, and [agent runs](https://docs.sentry.io/product/agents.md). A trace shows the path that operation took and where it failed or slowed down.

### [What's Distributed Tracing?](https://docs.sentry.io/concepts/key-terms/tracing.md#whats-distributed-tracing)

Distributed tracing provides a unified view of how a single request moves from the frontend to the backend and beyond. This is particularly useful in modern applications, which are often composed of multiple separate services working together. To get a distributed view of your application, instrument Sentry in both your frontend and your backend.

With [distributed tracing](https://docs.sentry.io/concepts/key-terms/tracing/distributed-tracing.md), you can find the step that failed or slowed the work down, including problems you can't see in one service's logs. Use [Trace Explorer](https://docs.sentry.io/product/trace-explorer.md) or [Trace View](https://docs.sentry.io/concepts/key-terms/tracing/trace-view.md) to open that path. The same view covers requests, jobs, and [agent runs](https://docs.sentry.io/product/agents.md), and problems such as a dropped handoff, a race, an [N+1 query](https://docs.sentry.io/product/issues/issue-details/performance-issues/n-one-queries.md), or a [cache miss](https://docs.sentry.io/product/dashboards/sentry-dashboards/backend/caches.md).

### [What's a Trace?](https://docs.sentry.io/concepts/key-terms/tracing.md#whats-a-trace)

A trace is a record of a series of connected events and operations coming from your application. Each trace has a string of globally unique characters called a trace ID that's passed between frontend and backend services. The trace ID connects all the actions that take place, starting from the moment a user performs an action on the frontend, all the way through to the actions this triggers across your application and services. Each trace is composed of multiple spans.

### [What's a Span?](https://docs.sentry.io/concepts/key-terms/tracing.md#whats-a-span)

A span is one named, timed operation that represents a part of the application workflow. The data captured for each span provides granular insights into specific tasks, like API requests, model calls, or database queries. Multiple spans are pieced together to create a trace, providing a comprehensive overview of how your application works. This makes it easier to troubleshoot.

### [What are Span Attributes and Metrics?](https://docs.sentry.io/concepts/key-terms/tracing.md#what-are-span-attributes-and-metrics)

Span attributes and metrics are key pieces of information that are captured for each span. Attributes are key-value pairs that provide additional context about the span, such as the name of the operation or the user ID. Metrics are numerical values that measure the performance of the span, such as the duration of the operation or the number of database queries.

### [What's a Transaction?](https://docs.sentry.io/concepts/key-terms/tracing.md#whats-a-transaction)

Transactions are a legacy concept replaced by service spans, which are entry-point spans that mark a service boundary within a trace. New SDKs and features use spans exclusively. See [Trace Explorer](https://docs.sentry.io/product/trace-explorer.md) for the recommended way to query traces.

In Sentry, a "transaction" is a specific unit that represents any event that your application sends to Sentry, like loading a web page or processing an API call. Each transaction is made up of one or more spans. Transactions have a unique transaction ID and include the associated child spans that capture the operation’s entire process from start to finish.

### [What's a Service Span?](https://docs.sentry.io/concepts/key-terms/tracing.md#whats-a-service-span)

A service span is the entry point of a service within a trace — the span-based replacement for a transaction. Like a transaction, a service span has a name, a status, and child spans that capture the operation's full lifecycle from start to finish.

A trace can contain multiple service spans, typically one for each service involved. The first service span in a trace (the one with no parent) is also the trace's root span.

## [How to Use Tracing in Sentry](https://docs.sentry.io/concepts/key-terms/tracing.md#how-to-use-tracing-in-sentry)

If you instrument Sentry for a single part of your app (just the frontend for example), looking at a trace will provide useful context for debugging issues within that app or service. But to get the most out of tracing in Sentry, you'll need to instrument the frontend, the backend, and any services in-between with Sentry's SDK. Once this is done, there are several places where you can view and interact with tracing data:

### [Traces to Trace View](https://docs.sentry.io/concepts/key-terms/tracing.md#traces-to-trace-view)

You can view all the traces in your organization by going to the [Traces](https://sentry.io/orgredirect/organizations/:orgslug/traces/) page in Sentry. You'll see a chart and a list of traces letting you know how long each trace took to complete and the number of spans it contains.

If you want more information, click on any trace ID. This will take you to the [Trace View](https://docs.sentry.io/concepts/key-terms/tracing/trace-view.md) page, which provides a more detailed view of the trace and its spans. Here, you'll see a waterfall view of the spans in the trace, which will show you how much time each service and operation took to complete, and may give you an indicator of where a problem may originate.

Alternatively, you can use the search bar to look for spans by name, project, or other criteria. You can also use the tags section to filter spans by specific tags. Learn more about the Sentry [Trace Explorer](https://docs.sentry.io/product/trace-explorer.md).

### [Dashboards to Trace View](https://docs.sentry.io/concepts/key-terms/tracing.md#dashboards-to-trace-view)

Depending on the size and volume of your app, you may have a lot of traces to sort through. The [Sentry Dashboards](https://sentry.io/orgredirect/organizations/:orgslug/dashboards/) page in Sentry is a good place to get a high-level, aggregated view of your application's performance and focus in on the traces you care about. You'll see a list of traces for specific pages, endpoints, and parts of your application. Opening a trace takes you to the Trace View for that trace. Learn more about using [Sentry Dashboards](https://docs.sentry.io/product/dashboards/sentry-dashboards.md).

## [How Tracing Can Help You Debug](https://docs.sentry.io/concepts/key-terms/tracing.md#how-tracing-can-help-you-debug)

Sentry’s tracing lets you follow each request across various services, databases, and functions. This makes it easier to find exactly when and where an error occurred or a performance bottleneck started. Below, you'll find some real-world scenarios where tracing saved the day.

### [Debug Slowdowns Across Your Integrations](https://docs.sentry.io/concepts/key-terms/tracing.md#debug-slowdowns-across-your-integrations)

When debugging integrations or a microservice architecture, you'll likely run into issues where the root cause is tricky to discover, especially when it's a performance issue. At Sentry, we make sure to add spans whenever we’re working with external services, like Slack. Because of this, when our users started experiencing a 4-second delay in receiving Sentry alerts via Slack, we were able to go to the [Trace View](https://docs.sentry.io/concepts/key-terms/tracing/trace-view.md) and quickly narrow down which task was causing the slowdown and deploy a fix quickly. Read more about the details of [debugging Sentry’s Slack Integration](https://blog.sentry.io/debugging-a-slack-integration-with-sentrys-trace-view/).

### [Improve Core Web Vitals](https://docs.sentry.io/concepts/key-terms/tracing.md#improve-core-web-vitals)

While everyone is sharing Lighthouse scores, we all know that the true determination of healthy web vitals is when your actual users are using your application in their authentic environments. Sentry offers real insights and analysis of your application in the real world, and while tracing can be leveraged to reactively solve issues, you can also use it to proactively discover opportunities to improve your application performance. In fact, this blog post describes [how you can improve performance before your web page even loads](https://blog.sentry.io/how-to-make-your-web-page-faster-before-it-even-loads/).

### [Debug New Code Bases Faster](https://docs.sentry.io/concepts/key-terms/tracing.md#debug-new-code-bases-faster)

Tracing can even give you the power to debug unfamiliar codebases. Although this benefit is not often discussed, a lot of time can be saved when debugging applications instrumented with Tracing, even if the codebase is completely new to you. Being able to trace actual user journeys throughout your application and see what happens across your entire stack contextualizes issues without even needing to recreate the issue locally. Read about other ways [tracing helps developers debug various issues](https://blog.sentry.io/everyone-needs-to-know-how-to-trace/).

### [Trace Agent Workflows](https://docs.sentry.io/concepts/key-terms/tracing.md#trace-agent-workflows)

If you're building with agents, LLMs, or MCP servers, Sentry's [Agent Tracing](https://docs.sentry.io/product/agents.md) extends your existing tracing setup to capture the full picture — model calls, tool executions, token usage, and agent handoffs — all connected to the same traces as your HTTP requests, database queries, and application errors. Learn more about [setting up Agent Tracing](https://docs.sentry.io/product/agents/getting-started.md).

## [Learn More](https://docs.sentry.io/concepts/key-terms/tracing.md#learn-more)

* #### [Distributed Tracing](https://docs.sentry.io/concepts/key-terms/tracing/distributed-tracing.md)

  Follow a request, background job, or agent run across services, and see where it fails or slows down.

* #### [Trace View](https://docs.sentry.io/concepts/key-terms/tracing/trace-view.md)

  Open one trace to see where it failed, which errors are related, and where it slowed down.

## Pages in this section

- [Distributed Tracing](https://docs.sentry.io/concepts/key-terms/tracing/distributed-tracing.md)
- [Trace View](https://docs.sentry.io/concepts/key-terms/tracing/trace-view.md)
- [event-detail](https://docs.sentry.io/concepts/key-terms/tracing/event-detail.md)
