Skip to content

Commit 8ea66a6

Browse files
coolguyzoneAlex Krawiec
and
Alex Krawiec
authored
New Trace Explorer EA (#12432)
* Add draft for new trace explorer page * Add images and polish layout * Add minor copy edits * Add more copy edits * Move early access trace explorer to its own page * Add new section and screenshot * Remove old note notation --------- Co-authored-by: Alex Krawiec <[email protected]>
1 parent c2886a4 commit 8ea66a6

File tree

9 files changed

+101
-0
lines changed

9 files changed

+101
-0
lines changed

docs/organization/early-adopter-features/index.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ Limitations:
2323
- [Investigation Mode](/product/performance/retention-priorities/#investigation-mode) for retention priorities in Tracing
2424
- [Uptime Monitoring](/product/alerts/uptime-monitoring/)
2525
- [Dynamic Alerts](/product/alerts/create-alerts/metric-alert-config/#dynamic-alerts)
26+
- [New Trace Explorer With App Metrics](/product/explore/new-trace-explorer/)
Loading
Loading
Loading
Loading
Loading
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
---
2+
title: "New Trace Explorer With App Metrics"
3+
sidebar_order: 31
4+
description: "Learn how to use the new Sentry Trace Explorer to search span data, find distributed traces, and debug performance issues across your entire application stack."
5+
---
6+
7+
<Alert>
8+
The new Trace Explorer is currently an Early Adopter feature, to use it you will need to [enable your Early Adopter status](/organization/early-adopter-features/). If you are not an Early Adopter, you will still see the [classic Trace Explorer](/product/explore/traces/).
9+
</Alert>
10+
11+
The [**Trace Explorer**](https://sentry.io/orgredirect/organizations/:orgslug/traces/) in Sentry is designed to make investigating performance issues easier and more intuitive. You can now explore span samples, visualize span attributes, and aggregate your data with flexible queries and filters. This guide will walk you through the key concepts and features of the Trace Explorer.
12+
13+
![Trace Explorer Screenshot](./img/trace-explorer01.png)
14+
15+
## Key Concepts
16+
17+
### Traces
18+
19+
- A trace represents a single transaction or request through your system.
20+
- It captures a series of operations (_spans_) that show how different parts of your application interacted during that transaction.
21+
- Each trace is identified by a **Trace ID**, which you can use to follow a request across services or projects (For example, from your frontend framework to your backend service).
22+
23+
### Spans
24+
25+
- A _span_ represents an individual operation within a trace. This could be a database query, HTTP request, or UI rendering task.
26+
- Each span has:
27+
- **Attributes**: Key-value pairs like `http.method`, `db.query`, `span.description`, or custom tags, providing additional context.
28+
- **Duration (`span.duration`)**: The time to complete the operation, used to measure performance.
29+
30+
## Browsing Span and Trace samples
31+
32+
Trace Explorer allows you to browse span and trace samples effortlessly. Here's how:
33+
34+
1. **Search for Samples**:
35+
- Use the search bar to filter results based on attributes like `span.op`, `http.method`, or any custom tags.
36+
- You can edit columns in span tables to view any attribute.
37+
- You can switch between **Span Samples** and **Trace Samples** tabs depending on your focus.
38+
1. **Inspect Samples**:
39+
40+
- Clicking on a **Span ID** or **Trace ID** opens the **Trace Waterfall View**, showing the sequence of operations and their durations.
41+
- You can explore individual spans in detail or see the trace's overall structure.
42+
43+
1. **Sort Samples**:
44+
- Use the **Sort By** dropdown or click on the table column headers to sort your data by `span.duration`, `timestamp`, or any other field.
45+
46+
![Trace Explorer Screenshot](./img/trace-explorer02.png)
47+
48+
## Visualizing Span Attributes
49+
50+
Trace Explorer makes it easy to visualize metrics aggregated from any span attribute.
51+
52+
1. **Set Up Visualization**:
53+
- Use the **Visualize** section to add metrics like `avg(span.duration)` or `p90(span.duration)` to the same chart by clicking **Add Series** or a different chart by clicking the **+** icon.
54+
- You can also create custom visualizations such as:
55+
- **P90 of span durations**: Useful for identifying outliers.
56+
- **Average cache size**: Analyze attributes specific to backend spans.
57+
2. **Filter Your Data**:
58+
- Refine your visualization by applying filters in the search bar, such as `span.op:db` to focus on database spans or `http.status_code:500` for errors.
59+
60+
The line chart updates dynamically as you apply filters, helping you track trends and identify anomalies.
61+
62+
![Trace Explorer Screenshot](./img/trace-explorer03.png)
63+
![Trace Explorer Screenshot](./img/trace-explorer04.png)
64+
65+
## Aggregating Span Data
66+
67+
Dive deeper into your data with aggregation capabilities in Trace Explorer.
68+
69+
1. **Enable Aggregate Grouping**:
70+
- Click the **Aggregates** toggle to switch span samples to aggregate data.
71+
- You can add grouping, filters, and calculations for deeper analysis.
72+
2. **Group By Attributes**:
73+
- Use the **Group By** section to group spans by any attribute, like `http.method`, `span.op`, or custom tags.
74+
- For example:
75+
- Group spans by `http.method` to compare the performance of `GET` vs `POST` requests.
76+
- Analyze spans by `db.table` to find slow database operations.
77+
3. **Apply HAVING Conditions**:
78+
- After grouping, use **cell actions** to filter results directly in the table.
79+
- For example:
80+
- Filter for spans where `avg(span.duration) > 1s` to focus on long-running operations.
81+
82+
![Trace Explorer Screenshot](./img/trace-explorer05.png)
83+
84+
## Creating Alerts and Dashboard Widgets From Queries
85+
86+
You can create Alerts and Dashboard widgets from your queries by clicking the "Save As" button:
87+
88+
![Trace Explorer Screenshot](./img/trace-explorer06.png)
89+
90+
91+
## Practical Examples
92+
93+
- **Diagnosing Slow Pages**:
94+
- Search for `span.op:navigation` and visualize `p90(span.duration)` to pinpoint slow page loads.
95+
- **Finding Problematic API Calls**:
96+
- Group by `http.url` and filter where `avg(span.duration) > 2s` to identify slow external API calls.
97+
- **Database Query Analysis**: Group by `db.query` and sort by `avg(span.duration)` to find inefficient queries.
98+
99+
With these tools, the Trace Explorer gives you powerful ways to understand your application's performance, identify bottlenecks, and make informed optimizations.

docs/product/explore/traces/index.mdx

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ For a list of built-in key fields used in Sentry, check out our [Searchable Prop
4747

4848
Trace Explorer uses sampled data. Your search results may be limited based on sampling rates and retention policies. Learn more about [retention priorities](/product/performance/retention-priorities/).
4949

50+
5051
</Alert>
5152

5253
## Search Query Results

0 commit comments

Comments
 (0)