Skip to content

Commit 58b769c

Browse files
committed
review and update Connect Quick Start guide
1 parent b23efb4 commit 58b769c

File tree

3 files changed

+30
-5
lines changed

3 files changed

+30
-5
lines changed
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Connect
3-
description: "Learn about using Sentry with Connect."
3+
description: "Learn how to manually set up Sentry in your Connect app and capture your first errors."
44
sdk: sentry.javascript.node
55
fallbackGuide: javascript.node
66
categories:
@@ -9,8 +9,4 @@ categories:
99
- server-node
1010
---
1111

12-
<PlatformContent includePath="getting-started-primer" />
13-
14-
This guide explains how to set up Sentry in your Connect application.
15-
1612
<PlatformContent includePath="getting-started-node" />

platform-includes/getting-started-features-expandable/javascript.node.mdx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@
77
impact of errors across multiple systems. For example, distributed tracing
88
allows you to follow a request from the frontend to the backend and back.
99
- [**Profiling**](/product/explore/profiling/): Gain deeper insight than traditional tracing without custom instrumentation, letting you discover slow-to-execute or resource-intensive functions in your app.
10+
- [**Logs**](/product/explore/logs): Centralize and analyze your application logs to
11+
correlate them with errors and performance issues. Search, filter, and
12+
visualize log data to understand what's happening in your applications.
1013

1114
</Expandable>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
1+
First, let's make sure Sentry is correctly capturing errors and creating issues in your project. Add the following code snippet to your main application file; it defines a route that will deliberately trigger an error when called:
2+
13
```javascript
24
app.get("/debug-sentry", function mainHandler(req, res) {
35
throw new Error("My first Sentry error!");
46
});
57
```
8+
9+
<OnboardingOption optionId="performance">
10+
11+
### Tracing
12+
13+
To test your tracing configuration, update the previous code snippet by starting a trace to measure the time it takes for the execution of your code:
14+
15+
```javascript
16+
app.use("/debug-sentry", async (req, res, next) => {
17+
await Sentry.startSpan(
18+
{
19+
op: "test",
20+
name: "My First Test Transaction",
21+
},
22+
async () => {
23+
await new Promise((resolve) => setTimeout(resolve, 100));
24+
throw new Error("My first Sentry error!");
25+
}
26+
);
27+
}
28+
});
29+
```
30+
31+
</OnboardingOption>

0 commit comments

Comments
 (0)