FastAPI
Pass FastAPIIntegration() to init before the process starts serving. You do not add middleware.
pip install insider-python
FastAPI stays your app's dependency. FastAPIIntegration imports it at runtime.
import os
import insider
from fastapi import FastAPI
from insider.integrations.fastapi import FastAPIIntegration
from insider.integrations.logging import LoggingIntegration
insider.init(
dsn=os.environ.get("INSIDER_DSN"),
environment="production",
release="1.2.3",
enable_logs=True,
integrations=[FastAPIIntegration(), LoggingIntegration()],
)
app = FastAPI()
What gets beamed
Every HTTP request emits one flat footprint: timing, method, path, status, stdlib logs when enable_logs=True, and the unhandled exception when the request fails. WebSocket and lifespan traffic is ignored.
HTTPException and request validation become the response status on that footprint. An unhandled Exception is stored on the same footprint with its stack.
Turn capture off
integrations=[FastAPIIntegration(auto_perf=False)]
Set INSIDER_DEBUG=true to print which hooks installed at startup.