Skip to content

docs(js): Review and update Express Quick Start guide #14218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions docs/platforms/javascript/guides/express/index.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Express
description: "Learn about using Sentry with Express."
description: "Learn how to manually set up Sentry in your Express 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 Express application.

<PlatformContent includePath="getting-started-node" />
6 changes: 3 additions & 3 deletions platform-includes/getting-started-node/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ Now, head over to your project on [Sentry.io](https://sentry.io/) to view the co

## Next Steps

At this point, you should have integrated Sentry into your Node.js application and should already be sending data to your Sentry project.
At this point, you should have integrated Sentry into your application, which should already be sending data to your Sentry project.

Now's a good time to customize your setup and look into more advanced topics.
Our next recommended steps for you are:

- Extend Sentry to your frontend using one of our [frontend SDKs](/)
- Learn how to [manually capture errors](/platforms/javascript/guides/node/usage/)
- Continue to [customize your configuration](/platforms/javascript/guides/node/configuration/)
- Learn how to <PlatformLink to="/usage">manually capture errors</PlatformLink>
- Continue to <PlatformLink to="/configuration">customize your configuration</PlatformLink>
- Get familiar with [Sentry's product features](/product) like tracing, insights, and alerts

<Expandable permalink={false} title="Are you having problems setting up the SDK?">
Expand Down
27 changes: 27 additions & 0 deletions platform-includes/getting-started-verify/javascript.express.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) {
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 for the execution of your code:

```javascript
app.get("/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>