Other
FastAPI
Trace FastAPI request spans with Judgment.
FastAPI tracing uses the standard OpenTelemetry FastAPI instrumentation and routes request spans through Judgment.
uv add judgeval fastapi opentelemetry-instrumentation-fastapipip install judgeval fastapi opentelemetry-instrumentation-fastapifrom fastapi import FastAPI
from judgeval import Tracer
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
Tracer.init(project_name="fastapi_app")
app = FastAPI()
FastAPIInstrumentor.instrument_app(app)
@app.get("/hello")
async def hello():
return {"message": "hello"}