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/generate-first-error.mdx
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ To start using Sentry's error monitoring feature, you need some errors first. Le
14
14
15
15
If you're using your own source code, skip this step. Instead, select your [platform](/platforms/) and follow its **Verify** step inside the **Getting Started** guide to introduce an error.
16
16
17
-
1. In the `tracing-frontend` repo, open `src/App.js` and update the `onClick` handler by replacing the string passed to the `getProduct()` function from `nonfat-water` to `debug-sentry`.
17
+
1. In the `tracing-tutorial-frontend` repo, open `src/App.js` and update the `onClick` handler by replacing the string passed to the `getProduct()` function from `nonfat-water` to `debug-sentry`.
18
18
19
19
```jsx {filename:App.js}
20
20
<div className="btn-parent">
@@ -28,7 +28,7 @@ If you're using your own source code, skip this step. Instead, select your [plat
28
28
</button>
29
29
</div>
30
30
```
31
-
Take note that in the `server.js` file of the `backend-tracing` repo, there is a middleware function handling the `/products/debug-sentry` route, which throws a sample error:
31
+
Take note that in the `server.js` file of the `tracing-tutorial-backend` repo, there is a middleware function handling the `/products/debug-sentry` route, which throws a sample error:
1. Go back to the browser window and try clicking on the **Nonfat Water** button again, you will no longer see the expected product information. Instead, you'll see text saying something went wrong. If you look at line 88 of the `App.js` file in the `frontend-tracing` repo, you'll see this is what the frontend displays when it's call to the backend doesn't return any data.
44
+
1. Go back to the browser window and try clicking on the **Nonfat Water** button again, you will no longer see the expected product information. Instead, you'll see text saying something went wrong. If you look at line 88 of the `App.js` file in the `tracing-tutorial-frontend` repo, you'll see this is what the frontend displays when it's call to the backend doesn't return any data.
45
45
46
-
1. Open the terminal window that's running the `backend-tracing` server. Here, you'll see that a log letting you know that an error has occurred.
46
+
1. Open the terminal window that's running the `tracing-tutorial-backend` server. Here, you'll see that a log letting you know that an error has occurred.
Copy file name to clipboardExpand all lines: docs/product/sentry-basics/distributed-tracing/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
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 both a fronten
10
10
- Trigger a sample front-error that in turn triggers a sample back-end error.
11
11
- Go into Sentry Distributed Tracing and see the details of your entire trace.
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](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.
13
+
This tutorial uses a [sample React application](https://github.com/getsentry/tracing-tutorial-setting-up-frontend) on the frontend as well as a sample [Node/Express API](https://github.com/coolguyzone/sample-node-backend) 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.
Copy file name to clipboardExpand all lines: docs/product/sentry-basics/distributed-tracing/initialize-sentry-sdk-backend.mdx
+11-18Lines changed: 11 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,14 @@ This section walks you through how to import the sample application into your lo
9
9
If you're using your own source code, you can skip this section. Instead:
10
10
11
11
- Select your [platform](/platforms/) and follow its **Getting Started** guide to add the Sentry SDK to your code.
12
-
- Then, skip to the [next step](/guides/integrate-frontend/generate-first-error/).
12
+
- Then, skip to the [next step](/product/sentry-basics/integrate-frontend/generate-first-error/).
13
13
{/* TODO: UPDATE THIS LINK */}
14
14
15
15
## 1. Clone the Sample Application
16
16
17
17
The sample application is a basic backend application using Express and Node.
18
18
19
-
1. Fork the [sample application's repository](https://github.com/getsentry/frontend-tutorial) on GitHub.
20
-
{/* TODO: ADD CUSTOM REPO HERE */}
19
+
1. Fork the [sample application's repository](https://github.com/coolguyzone/tracing-tutorial-backend.git) on GitHub.
21
20
22
21
1. Clone the forked repository to your local environment:
23
22
@@ -26,17 +25,16 @@ The sample application is a basic backend application using Express and Node.
26
25
```
27
26
{/* TODO: UPDATE NAME OF THIS REPO */}
28
27
29
-
1. Open the `backend-tutorial` project in your preferred code editor.
28
+
1. Open the `tracing-tutorial-backend` project in your preferred code editor.
30
29
{/* TODO: UPDATE NAME OF THIS REPO */}
31
30
32
-
## 2. Add the Sentry Express SDK
31
+
## 2. Add the Sentry Node SDK
33
32
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 */}
33
+
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 Node SDK](https://github.com/getsentry/sentry-javascript/tree/master/packages/node).
36
34
37
35
1. Install the Sentry Express SDK using NPM.
38
36
39
-
Make sure you're in the `backend-tutorial` project folder.
37
+
Make sure you're in the `tracing-tutorial-backend` project folder.
40
38
{/* TODO: UPDATE NAME OF THIS REPO */}
41
39
42
40
@@ -78,7 +76,7 @@ Sentry captures data by using a platform-specific SDK that you add to your appli
78
76
79
77
1. Add your DSN key to the Sentry SDK configuration.
80
78
81
-
Paste in the DSN key value you copied from the project created in the [previous section](/product/sentry-basics/integrate-frontend/create-new-project/).
79
+
Paste in the DSN key value you copied from the project created in the [previous section](/product/sentry-basics/distributed-tracing/create-new-project/).
82
80
{/* TODO: Update link here */}
83
81
84
82
```javascript {filename:instrument.js}
@@ -141,8 +139,7 @@ Make sure to import `instrument.js` at the top of your `server.js` file, and set
141
139
142
140
## 3. Build and Run the Sample Application
143
141
144
-
In the `frontend-tutorial` project folder:
145
-
{/* TODO: UPDATE NAME OF THIS REPO */}
142
+
In the `tracing-tutorial-backend` project folder:
146
143
147
144
1. Install project dependencies.
148
145
@@ -153,16 +150,13 @@ In the `frontend-tutorial` project folder:
153
150
1. Start the application in develop mode.
154
151
155
152
```bash
156
-
npm start
153
+
node server.js
157
154
```
158
155
159
156
Once the application starts, you'll see a confirmation message similar to this one in your terminal:
> **Troubleshooting tip**: If the application fails to start due to syntax errors or errors for missing dependencies/modules, make sure you're using Node 18+ and install dependencies again. Run `nvm use 18` and then `npm install`.
@@ -175,5 +169,4 @@ In the `frontend-tutorial` project folder:
175
169
176
170
## Next
177
171
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 */}
172
+
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/distributed-tracing/generate-first-error/) to start using Sentry's Distributed Tracing feature.
1. Open the `frontend-tutorial` project in your preferred code editor.
26
+
1. Open the `tracing-tutorial-frontend` project in your preferred code editor.
27
27
28
28
## 2. Add the Sentry React SDK
29
29
30
30
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).
31
31
32
32
1. Install the Sentry React SDK using NPM.
33
33
34
-
Make sure you're in the `frontend-tutorial` project folder.
34
+
Make sure you're in the `tracing-tutorial-frontend` project folder.
35
35
36
36
```bash {tabTitle:npm}
37
37
npm install @sentry/react --save
@@ -71,7 +71,7 @@ Sentry captures data by using a platform-specific SDK that you add to your appli
71
71
72
72
1. Add your DSN key to the Sentry SDK configuration.
73
73
74
-
Paste in the DSN key value you copied from the project created in the [previous section](/product/sentry-basics/integrate-frontend/create-new-project/).
74
+
Paste in the DSN key value you copied from the project created in the [previous section](/product/sentry-basics/distributed-tracing/create-new-project/).
75
75
76
76
```javascript {filename:src/index.js}
77
77
Sentry.init({
@@ -88,7 +88,7 @@ The configuration above enables Sentry's error monitoring feature, as well as it
88
88
89
89
## 3. Build and Run the Sample Application
90
90
91
-
In the `frontend-tutorial` project folder:
91
+
In the `tracing-tutorial-frontend` project folder:
92
92
93
93
1. Install project dependencies.
94
94
@@ -120,4 +120,4 @@ In the `frontend-tutorial` project folder:
120
120
121
121
## Next
122
122
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.
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 get Sentry running across the entire stack of your platform.
0 commit comments