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
* Update Distributed Tracing Page
Make a few more tweaks to make this page easier to digest.
* Update docs/concepts/key-terms/tracing/distributed-tracing.mdx
* Update docs/concepts/key-terms/tracing/distributed-tracing.mdx
* Update docs/concepts/key-terms/tracing/distributed-tracing.mdx
Copy file name to clipboardExpand all lines: docs/concepts/key-terms/tracing/distributed-tracing.mdx
+39-46Lines changed: 39 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,44 @@ It's important to note that tracing is not [profiling](https://github.com/produc
21
21
22
22
Learn more in this [Tracing: Frontend issues with backend solutions](https://sentry.io/resources/tracing-frontend-issues-with-backend-solutions/?original_referrer=https%3A%2F%2Fblog.sentry.io%2F) workshop.
23
23
24
-
### Why Tracing?
24
+
### The Tracing Data Model
25
+
26
+
Ultimately, any data structure is defined by the kind of data it contains, and relationships between data structures are defined by how links between them are recorded. Traces, transactions, and spans are no different.
27
+
28
+
#### Traces
29
+
30
+
Traces are defined as the collection of all transactions that share a `trace_id` value.
31
+
32
+
#### Transactions
33
+
34
+
Transactions share most properties (start and end time, tags, and so on) with their root spans. They also have a `transaction_name` property, used in the UI to identify the transaction. Common examples include endpoint paths for backend request transactions, task names for cron job transactions, and URLs for page-load transactions.
35
+
36
+
Before the transaction is sent, the `tags` and `data` properties will get merged with data from the global scope. (Global scope data is set in `Sentry.init()` or by using `Sentry.configureScope()`, `Sentry.setTag()`, `Sentry.setUser()`, or `Sentry.setExtra()`.)
37
+
38
+
39
+
<Note>
40
+
41
+
Transaction names can contain **sensitive data**. See [Scrubbing Sensitive Data](/platforms/javascript/data-management/sensitive-data/#scrubbing-data) for more information.
42
+
43
+
</Note>
44
+
45
+
#### Spans
46
+
47
+
Span data includes:
48
+
49
+
-`parent_span_id`: ties the span to its parent span
50
+
-`op`: short string identifying the type or category of operation the span is measuring
51
+
-`start_timestamp`: when the span was opened
52
+
-`end_timestamp`: when the span was closed
53
+
-`description`: longer description of the span's operation
54
+
-`status`: short code indicating operation's status
55
+
-`tags`: key-value pairs holding additional data about the span
56
+
-`data`: arbitrarily-structured additional data about the span
57
+
58
+
An example use of the `op` and `description` properties together is `op: db.query` and `description: SELECT * FROM users WHERE last_active < %s`. The `status` property indicates the success or failure of the span's operation, or a response code for HTTP requests. `Tags` and `data` attach further contextual information to the span, such as `function: middleware.auth.is_authenticated` for a function call or `request: {url: ..., headers: ... , body: ...}` for an HTTP request.
59
+
To search span data see [Searchable Properties](/concepts/search/searchable-properties/spans/)
60
+
61
+
### What Can Tracing Help With?
25
62
26
63
Applications consist of interconnected components or services. For example, a modern web application may include:
27
64
@@ -47,7 +84,7 @@ Top-level spans can be broken down into smaller spans, mirroring the way one fun
47
84
48
85

Suppose your web application is slow to load. A lot has to happen for your app to get to a usable state: multiple requests to your backend, calls to your database or external APIs, and browser processing. Which part is slowing things down?
53
90
@@ -142,50 +179,6 @@ For a backend periodically polling for data from an external service, processing
142
179
143
180
\* Starred spans are parents of later transactions (and their root spans).
144
181
145
-
### The Tracing Data Model
146
-
147
-
> "Show me your flowchart and conceal your tables, and I shall continue to be mystified. Show me your tables, and I won't usually need your flowchart; it'll be obvious."
148
-
>
149
-
> -- [Fred Brooks](https://en.wikipedia.org/wiki/Fred_Brooks), The Mythical Man Month (1975)
150
-
151
-
Ultimately, any data structure is defined by the kind of data it contains, and relationships between data structures are defined by how links between them are recorded. Traces, transactions, and spans are no different.
152
-
153
-
#### Traces
154
-
155
-
Traces are defined as the collection of all transactions that share a `trace_id` value.
156
-
157
-
#### Transactions
158
-
159
-
Transactions share most properties (start and end time, tags, etc.) with their root spans. They also have a `transaction_name` property, used in the UI to identify the transaction. Common examples include endpoint paths for backend request transactions, task names for cron job transactions, and URLs for page-load transactions.
160
-
161
-
<Note>
162
-
163
-
Transaction names can contain **sensitive data**. See [Scrubbing Sensitive Data](/platforms/javascript/data-management/sensitive-data/#scrubbing-data) for more information.
164
-
165
-
</Note>
166
-
167
-
Before the transaction is sent, the `tags` and `data` properties will get merged with data from the global scope. (Global scope data is set in `Sentry.init()` or by using `Sentry.configureScope()`, `Sentry.setTag()`, `Sentry.setUser()`, and `Sentry.setExtra()`.)
168
-
169
-
Transaction names can contain **sensitive data**. See [Scrubbing Sensitive Data](/platforms/javascript/data-management/sensitive-data/#scrubbing-data) for more information.
170
-
171
-
172
-
173
-
#### Spans
174
-
175
-
Span data includes:
176
-
177
-
-`parent_span_id`: ties the span to its parent span
178
-
-`op`: short string identifying the type or category of operation the span is measuring
179
-
-`start_timestamp`: when the span was opened
180
-
-`end_timestamp`: when the span was closed
181
-
-`description`: longer description of the span's operation
182
-
-`status`: short code indicating operation's status
183
-
-`tags`: key-value pairs holding additional data about the span
184
-
-`data`: arbitrarily-structured additional data about the span
185
-
186
-
An example use of the `op` and `description` properties together is `op: db.query` and `description: SELECT * FROM users WHERE last_active < %s`. The `status` property indicates the success or failure of the span's operation, or a response code for HTTP requests. `Tags` and `data` attach further contextual information to the span, such as `function: middleware.auth.is_authenticated` for a function call or `request: {url: ..., headers: ... , body: ...}` for an HTTP request.
187
-
To search span data see [Searchable Properties](/concepts/search/searchable-properties/spans/)
188
-
189
182
### Important Information About Tracing, Spans & Transactions
0 commit comments