FastAPI API monitoring & analytics
FastAPI generates your routes and validation from type hints — Beacon completes the picture in production. The ASGI middleware captures every request with its real route template (/users/{user_id}), and one optional line of validation capture records which Pydantic fields fail with 422 and how often, surfaced per endpoint.
100,000 requests per month on the free tier — no credit card to start.
Add Beacon to FastAPI in two steps
Drop-in middleware. The SDK defaults to Beacon's hosted ingest endpoint, so you only need a
project ingest key — set it as BEACON_INGEST_KEY in your environment.
pip install "beaconhq[fastapi]"
import os
from fastapi import FastAPI
from beaconhq import BeaconClient
from beaconhq.integrations.asgi import (
BeaconASGIMiddleware,
enable_fastapi_validation_capture,
)
beacon = BeaconClient(ingest_key=os.environ["BEACON_INGEST_KEY"])
app = FastAPI()
app.add_middleware(BeaconASGIMiddleware, client=beacon)
# Optional: capture which Pydantic fields fail validation (422), per endpoint.
enable_fastapi_validation_capture(app)
@app.get("/users/{user_id}")
def get_user(user_id: int):
return {"id": user_id}
Create a project in the dashboard to get your ingest key, then deploy. Traffic, latency, errors, and endpoints populate in real time. Full setup in the docs.
Everything you need to keep your FastAPI API healthy
One place for traffic, latency, errors, uptime, and scheduled-job health — built for teams who need to know what their API is doing right now.
Traffic & latency percentiles
Per-request volume with p50/p95/p99 latency, so you see real tail latency — not just averages.
Error rates & error explorer
Track 4xx/5xx over time and drill into the exact failing requests, status codes, and endpoints behind an incident.
Endpoint & consumer breakdowns
See which endpoints and which API consumers drive your traffic, errors, and slowest responses — ranked and filterable.
Request-log explorer
A searchable log of individual requests — method, path, status, latency, consumer — the fast path from a metric spike to the requests behind it.
Uptime, cron & heartbeat monitoring
Synthetic uptime checks plus dead-man's-switch heartbeat monitoring for cron jobs and background workers.
Status pages & alerts
Public status pages and multi-channel alerts — email, Slack, PagerDuty, Discord, Teams, and signed webhooks — when something breaks.
Start monitoring your FastAPI API today
100,000 requests per month on the free tier — no credit card to start. Connect your first service in minutes.