Skip to content
6 changes: 1 addition & 5 deletions docs/platforms/javascript/guides/connect/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Connect
description: "Learn about using Sentry with Connect."
description: "Learn how to manually set up Sentry in your Connect app and capture your first errors."
sdk: sentry.javascript.node
fallbackGuide: javascript.node
categories:
Expand All @@ -9,8 +9,4 @@ categories:
- server-node
---

<PlatformContent includePath="getting-started-primer" />

This guide explains how to set up Sentry in your Connect application.

<PlatformContent includePath="getting-started-node" />
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,8 @@
impact of errors across multiple systems. For example, distributed tracing
allows you to follow a request from the frontend to the backend and back.
- [**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.
- [**Logs**](/product/explore/logs): Centralize and analyze your application logs to
correlate them with errors and performance issues. Search, filter, and
visualize log data to understand what's happening in your applications.

</Expandable>
29 changes: 28 additions & 1 deletion platform-includes/getting-started-verify/javascript.connect.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
### Issues

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:

```javascript
app.get("/debug-sentry", function mainHandler(req, res) {
app.use("/debug-sentry", (req, res) => {
throw new Error("My first Sentry error!");
});
```

<OnboardingOption optionId="performance">

### Tracing

To test your tracing configuration, update the previous code snippet by starting a trace to measure the time it takes to execute your code:

```javascript
app.use("/debug-sentry", async (req, res) => {
await Sentry.startSpan(
{
op: "test",
name: "My First Test Transaction",
},
async () => {
await new Promise((resolve) => setTimeout(resolve, 100));
throw new Error("My first Sentry error!");
}
);
});
```

</OnboardingOption>
Loading