Other
SQLAlchemy
Trace SQLAlchemy database spans with Judgment.
SQLAlchemy tracing uses the standard OpenTelemetry SQLAlchemy instrumentation and routes database spans through Judgment.
uv add judgeval sqlalchemy opentelemetry-instrumentation-sqlalchemypip install judgeval sqlalchemy opentelemetry-instrumentation-sqlalchemyfrom judgeval import Tracer
from opentelemetry.instrumentation.sqlalchemy import SQLAlchemyInstrumentor
from sqlalchemy import create_engine, text
Tracer.init(project_name="sqlalchemy_app")
engine = create_engine("sqlite:///:memory:")
SQLAlchemyInstrumentor().instrument(engine=engine)
with engine.connect() as connection:
connection.execute(text("select 1"))
Tracer.force_flush()