You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/product/sentry-basics/distributed-tracing/create-new-project.mdx
+25-11Lines changed: 25 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
1
---
2
-
title: Create a Sentry Project
2
+
title: Create Frontend and Backend Sentry Projects
3
3
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."
5
5
---
6
6
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.
8
8
9
9
_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).
10
10
@@ -20,7 +20,7 @@ Follow the steps below to create a new Sentry project for a sample React applica
20
20
21
21
-**Choose your platform**: Select the language or framework for your project based on the code you wish to monitor. In this case, choose **React**.
22
22
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**.
24
24
25
25
> If you're wary of alert fatigue, learn more about how to set up your alerts in [Alerts Best Practices](/product/alerts/best-practices/).
26
26
@@ -63,24 +63,38 @@ Follow the steps below to create a new Sentry project for a sample Backend appli
63
63
64
64
1. Click "Create Project" and configure it as appropriate for your application:
65
65
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**.
67
67
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**.
71
69
72
70
-**Name your project and assign it a team**: Make sure to give it a different project name than your frontend application.
73
71
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.
75
73
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.
77
75
78
76
> You can also find a project's DSN anytime in **[Project] > Settings > Client Keys (DSN)**.
79
77
80
78
1. Click **Take me to Issues** to go to your new project's **Issues** page.
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/).
Copy file name to clipboardExpand all lines: docs/product/sentry-basics/distributed-tracing/index.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ This step-by-step tutorial walks you through setting up Sentry in a React projec
10
10
- x
11
11
- x
12
12
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.
14
14
15
15
## Prerequisites
16
16
@@ -20,4 +20,4 @@ This tutorial uses a [sample React application](https://github.com/getsentry/fro
20
20
21
21
## Next
22
22
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/)
1. Open the `backend-tutorial` project in your preferred code editor.
30
+
{/* TODO: UPDATE NAME OF THIS REPO */}
28
31
29
-
## 2. Add the Sentry React SDK
32
+
## 2. Add the Sentry Express SDK
30
33
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 */}
32
36
33
-
1. Install the Sentry React SDK using NPM.
37
+
1. Install the Sentry Express SDK using NPM.
34
38
35
39
Make sure you're in the `backend-tutorial` project folder.
@@ -90,7 +96,7 @@ The configuration above enables Sentry's error monitoring feature, as well as it
90
96
91
97
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:
92
98
93
-
```javascript {filename:instrument.js}
99
+
```javascript {filename:server.js}
94
100
// IMPORTANT: Make sure to import `instrument.js` at the top of your file.
95
101
// If you're using ECMAScript Modules (ESM) syntax, use `import "./instrument.js";`
96
102
require("./instrument.js");
@@ -128,14 +134,15 @@ Make sure to import `instrument.js` at the top of your `server.js` file, and set
128
134
constport=3001;
129
135
130
136
app.listen(port, () => {
131
-
console.log(`Server is running on port`);
137
+
console.log(`Server is running on port 3001`);
132
138
});
133
139
134
140
```
135
141
136
142
## 3. Build and Run the Sample Application
137
143
138
144
In the `frontend-tutorial` project folder:
145
+
{/* TODO: UPDATE NAME OF THIS REPO */}
139
146
140
147
1. Install project dependencies.
141
148
@@ -153,7 +160,7 @@ In the `frontend-tutorial` project folder:
@@ -162,10 +169,11 @@ In the `frontend-tutorial` project folder:
162
169
163
170
1. Open the sample application in your browser.
164
171
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
+
166
174
167
-

168
175
169
176
## Next
170
177
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.
Copy file name to clipboardExpand all lines: docs/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-frontend.mdx
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,8 +117,7 @@ In the `frontend-tutorial` project folder:
117
117
118
118
The sample app should be running at [http://localhost:3000/](http://localhost:3000/) or the URL output in your terminal in the last step.
119
119
120
-

121
120
122
121
## Next
123
122
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