Asyncio-native SDK for FastAPI, Flask, Starlette, Sanic, and raw Python services. SQLAlchemy queries and outgoing httpx/requests calls are instrumented automatically — no decorators required.
1# In your Python app entry point2from justanalytics import JA34JA.init(5api_key=os.environ["JUSTANALYTICS_API_KEY"],6service_name="my-python-api",7environment="production",8)910# FastAPI / Flask / Starlette / Sanic /11# SQLAlchemy / httpx / requests — auto-traced.
FastAPI to Flask to a one-off worker script — same SDK, same dashboard.
SQLAlchemy 1.4 and 2.0 (sync + async). psycopg, asyncpg, aiomysql, motor patched at import time.
ASGI middleware for FastAPI, Starlette, Sanic. WSGI middleware for Flask, Django (use the dedicated /for/django page for Django-specific setup).
Unhandled exceptions, asyncio task failures, signal handlers all captured with locals — without sentry-style monkey-patching.
contextvars carries trace context across await boundaries, task groups, and gather() — without manual passing.
Add the frontend script for cookie-free analytics, replay, and Web Vitals. One dashboard for client + server.
p95 latency, error-rate, and throughput alerts on every endpoint. Routes to email, webhook, or PagerDuty.
Install, init, mount the middleware. SQLAlchemy queries and httpx calls flow through unchanged.
# Install
pip install justanalytics
# main.py
import os
from fastapi import FastAPI
from justanalytics import JA
from justanalytics.integrations.fastapi import JAMiddleware
JA.init(
api_key=os.environ["JUSTANALYTICS_API_KEY"],
service_name="my-fastapi-app",
environment=os.getenv("ENV", "development"),
)
app = FastAPI()
app.add_middleware(JAMiddleware)
@app.get("/users/{user_id}")
async def get_user(user_id: int):
# SQLAlchemy queries here are auto-traced
return await db.users.get(user_id)Replace five tools with one platform. Start with the free tier or try Pro free for 7 days.
Start 7-Day Free Trial