Skip to content

Commit c9e15ae

Browse files
Alex KrawiecAlex Krawiec
authored andcommitted
Content updates to tracing walkthrough
1 parent 2f54648 commit c9e15ae

File tree

4 files changed

+46
-25
lines changed

4 files changed

+46
-25
lines changed

docs/product/sentry-basics/distributed-tracing/create-new-project.mdx

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Create a Sentry Project
2+
title: Create Frontend and Backend Sentry Projects
33
sidebar_order: 1
4-
description: "Learn how to create a Sentry project, which scopes events to a distinct piece of your application landscape."
4+
description: "Learn how to create your Sentry projects, which will scope events to a distinct piece of your application landscape."
55
---
66

7-
This section walks you through how to create a new project in your Sentry account. You need to have a project set up in Sentry in order to capture errors and other events. In this walkthrough we will be creating a frontend project in React as well as a separate backend project in Express/Node.
7+
This section walks you through how to create new projects in your Sentry account. You need to have a project set up in Sentry in order to capture errors and other events. In this walkthrough we will be creating a frontend project in React as well as a separate backend project in Express/Node.
88

99
_Projects_ allow you to scope events to a distinct application in your organization and assign responsibility to specific users and teams. You can create a project for a particular language or framework used in your application. For example, you might have separate projects for your API server and frontend client. For more information, see [best practices for creating projects](/organization/getting-started/#4-create-projects).
1010

@@ -20,7 +20,7 @@ Follow the steps below to create a new Sentry project for a sample React applica
2020

2121
- **Choose your platform**: Select the language or framework for your project based on the code you wish to monitor. In this case, choose **React**.
2222

23-
- **Set your alert frequency**: For the purpose of this tutorial, select **Alert me on every new issue**.
23+
- **Set your alert frequency**: For the purpose of this tutorial, select **Alert me on high priority issues**.
2424

2525
> If you're wary of alert fatigue, learn more about how to set up your alerts in [Alerts Best Practices](/product/alerts/best-practices/).
2626
@@ -63,24 +63,38 @@ Follow the steps below to create a new Sentry project for a sample Backend appli
6363

6464
1. Click "Create Project" and configure it as appropriate for your application:
6565

66-
- **Choose your platform**: Select the language or framework for your project based on the code you wish to monitor. In this case, choose **Express**.
66+
- **Choose your platform**: In this case, choose **Express**.
6767

68-
- **Set your alert frequency**: For the purpose of this tutorial, select **Alert me on high priority issues**.
69-
70-
> If you're wary of alert fatigue, learn more about how to set up your alerts in [Alerts Best Practices](/product/alerts/best-practices/).
68+
- **Set your alert frequency**: Once again, select **Alert me on high priority issues**.
7169

7270
- **Name your project and assign it a team**: Make sure to give it a different project name than your frontend application.
7371

74-
- Click **Create Project**. This takes you to the quick Configure Express SDK guide, which provides an overview of how to configure the SDK. This tutorial covers the SDK setup in more detail.
72+
- Click **Create Project**. This takes you to the quick Configure Express SDK guide, which provides an overview of how to configure the SDK.
7573

76-
1. Copy the DSN key and keep it handy. Each project has a unique DSN (Data Source Name). The DSN tells the SDK where to send events, so events are associated with the right project. You'll need to paste the DSN key into your source code later so the errors generated in this tutorial go to your new project.
74+
1. Copy the DSN key and keep it handy.
7775

7876
> You can also find a project's DSN anytime in **[Project] > Settings > Client Keys (DSN)**.
7977
8078
1. Click **Take me to Issues** to go to your new project's **Issues** page.
8179

80+
### UI Walkthrough
81+
82+
<div style={{"height":"0px","paddingBottom":"calc(56.88524590163935% + 41px)","position":"relative","width":"100%"}}>
83+
<iframe
84+
src="https://demo.arcade.software/YXX8LAOHGSP4mWWBMMtM?embed"
85+
frameborder="0"
86+
loading="lazy"
87+
webkitallowfullscreen
88+
mozallowfullscreen
89+
allowfullscreen
90+
allow="fullscreen;"
91+
style={{"colorScheme":"light","height":"100%","left":"0px","position":"absolute","top":"0px","width":"100%"}}
92+
title="Tracing Tutorial -> Create Express Project"
93+
></iframe>
94+
</div>
95+
8296

8397

8498
## Next
8599

86-
Now that you have a Sentry project set up, you can [Add the Sentry SDK to Your Projects](/product/sentry-basics/integrate-frontend/initialize-sentry-sdk/).
100+
Now that you have a Sentry project set up, you can [Add the Sentry SDK to Your Frontend Projects](/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-frontend/).

docs/product/sentry-basics/distributed-tracing/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This step-by-step tutorial walks you through setting up Sentry in a React projec
1010
- x
1111
- x
1212

13-
This tutorial uses a [sample React application](https://github.com/getsentry/frontend-tutorial) on the frontend as well as a sample Node/Express API as the backend. Some familiarity with JavaScript will help you follow along, you can also follow along with the provided sample code or apply the same steps to your own project.
13+
This tutorial uses a [sample React application](https://github.com/getsentry/frontend-tutorial) on the frontend as well as a sample [Node/Express API](https://github.com/getsentry/frontend-tutorial) as the backend. Some familiarity with JavaScript will help you follow along, you can also follow along with the provided sample code or apply the same steps to your own project.
1414

1515
## Prerequisites
1616

@@ -20,4 +20,4 @@ This tutorial uses a [sample React application](https://github.com/getsentry/fro
2020

2121
## Next
2222

23-
[Create a Sentry Project](/product/sentry-basics/integrate-frontend/create-new-project/)
23+
[Create your Sentry Projects](/product/sentry-basics/distributed-tracing/create-new-project/)

docs/product/sentry-basics/distributed-tracing/initialize-sentrypsdk-backend.mdx renamed to docs/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-backend.mdx

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Add the Sentry SDK to Your Backend Project
3-
sidebar_order: 2
3+
sidebar_order: 3
44
description: "Learn how to add the Sentry SDK to your backend codebase."
55
---
66

@@ -10,6 +10,7 @@ If you're using your own source code, you can skip this section. Instead:
1010

1111
- Select your [platform](/platforms/) and follow its **Getting Started** guide to add the Sentry SDK to your code.
1212
- Then, skip to the [next step](/guides/integrate-frontend/generate-first-error/).
13+
{/* TODO: UPDATE THIS LINK */}
1314

1415
## 1. Clone the Sample Application
1516

@@ -23,16 +24,21 @@ The sample application is a basic backend application using Express and Node.
2324
```bash
2425
git clone [email protected]:<your_username>/frontend-tutorial.git
2526
```
27+
{/* TODO: UPDATE NAME OF THIS REPO */}
2628

2729
1. Open the `backend-tutorial` project in your preferred code editor.
30+
{/* TODO: UPDATE NAME OF THIS REPO */}
2831

29-
## 2. Add the Sentry React SDK
32+
## 2. Add the Sentry Express SDK
3033

31-
Sentry captures data by using a platform-specific SDK that you add to your application's runtime. To use the SDK, import and configure it in your source code. This demo project uses [Sentry's React SDK](https://github.com/getsentry/sentry-javascript/tree/develop/packages/react).
34+
Sentry captures data by using a platform-specific SDK that you add to your application's runtime. To use the SDK, import and configure it in your source code. This demo project uses [Sentry's Express SDK](https://github.com/getsentry/sentry-javascript/tree/develop/packages/react).
35+
{/* TODO: UPDATE THIS LINK */}
3236

33-
1. Install the Sentry React SDK using NPM.
37+
1. Install the Sentry Express SDK using NPM.
3438

3539
Make sure you're in the `backend-tutorial` project folder.
40+
{/* TODO: UPDATE NAME OF THIS REPO */}
41+
3642

3743
```bash {tabTitle:npm}
3844
npm install --save @sentry/node @sentry/profiling-node
@@ -90,7 +96,7 @@ The configuration above enables Sentry's error monitoring feature, as well as it
9096

9197
Make sure to import `instrument.js` at the top of your `server.js` file, and set up the error handler after all controllers and before any other middleware:
9298

93-
``` javascript {filename:instrument.js}
99+
``` javascript {filename:server.js}
94100
// IMPORTANT: Make sure to import `instrument.js` at the top of your file.
95101
// If you're using ECMAScript Modules (ESM) syntax, use `import "./instrument.js";`
96102
require("./instrument.js");
@@ -128,14 +134,15 @@ Make sure to import `instrument.js` at the top of your `server.js` file, and set
128134
const port = 3001;
129135

130136
app.listen(port, () => {
131-
console.log(`Server is running on port`);
137+
console.log(`Server is running on port 3001`);
132138
});
133139

134140
```
135141

136142
## 3. Build and Run the Sample Application
137143

138144
In the `frontend-tutorial` project folder:
145+
{/* TODO: UPDATE NAME OF THIS REPO */}
139146

140147
1. Install project dependencies.
141148

@@ -153,7 +160,7 @@ In the `frontend-tutorial` project folder:
153160

154161
```bash
155162
<i> [webpack-dev-server] Project is running at:
156-
<i> [webpack-dev-server] Loopback: http://localhost:3000/
163+
<i> [webpack-dev-server] Loopback: http://localhost:3001/
157164
...
158165
webpack 5.87.0 compiled successfully in 1306 ms
159166
```
@@ -162,10 +169,11 @@ In the `frontend-tutorial` project folder:
162169
163170
1. Open the sample application in your browser.
164171

165-
The sample app should be running at [http://localhost:3000/](http://localhost:3000/) or the URL output in your terminal in the last step.
172+
The sample app should be running at [http://localhost:3001/](http://localhost:3001/) or the URL output in your terminal in the last step.
173+
166174

167-
![Sample app UX showing an online hardware store](./img/FE-tutorial-demo-app.png)
168175

169176
## Next
170177

171-
At this point, you have a sample React app running with the Sentry SDK initialized. Next, [Add the Sentry SDK to Your Backend Project](/product/sentry-basics/integrate-frontend/generate-first-error/) to start using Sentry's error monitoring feature.
178+
At this point, you have a sample Express backend app running with the Sentry SDK initialized. Next, [Generate your first cross-project error](/product/sentry-basics/integrate-frontend/generate-first-error/) to start using Sentry's Distributed Tracing feature.
179+
{/* TODO: UPDATE THIS LINK */}

docs/product/sentry-basics/distributed-tracing/intialize-sentry-sdk-frontend.mdx renamed to docs/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-frontend.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ In the `frontend-tutorial` project folder:
117117

118118
The sample app should be running at [http://localhost:3000/](http://localhost:3000/) or the URL output in your terminal in the last step.
119119

120-
![Sample app UX showing an online hardware store](./img/FE-tutorial-demo-app.png)
121120

122121
## Next
123122

124-
At this point, you have a sample React app running with the Sentry SDK initialized. Next, [Add the Sentry SDK to Your Backend Project](/product/sentry-basics/integrate-frontend/generate-first-error/) to start using Sentry's error monitoring feature.
123+
At this point, you have a sample React app running with the Sentry SDK initialized. Next, [Add the Sentry SDK to Your Backend Project](/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-backend/) to start using Sentry's error monitoring feature.

0 commit comments

Comments
 (0)