Skip to content

Files

Latest commit

 

History

History
32 lines (22 loc) · 956 Bytes

README.md

File metadata and controls

32 lines (22 loc) · 956 Bytes

Python FastAPI + Subtrace

This repo shows how you can add Subtrace to your FastAPI backend app with just one line of code. Subtrace connects your production servers 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.

To start using Subtrace, use pip to install the Python package:

pip install subtrace

Then add the following line to your main.py file:

import subtrace

Get a SUBTRACE_TOKEN from the dashboard for free and set is as an environment variable before starting your server:

export SUBTRACE_TOKEN=  # get a token for free at https://subtrace.dev/dashboard
fastapi run main.py

And send some requests and see them in Chrome DevTools!

image