Skip to content

Commit 21f6c03

Browse files
committed
Merge branch 'codyde/javascript-tracing-refactor' of https://github.com/getsentry/sentry-docs into codyde/javascript-tracing-refactor
* 'codyde/javascript-tracing-refactor' of https://github.com/getsentry/sentry-docs: Update docs/platforms/javascript/common/tracing/instrumentation/index.mdx Update docs/platforms/javascript/common/tracing/instrumentation/index.mdx Update docs/platforms/javascript/common/tracing/instrumentation/index.mdx Update docs/platforms/javascript/common/tracing/instrumentation/index.mdx Update docs/platforms/javascript/common/tracing/instrumentation/index.mdx Update docs/platforms/javascript/common/tracing/span-metrics/index.mdx Update docs/platforms/javascript/common/tracing/span-metrics/index.mdx Update docs/platforms/javascript/common/tracing/span-metrics/index.mdx Update docs/product/tracing/span-metrics/index.mdx Update docs/platforms/javascript/common/tracing/index.mdx Update docs/platforms/javascript/common/tracing/instrumentation/index.mdx Update docs/platforms/javascript/common/tracing/instrumentation/index.mdx Update docs/platforms/javascript/common/tracing/index.mdx
2 parents 758a14b + 19f6635 commit 21f6c03

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

docs/concepts/key-terms/tracing/span-metrics.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ There are two primary methods for implementing span metrics:
6969

7070
### 1. Enhancing Existing Spans
7171

72-
Augment automatically created or manually defined spans with additional metric attributes:
72+
Augment automatically-created or manually-defined spans with additional metric attributes:
7373

