Skip to content

Commit 315a3e2

Browse files
docs(js): Review and update Koa quick start guide (#14251)
<!-- Use this checklist to make sure your PR is ready for merge. You may delete any sections you don't need. --> ## DESCRIBE YOUR PR Updated the Koa quick start guide to be consistent with our other quick start guides. ~I want to merge #14218 first, as this branch contains changes that are also needed for the changes in this pr.~ Closes: #14247 ## 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) ## LEGAL BOILERPLATE <!-- Sentry employees and contractors can delete or ignore this section. --> Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms. ## EXTRA RESOURCES - [Sentry Docs contributor guide](https://docs.sentry.io/contributing/) --------- Co-authored-by: Charly Gomez <charly.gomez@sentry.io>
1 parent 70878e6 commit 315a3e2

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Koa
3-
description: "Learn about using Sentry with Koa."
3+
description: "This guide explains how to set up Sentry in your Koa application."
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 Koa application.
15-
1612
<PlatformContent includePath="getting-started-node" />
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
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
router.get("/debug-sentry", function() {
37
throw new Error("My first Sentry error!");
48
});
59
```
10+
11+
<OnboardingOption optionId="performance">
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+
router.get("/debug-sentry", async (ctx) => {
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+
</OnboardingOption>

0 commit comments

Comments
 (0)