You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/collections/_documentation/performance-monitoring/configuration/javascript.md
+85Lines changed: 85 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -172,3 +172,88 @@ function processItem(item, transaction) {
172
172
});
173
173
}
174
174
```
175
+
176
+
**Grouping Transactions**
177
+
178
+
When Sentry captures transactions, they are assigned a transaction name. This name is generally auto-generated by the Sentry SDK based on the framework integrations you are using. If you can't leverage the automatic transaction generation (or want to customize how transaction names are generated) you can use a global event processor that is registered when you initialize the SDK with your configuration.
179
+
180
+
An example of doing this in a node.js application:
For browser JavaScript applications using the `Tracing` integration, the `beforeNavigate` option can be used to better group navigation/pageload transactions together based on URL.
// You could use your UI's routing library to find the matching
206
+
// route template here. We don't have one right now, so do some basic
207
+
// parameter replacements.
208
+
returnlocation.pathname
209
+
.replace(/\d+/g, '<digits>')
210
+
.replace(/[a-f0-9]{32}/g, '<hash>');
211
+
},
212
+
}),
213
+
],
214
+
});
215
+
```
216
+
217
+
**Adding Query Information and Parameters to Spans**
218
+
219
+
Currently, every tag has a maximum character limit of 200 characters. Tags over the 200 character limit will become truncated, losing potentially important information. To retain this data, you can split data over several tags instead.
Instead, using `span.setTag` splits the details of this request over several tags. This could be done over `baseUrl`, `endpoint`, `parameters`, in this case, resulting in three different tags:
Copy file name to clipboardExpand all lines: src/collections/_documentation/performance-monitoring/configuration/python.md
+50-4Lines changed: 50 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,13 @@ hide_from_sidebar: true
4
4
5
5
To get started with performance monitoring using Sentry's Python SDK, first install the `sentry_sdk` package:
6
6
7
-
```
8
-
$ pip install sentry_sdk
7
+
```python
8
+
import sentry_sdk
9
9
```
10
10
11
11
Next, initialize the integration in your call to `sentry_sdk.init`:
12
12
13
13
```python
14
-
import sentry_sdk
15
-
16
14
sentry_sdk.init(
17
15
"___PUBLIC_DSN___",
18
16
traces_sample_rate=0.25
@@ -101,3 +99,51 @@ def process_item(item):
101
99
```
102
100
103
101
<!-- ENDWIZARD -->
102
+
103
+
**Adding Query Information and Parameters to Spans**
104
+
105
+
Currently, every tag has a maximum character limit of 200 characters. Tags over the 200 character limit will become truncated, losing potentially important information. To retain this data, you can split data over several tags instead.
Instead, using `span.set_tag` splits the details of this query over several tags. This could be done over `base_url`, `endpoint`, `parameters`, in this case, resulting in three different tags:
116
+
```python
117
+
import sentry_sdk
118
+
...
119
+
with sentry_sdk.start_span(op="request", transaction="setup form") as span:
Copy file name to clipboardExpand all lines: src/collections/_documentation/performance-monitoring/performance/event-detail.md
+63-7Lines changed: 63 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ From [Performance](/performance-monitoring/performance/index) and [Discover](/pe
10
10
Information about this specific event is located in the sidebar, listing out the Event ID, date and time of occurrence, project, and downloadable JSON package. More can be found under Event Tag Details. You'll also get a breakdown of operations, which will correspond to the waterfall span view as a legend.
11
11
12
12
{% capture __alert_content -%}
13
-
Currently, only root transactions are searchable. Any span data that inherits from it's root are not.
13
+
Currently, only root transactions are searchable. Any span data that inherits from its root are not.
14
14
{%- endcapture -%}
15
15
{%- include components/alert.html
16
16
title="Warning"
@@ -20,20 +20,30 @@ Currently, only root transactions are searchable. Any span data that inherits fr
20
20
21
21
## Span View
22
22
23
+
The span view is a split view where the left-hand side shows the transaction’s span tree, and the right-hand side represents each span as a colored rectangle. Within the tree view, Sentry identifies spans by their `op` and `description` values. If a span doesn’t have a description, Sentry uses the span’s id as a fallback. The first span listed is always the transaction’s root span, from which all other spans in the transaction descend.
24
+
23
25
[{% asset performance/span-details.png alt="Span detail view shows the span id, trace id, parent span id, and other data such as tags." %}]({% asset performance/span-details.png @path %})
24
26
27
+
To find these views, you can either go through the [Transaction Summary](/performance-monitoring/performance/transaction-summary) or [Query Builder](/performance-monitoring/discover-queries/query-builder/). Event IDs will be linked to open the corresponding Event Detail.
28
+
29
+
**With Transaction Summary**
30
+
31
+
Select the [Performance Homepage](/performance-monitoring/performance/index), then click the affected transaction to display the trace data.
32
+
33
+
**With Query Builder**
34
+
35
+
Scroll down to the "Trace Details" context panel in either the Issue Details or the Discover Event Details page, and click on the "View Summary" button. This will maintain the context of the current Sentry event.
36
+
37
+
_Note_: Users on the Team or Business plans can also view a list of transaction events by clicking on the "Transactions" pre-built query in [Discover](/performance-monitoring/discover-queries/index) or by performing a search with the `event.type:transaction` condition the Discover Query Builder view.
38
+
25
39
### Minimap
26
40
27
-
The minimap reflects the entirety of the transaction broken into spans. You can either click and drag your cursor across the minimap to zoom in or adjust the window selection by dragging the handlebar in from the side. This will affect the range you see in the waterfall view.
41
+
The minimap (top of the span view) reflects the entirety of the transaction broken into spans. You can either click and drag your cursor across the minimap to zoom in or adjust the window selection by dragging the handlebar (black dashed lines) in from the side. This will affect the range you see in the waterfall view.
28
42
29
43
### Waterfall
30
44
31
45
The waterfall view is a split view where the left reflects the transaction's span tree, and the right reflects each span as a horizontal bar (colors represent the operation). Within the tree, Sentry identifies spans by their `operation` and `description` values. If a span doesn't have a description, Sentry uses the span's ID as a fallback. The first span listed is always the transaction's root span, from which all other spans in the transaction descend.
32
46
33
-
_Missing Instrumentation_
34
-
35
-
Gaps between spans may be marked as "Missing Instrumentation." TThis means a duration in the transaction that isn't accounted for by any of the transaction's spans. It likely means that you need to manually instrument that part of your process. Go back to the [performance setup](/performance-monitoring/setup) for details.
36
-
37
47
### Span Details
38
48
39
49
Clicking on a span row expands the details of that span. From here, you can see all attached properties, such as tags and other field data. With the Trace ID, you'll be able to view all transactions within that given trace. Click "Search by Trace" to view that Discover list. Learn more about [distributed tracing](/performance-monitoring/distributed-tracing/) in our docs.
@@ -49,7 +59,7 @@ The trace view may be limited to one project at a time if you're on the [Team pl
49
59
level="info"
50
60
%}
51
61
52
-
_Traversing Transactions_
62
+
**Traversing Transactions**
53
63
54
64
Some spans within a transaction may be the parent of another transaction. Under these circumstances, some Span IDs will have a "View Child" or "View Children" button. These will potentially lead to another transaction or a list of transactions.
55
65
@@ -63,3 +73,49 @@ Traversing between parent and child transactions is only available on the [Busin
63
73
content=__alert_content
64
74
level="info"
65
75
%}
76
+
77
+
**Adding Query Information and Parameters to Spans**
78
+
79
+
Currently, every tag has a maximum character limit of 200 characters. Tags over the 200 character limit will become truncated, losing potentially important information. To retain this data, you can split data over several tags instead.
Instead, using `span.set_tag` you could split the details of this query over several tags. This could be done over `columns`, `tables`, `conditions`, in this case, resulting in three different tags:
90
+
91
+
```python
92
+
import sentry_sdk
93
+
94
+
...
95
+
96
+
with sentry_sdk.start_span(op="db", transaction="query api") as span:
97
+
span.set_tag("columns", columns)
98
+
span.set_tag("tables", tables)
99
+
span.set_tag("conditions", conditions)
100
+
span.set_tag("query_format", query_format)
101
+
query_format ="SELECT {columns} FROM {tables} WHERE {conditions}"
: `first_column=some_value AND second_column=some_other_value AND third_column=yet_another_value`
118
+
119
+
### Missing Instrumentation
120
+
121
+
Gaps between spans may be marked as "Missing Instrumentation." This means a duration in the transaction that isn't accounted for by any of the transaction's spans. It likely means that you need to manually instrument that part of your process. Go back to the [performance setup](/performance-monitoring/setup) for details.
Copy file name to clipboardExpand all lines: src/collections/_documentation/performance-monitoring/performance/transaction-summary.md
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,9 @@ The table also updates dynamically if you change any of the selections in the gl
36
36
37
37
When viewing transactions, you may want to create more curated views. Click "Open in Discover" above the table to create a custom query to investigate further. For more details, see the full documentation for the Discover [Query Builder](/performance-monitoring/discover-queries/query-builder/).
38
38
39
-
## Metrics Sidebar
39
+
_Note_: Currently, only transaction data - the transaction name and any attributes the transaction inherits from its root span - is searchable. Data contained in spans other than the root span is not indexed and therefore cannot be searched.
40
+
41
+
## Related Issues
40
42
41
43
The sidebar contains helpful supplementary information about this transaction's [User Misery](/performance-monitoring/performance/metrics/#user-misery), [Apdex](/performance-monitoring/performance/metrics/#apdex), [Throughput](/performance-monitoring/performance/metrics/#throughput-total-tpm-tps), [Latency](/performance-monitoring/performance/metrics/#latency), and more. You'll also find a Tag Summary (facet map) for a list of common tags related to this transaction.
0 commit comments