Skip to content

Commit 0827368

Browse files
authored
Restructure Node performance instrumentation pages.
1 parent 0cff277 commit 0827368

File tree

6 files changed

+15
-34
lines changed

6 files changed

+15
-34
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
If you are also using Performance Monitoring for [JavaScript](/platforms/javascript/performance/), depending on where your request originates, you can connect traces:
2+
1. For requests that start in your backend, by [adding a meta tag](/platforms/javascript/performance/connect-services/#pageload) in your HTML template that contains tracing information.
3+
2. For requests that start in JavaScript, by the SDK [setting a header](/platforms/javascript/performance/connect-services/#navigation-and-other-xhr-requests) on requests to your backend.
4+
5+
Otherwise, backend services with Performance Monitoring connect automatically.

src/platforms/common/performance/connect-services.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ SDKs with performance monitoring support listen to incoming requests and typical
1212

1313
If the instrumentation you are using doesn't automatically pick up the `sentry-trace` header, you can also continue a trace manually by using the `continueFromHeaders` function on a `Transaction`, which you can learn more about in our content for [the Transaction Interface](https://develop.sentry.dev/sdk/performance/#new-span-and-transaction-classes).
1414

15-
<PlatformSection supported={["android", "javascript"]} notSupported={["node"]}>
15+
<PlatformSection supported={["android", "javascript", "node"]}>
1616

1717
<PlatformContent includePath="performance/connect-services" />
1818

src/platforms/common/performance/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ Learn more about how the options work in <PlatformLink to="/configuration/sampli
9090

9191
## Verify
9292

93-
<PlatformSection supported={["react-native", "java.spring", "java.spring-boot", "android", "javascript", "apple", "dart", "rust"]} notSupported={["node"]} >
93+
<PlatformSection supported={["react-native", "java.spring", "java.spring-boot", "android", "javascript", "apple", "dart", "rust"]}>
9494

9595
Verify that performance monitoring is working correctly by using our <PlatformLink to="/performance/instrumentation/automatic-instrumentation/">automatic instrumentation</PlatformLink> or by starting and finishing a transaction using <PlatformLink to="/performance/instrumentation/custom-instrumentation/">custom instrumentation</PlatformLink>.
9696

src/platforms/common/performance/instrumentation/custom-instrumentation.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ sidebar_order: 20
44
supported:
55
- javascript
66
- javascript.cordova
7+
- node
78
- react-native
89
- dotnet
910
- python

src/platforms/common/performance/instrumentation/index.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ sidebar_order: 20
44
description: "Learn how to instrument performance in your app."
55
notSupported:
66
- javascript.cordova
7-
- node
87
- native.breakpad
98
- native.crashpad
109
- native.minidumps

src/platforms/node/common/performance/instrumentation/index.mdx renamed to src/platforms/node/common/performance/instrumentation/automatic-instrumentation.mdx

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
---
2-
title: Instrumentation
3-
description: "Learn more about how to configure our Performance integrations to get the best experience out of it."
2+
title: Automatic Instrumentation
3+
sidebar_order: 10
4+
supported:
5+
- node
6+
description: "Learn what transactions are captured after tracing is enabled."
7+
redirect_from:
8+
- /performance/included-instrumentation
49
---
510

611
By default, Sentry error events will not get trace context unless you configure the scope with the transaction, as illustrated in the example below.
@@ -62,27 +67,6 @@ request.on("close", () => {
6267
});
6368
```
6469

65-
## Custom Instrumentation
66-
67-
To instrument a specific region of your code, you can create a transaction to capture it.
68-
69-
The following example creates a transaction for a part of the code that contains an expensive operation (for example, `processItem`), and sends the result to Sentry:
70-
71-
```javascript
72-
app.use(function processItems(req, res, next) {
73-
const item = getFromQueue();
74-
const transaction = Sentry.startTransaction({
75-
op: "task",
76-
name: item.getTransaction(),
77-
});
78-
79-
// processItem may create more spans internally (see next examples)
80-
processItem(item, transaction).then(() => {
81-
transaction.finish();
82-
next();
83-
});
84-
});
85-
```
8670

8771
### Retrieving a Transaction
8872

@@ -105,11 +89,3 @@ app.get("/success", function successHandler(req, res) {
10589
res.status(200).end();
10690
});
10791
```
108-
109-
## Connecting Services
110-
111-
If you are also using Performance Monitoring for [JavaScript](/platforms/javascript/performance/), depending on where your request originates, you can connect traces:
112-
1. For requests that start in your backend, by [adding a meta tag](/platforms/javascript/performance/connect-services/#pageload) in your HTML template that contains tracing information.
113-
2. For requests that start in JavaScript, by the SDK [setting a header](/platforms/javascript/performance/connect-services/#navigation-and-other-xhr-requests) on requests to your backend.
114-
115-
Otherwise, backend services with Performance Monitoring connect automatically.

0 commit comments

Comments
 (0)