Documentation ¶
Overview ¶
Package ppmysql instruments the go-sql-driver/mysql package (https://github.com/go-sql-driver/mysql).
This package instruments the mysql driver calls. Use this package's driver in place of the mysql driver.
db, err := sql.Open("mysql-pinpoint", "root:p123@tcp(127.0.0.1:3306)/testdb")
It is necessary to pass the context containing the pinpoint.Tracer to all exec and query methods on SQL driver.
ctx := pinpoint.NewContext(context.Background(), tracer) row := db.QueryRowContext(ctx, "SELECT count(*) from tables")
Click to show internal directories.
Click to hide internal directories.