Skip to content

Commit 7304651

Browse files
committed
update quickstart
1 parent 924f208 commit 7304651

File tree

7 files changed

+47
-23
lines changed

7 files changed

+47
-23
lines changed

mint.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@
5151
{
5252
"group": "Guides",
5353
"pages": [
54-
"kubernetes",
5554
"nodejs-express",
5655
"python-fastapi",
5756
"python-gunicorn",
5857
"python-flask",
5958
"golang",
60-
"php-laravel"
59+
"php-laravel",
60+
"kubernetes"
6161
]
6262
},
6363
{

nodejs-express.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "NodeJS + Express + Subtrace"
3-
sidebarTitle: "Express"
3+
sidebarTitle: "Express.js"
44
description: "Connect your NodeJS + Express backend to Chrome DevTools using Subtrace"
55
icon: "node-js"
66
---

quickstart-1-onboarding.png

-403 KB
Binary file not shown.

quickstart-2-token.png

-113 KB
Binary file not shown.

quickstart-link.png

52.9 KB
Loading

quickstart-screenshot.png

397 KB
Loading

quickstart.mdx

Lines changed: 44 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,36 +5,60 @@ description: "Welcome! Follow the steps below to get started with Subtrace."
55
icon: "rocket"
66
---
77

8-
**Step 1**: Go to [https://subtrace.dev/login](https://subtrace.dev/login) and log in with your single sign-on (SSO) identity provider.
8+
**Step 1**: Open a terminal and download Subtrace:
99

10-
**Step 2**: On the **Let's set up your database** page, follow the onboarding instructions to start the database worker service where your backend requests will be stored.
10+
```bash
11+
curl -fSLO "https://subtrace.dev/download/$(uname -s)/$(uname -m)/subtrace" && chmod +x ./subtrace
12+
```
1113

12-
<img className="rounded-xl" src="/quickstart-1-onboarding.png" />
14+
**Step 2**: Run your backend server startup command with Subtrace:
1315

14-
**Step 3**: Go to the **Tokens** page on the dashboard and click **Create tracer token**.
16+
<CodeGroup>
17+
```bash Generic
18+
./subtrace run -- my-app-command
19+
```
1520

16-
<img className="rounded-xl" src="/quickstart-2-token.png" />
21+
```bash Node
22+
./subtrace run -- node app.js
23+
```
1724

18-
**Step 4**: Install the latest version of Subtrace:
25+
```bash FastAPI
26+
./subtrace run -- fastapi run main.py
27+
```
1928

20-
```bash
21-
curl -fsSLO "https://subtrace.dev/download/latest/$(uname -s)/$(uname -m)/subtrace" && chmod +x ./subtrace
22-
```
29+
```bash Flask
30+
./subtrace run -- flask --app hello run
31+
```
2332

24-
**Step 5**: Set the `SUBTRACE_TOKEN` environment variable to the token you generated in the previous step, and use `subtrace run` to start your app.
33+
```bash Gunicorn
34+
./subtrace run -- gunicorn -w 4 myapp:app
35+
```
2536

26-
```bash
27-
# this is just an example, use the token you generated in Step 3
28-
export SUBTRACE_TOKEN=subt_CbBZqZousFZ2IBIATEgKCNPvAtZuaRxbtdlzlzmUqNg
37+
```bash Go
38+
./subtrace run -- go run .
39+
```
2940

30-
# start your app like you normally do, but using Subtrace
31-
./subtrace run -- node ./app.js
32-
```
41+
```bash Laravel
42+
./subtrace run -- php artisan serve
43+
```
44+
</CodeGroup>
45+
46+
<Expandable title="example output">
47+
<img className="rounded-xl" src="/quickstart-link.png" />
48+
</Expandable>
49+
50+
**Step 3**: Open the `subt.link` URL in the output in your browser to watch a
51+
live stream of your backend network logs:
3352

34-
Congratulations! Your app is now running under Subtrace. Your requests should automatically appear in the [Subtrace dashboard](https://subtrace.dev/dashboard/).
53+
<img className="rounded-xl" src="/quickstart-screenshot.png" />
3554

36-
While this is sufficient to get started with Subtrace, you should install Subtrace everywhere in your infrastructure to get the most out of it. Pick the one that matches your situation best to learn more:
55+
That's it! Check out the guide specific to your backend language and tech stack
56+
for more tips and advanced usage:
3757

38-
- [Installing on Kubernetes](/kubernetes)
58+
- **Node**: [Express.js](/nodejs-express)
59+
- **Python**: [FastAPI](/python-fastapi), [Flask](/python-flask), [Gunicorn](/python-gunicorn)
60+
- **Others**: [Go](/golang), [Laravel](/php-laravel)
3961

40-
If your infra uses something that's not listed, we'd love to understand your usecase and help you get started with Subtrace. Join our [discord server](https://subtrace.dev/discord) or email us at [[email protected]]([email protected]) to get in touch.
62+
If your language isn't listed here, we'd love to help you get started with
63+
Subtrace. Join our [discord server](https://subtrace.dev/discord) or email us
64+

0 commit comments

Comments
 (0)