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: docs/platforms/javascript/common/tracing/index.mdx
+18-13Lines changed: 18 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,7 @@ description: "Learn how to enable tracing in your app."
4
4
sidebar_order: 4000
5
5
---
6
6
7
-
With [tracing](/product/insights/overview/), Sentry tracks your software performance, measuring metrics like throughput and latency, and displaying the impact of errors across multiple systems. Sentry captures distributed traces consisting of transactions and spans, which measure individual services and individual operations within those services. Learn more about our model in [Distributed Tracing](/product/sentry-basics/tracing/distributed-tracing/).
You can additionally <PlatformLinkto="/profiling">set up Profiling</PlatformLink> to get even more detailed tracing information like stack traces and flame graphs.
11
-
</PlatformSection>
7
+
With [tracing](/product/insights/overview/), Sentry automatically tracks your software performance across your application services, measuring metrics like throughput and latency, and displaying the impact of errors across multiple systems.
@@ -34,24 +30,33 @@ With [tracing](/product/insights/overview/), Sentry tracks your software perform
34
30
## Configure
35
31
36
32
<PlatformSectionsupported={["javascript"]}>
37
-
First, enable tracing and configure the sampling rate for transactions. Set
33
+
Enable tracing by configuring the sampling rate for transactions. Set
38
34
the sample rate for your transactions by either:
39
35
</PlatformSection>
40
36
41
37
<PlatformSectionnotSupported={["javascript"]}>
42
-
First, configure the sampling rate for transactions. Set the sample rate for
43
-
your transactions by either:
38
+
Enable tracing by setting the sample rate for your transactions.
44
39
</PlatformSection>
45
40
46
-
- Setting a uniform sample rate for all transactions using the <PlatformIdentifiername="traces-sample-rate" /> option in your SDK config to a number between `0` and `1`. (For example, to send 20% of transactions, set <PlatformIdentifiername="traces-sample-rate" /> to `0.2`.)
47
-
- Controlling the sample rate based on the transaction itself and the context in which it's captured, by providing a function to the <PlatformIdentifiername="traces-sampler" /> config option.
The two options are meant to be mutually exclusive. If you set both, <PlatformIdentifiername="traces-sampler" /> will take precedence.
43
+
- You can set a uniform sample rate for all transactions using the <PlatformIdentifiername="traces-sample-rate" /> option in your SDK config to a number between `0` and `1`. (For example, to send 20% of transactions, set <PlatformIdentifiername="traces-sample-rate" /> to `0.2`.)
44
+
- For more granular control over sampling, you can set the sample rate based on the transaction itself and the context in which it's captured, by providing a function to the <PlatformIdentifiername="traces-sampler" /> config option.
The two options are mutually exclusive. If both are set, <PlatformIdentifiername="traces-sampler" /> will take precedence.
52
47
53
48
Learn more about tracing <PlatformLinkto="/configuration/options/#tracing-options">options</PlatformLink>, how to use the <PlatformLinkto="/configuration/sampling/#setting-a-sampling-function">tracesSampler</PlatformLink> function, or how to <PlatformLinkto="/configuration/sampling/#sampling-transaction-events">sample transactions</PlatformLink>.
54
49
50
+
## Distributed Tracing
51
+
52
+
Sentry captures distributed traces consisting of transactions and spans, which measure individual services and individual operations within those services. Learn more about our model in [Distributed Tracing](/product/sentry-basics/tracing/distributed-tracing/).
You can additionally <PlatformLinkto="/profiling">set up Profiling</PlatformLink> to get even more detailed tracing information like stack traces and flame graphs.
@@ -74,7 +79,7 @@ If you leave your sample rate at `1.0`, a transaction will be sent every time a
74
79
75
80
You can also manually start spans to instrument specific parts of your code. This is useful when you want to measure the performance of a specific operation or function.
76
81
77
-
See <PlatformLinkto="/tracing/instrumentation/custom-instrumentation">Custom Instrumentation</PlatformLink> to learn how to manually start spans.
82
+
See <PlatformLinkto="/tracing/span-metrics/">Sending Span Metrics</PlatformLink> to learn how to manually start spans.
Copy file name to clipboardExpand all lines: docs/platforms/javascript/common/tracing/span-metrics/index.mdx
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,19 +1,19 @@
1
1
---
2
-
title: Span Metrics
3
-
description: "Learn how to add custom metrics to your spans for enhanced performance monitoring and debugging."
2
+
title: Sending Span Metrics
3
+
description: "Learn how to add and send custom metrics to your spans for performance monitoring and debugging."
4
4
sidebar_order: 10
5
5
---
6
6
7
7
<Alert>
8
8
9
-
To use span metrics effectively, you must first <PlatformLinkto="/tracing/">set up tracing</PlatformLink> in your application.
9
+
To use span metrics, you must first <PlatformLinkto="/tracing/">configure tracing</PlatformLink> in your application.
10
10
11
11
</Alert>
12
12
13
-
Span metrics allow you to track custom performance data and debugging information within your application's traces. There are two main approaches to instrumenting metrics:
13
+
Span metrics allow you to extend the default metrics that are collected by tracing and track custom performance data and debugging information within your application's traces. There are two main approaches to instrumenting metrics:
14
14
15
-
1. Adding metrics to existing spans
16
-
2. Creating dedicated spans with custom metrics
15
+
1.[Adding metrics to existing spans](#adding-metrics-to-existing-spans)
16
+
2.[Creating dedicated spans with custom metrics](#creating-dedicated-metric-spans)
0 commit comments