Skip to content

Commit b23efb4

Browse files
inventarSarahcoolguyzonechargome
authored
docs(js): Review and update Express Quick Start guide (#14218)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Reviewed and updated the Express Quick Start guide. ## IS YOUR CHANGE URGENT? Help us prioritize incoming PRs by letting us know when the change needs to go live. - [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE --> - [ ] Other deadline: <!-- ENTER DATE HERE --> - [x] None: Not urgent, can wait up to 1 week+ ## SLA - Teamwork makes the dream work, so please add a reviewer to your PRs. - Please give the docs team up to 1 week to review your PR unless you've added an urgent due date to it. Thanks in advance for your help! ## PRE-MERGE CHECKLIST *Make sure you've checked the following before merging your changes:* - [ ] Checked Vercel preview for correctness, including links - [ ] PR was reviewed and approved by any necessary SMEs (subject matter experts) - [ ] PR was reviewed and approved by a member of the [Sentry docs team](https://github.com/orgs/getsentry/teams/docs) ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --------- Co-authored-by: Alex Krawiec <[email protected]> Co-authored-by: Charly Gomez <[email protected]>
1 parent d970ca4 commit b23efb4

File tree

3 files changed

+31
-8
lines changed

3 files changed

+31
-8
lines changed
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Express
3-
description: "Learn about using Sentry with Express."
3+
description: "Learn how to manually set up Sentry in your Express 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 Express application.
15-
1612
<PlatformContent includePath="getting-started-node" />

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@ Now, head over to your project on [Sentry.io](https://sentry.io/) to view the co
7272

7373
## Next Steps
7474

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

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

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

8585
<Expandable permalink={false} title="Are you having problems setting up the SDK?">
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
1+
### Issues
2+
3+
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:
4+
15
```javascript
26
app.get("/debug-sentry", function mainHandler(req, res) {
37
throw new Error("My first Sentry error!");
48
});
59
```
10+
11+
<OnboardingOption optionId="performance">
12+
13+
### Tracing
14+
15+
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:
16+
17+
```javascript
18+
app.get("/debug-sentry", async (req, res) => {
19+
await Sentry.startSpan(
20+
{
21+
op: "test",
22+
name: "My First Test Transaction",
23+
},
24+
async () => {
25+
await new Promise((resolve) => setTimeout(resolve, 100));
26+
throw new Error("My first Sentry error!");
27+
}
28+
);
29+
});
30+
```
31+
32+
</OnboardingOption>

0 commit comments

Comments
 (0)