7474
```javascript
7575
// Adding metrics to an existing file upload span

docs/platforms/javascript/common/tracing/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ With [tracing](/product/insights/overview/), Sentry automatically tracks your so
4040

4141
<PlatformContent includePath="performance/configure-sample-rate" />
4242

43-
- You can set a uniform sample rate for all transactions using the <PlatformIdentifier name="traces-sample-rate" /> option in your SDK config to a number between `0` and `1`. (For example, to send 20% of transactions, set <PlatformIdentifier name="traces-sample-rate" /> to `0.2`.)
43+
- You can establish a uniform sample rate for all transactions by setting the <PlatformIdentifier name="traces-sample-rate" /> option in your SDK config to a number between `0` and `1`. (For example, to send 20% of transactions, set <PlatformIdentifier name="traces-sample-rate" /> to `0.2`.)
4444
- 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 <PlatformIdentifier name="traces-sampler" /> config option.
4545

4646
The two options are mutually exclusive. If both are set, <PlatformIdentifier name="traces-sampler" /> will take precedence.
@@ -49,7 +49,7 @@ Learn more about tracing <PlatformLink to="/configuration/options/#tracing-optio
4949

5050
## Distributed Tracing
5151

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/).
52+
Sentry captures distributed traces consisting of transactions and spans, which measure individual services and individual operations within those services, respectively. Learn more about our model in [Distributed Tracing](/product/sentry-basics/tracing/distributed-tracing/).
5353

5454

5555
<PlatformSection notSupported={["javascript.bun", "javascript.deno", "javascript.cloudflare", "javascript.cordova", "javascript.capacitor"]}>

docs/platforms/javascript/common/tracing/instrumentation/index.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ To get started, import the SDK.
1818

1919
There are three key functions for creating spans:
2020

21-
- [startSpan](#starting-an-active-span-startspan): Creates a new span that is active, and which is automatically ended. You'll likely want to use this function.
21+
- [startSpan](#starting-an-active-span-startspan): Creates a new span that is active, and which will end automatically. You'll likely want to use this function.
2222
- [startSpanManual](#starting-an-active-span-with-manual-end-startspanmanual): Creates a new span that is active, which has to be ended manually.
2323
- [startInactiveSpan](#starting-inactive-spans-startinactivespan): Creates a new span that is inactive, which has to be ended manually.
2424

@@ -30,7 +30,7 @@ In contrast, **inactive spans** will never have children automatically associate
3030

3131
A key constraint for active spans is that they can only be made active inside of a callback. This constraint exists because otherwise it becomes impossible to associate spans with the correct parent span when working with asynchronous code.
3232

33-
In places where you are not able to wrap executing code in a callback (e.g. when working with hooks or similar) you have to work with inactive spans, and can combine this with [withActiveSpan](#withactivespan) to manually associate child spans with the correct parent span.
33+
In places where you are not able to execute your code in a callback (for example, when working with hooks or similar) you have to work with inactive spans, and can combine this with [withActiveSpan](#withactivespan) to manually associate child spans with the correct parent span.
3434

3535
<PlatformCategorySection supported={['browser']}>
3636

@@ -86,7 +86,7 @@ Only `name` is required, all other options are optional.
8686

8787
## Starting an Active Span (`startSpan`)
8888

89-
For most scenarios, we recommend to start active spans with `Sentry.startSpan()`. This will start a new span that is active in the provided callback, and will automatically end the span when the callback is done. The callback can be synchronous, or asynchronous (a promise). In the case of an asynchronous callback, the span will be ended when the promise is resolved or rejected. If the provided callback errors or rejects, the span will be marked as failed.
89+
For most scenarios, we recommend to start active spans with `Sentry.startSpan()`. This will start a new span that is active in the provided callback, and will automatically end the span when the callback is done. The callback can be synchronous or asynchronous (a promise). In the case of an asynchronous callback, the span will be ended when the promise is resolved or rejected. If the provided callback throws an error or rejects a promise, the span will be marked as failed.
9090

9191
<PlatformContent includePath="performance/start-span" />
9292

@@ -116,7 +116,7 @@ parentSpan.end();
116116

117117
This option is also available for `startSpan` and `startSpanManual`.
118118

119-
## Utilities to work with Spans
119+
## Utilities To Work With Spans
120120

121121
We expose some helpful utilities that can help you with custom instrumentation.
122122

@@ -175,7 +175,7 @@ const childSpan = Sentry.startInactiveSpan({
175175

176176
### `suppressTracing`
177177

178-
Suppress the creation of sampled spans for the duration of the callback. This is useful when you want to prevent certain spans from being captured. For example, if you do not want to create spans for a given fetch request, you can do:
178+
Suppresses the creation of sampled spans for the duration of the callback. This is useful when you want to prevent certain spans from being captured. For example, if you do not want to create spans for a given fetch request, you can do:
179179

180180
```javascript
181181
Sentry.suppressTracing(() => {
@@ -255,9 +255,9 @@ Sentry.init({
255255

256256
### Adding Span Operations ("op")
257257

258-
Spans can have an operation associated with them, which help activate Sentry identify additional context about the span. For example database related spans have the `db` span operation associated with them. The Sentry product offers additional controls, visualizations and filters for spans with known operations.
258+
Spans can have an operation associated with them, which help Sentry identify additional context about the span. For example, database related spans have the `db` span operation associated with them. The Sentry product offers additional controls, visualizations, and filters for spans with known operations.
259259

260-
Sentry maintains a [list of well known span operations](https://develop.sentry.dev/sdk/performance/span-operations/#list-of-operations) and it is recommended that you use one of those operations if it is applicable to your span.
260+
Sentry maintains a [list of well-known span operations](https://develop.sentry.dev/sdk/performance/span-operations/#list-of-operations) and it is recommended that you use one of those operations if it is applicable to your span.
261261

262262
<PlatformContent includePath="performance/span-operations" />
263263

docs/platforms/javascript/common/tracing/span-metrics/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ When adding metrics as span attributes:
4141

4242
- Use consistent naming conventions (for example, `category.metric_name`)
4343
- Keep attribute names concise but descriptive
44-
- Use appropriate data types (string, number, boolean, or arrays of these types)
44+
- Use appropriate data types (string, number, boolean, or (non-mixed) arrays of these types)
4545

4646
## Creating Dedicated Metric Spans
4747

@@ -100,7 +100,7 @@ Sentry.init({
100100

101101
1. **Metric Naming**
102102
- Use clear, consistent naming patterns
103-
- Include the metric category (e.g., `db`, `cache`, `http`)
103+
- Include the metric category (examples: `db`, `cache`, `http`)
104104
- Use snake_case for metric names
105105
- Avoid high-cardinality values in metric names
106106

@@ -139,6 +139,6 @@ When implementing span metrics in your application:
139139
3. **Focus on Actionability**
140140
- Track metrics that help diagnose specific issues
141141
- Consider what alerts or dashboard visualizations you'll want to create
142-
- Ensure metrics can drive issue resolution or decision-making
142+
- Ensure metrics can drive issue resolution or decision making
143143

144144
For detailed examples of how to implement span metrics in common scenarios, see our <PlatformLink to="/tracing/span-metrics/examples/">Span Metrics Examples</PlatformLink> guide.

0 commit comments

Comments
 (0)