https://github.com/subtrace/nextjs-demo
Next.js + Subtrace demo
https://github.com/subtrace/nextjs-demo
Last synced: 17 days ago
JSON representation
Next.js + Subtrace demo
- Host: GitHub
- URL: https://github.com/subtrace/nextjs-demo
- Owner: subtrace
- License: bsd-3-clause
- Created: 2025-01-28T00:33:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-05T08:15:57.000Z (4 months ago)
- Last Synced: 2025-12-08T16:42:30.456Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 16.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Next.js + Subtrace
This repo shows how to add [Subtrace](https://subtrace.dev) to a sample Next.js app.
Subtrace connects your server to Chrome DevTools so that you can inspect the status,
headers, payload, and latency of each request.
With Subtrace, you can debug your production app way faster.
Clone this repo, and download Subtrace on your machine:
```bash
curl -fSLO "https://subtrace.dev/download/$(uname -s)/$(uname -m)/subtrace" && chmod +x ./subtrace
```
Get a `SUBTRACE_TOKEN` from the Subtrace [dashboard](https://subtrace.dev/dashboard) and set it as
an environment variable.
```bash
# get a tracer token for free at https://subtrace.dev/dashboard
export SUBTRACE_TOKEN=subt_...xxxxx
```
Start the Next.js app with Subtrace.
```bash
npm install
./subtrace run -- npm run dev
```
That's it! You can now visit [localhost:3000](localhost:3000) and make requests
to the Next.js server that show up on the Subtrace [dashboard](https://subtrace.dev/dashboard)
in realtime:
https://github.com/user-attachments/assets/3695b023-f47b-4080-a29d-dca29bf26606