Other
MySQL
Trace MySQL spans with Judgment.
MySQL tracing uses the standard OpenTelemetry MySQL instrumentation and routes database spans through Judgment.
uv add judgeval mysql-connector-python opentelemetry-instrumentation-mysqlpip install judgeval mysql-connector-python opentelemetry-instrumentation-mysqlimport mysql.connector
from judgeval import Tracer
from opentelemetry.instrumentation.mysql import MySQLInstrumentor
Tracer.init(project_name="mysql_app")
Tracer.registerOTELInstrumentation(MySQLInstrumentor())
# Create connections normally after registration.
# connection = mysql.connector.connect(
# host="localhost",
# user="user",
# password="password",
# database="db",
# )