proxy.golang.org : github.com/newrelic/go-agent/v3/integrations/nrmysql : v1.2.1
Package nrmysql instruments https://github.com/go-sql-driver/mysql. Use this package to instrument your MySQL calls without having to manually create DatastoreSegments. This is done in a two step process: 1. Use this package's driver in place of the mysql driver. If your code is using sql.Open like this: Then change the side-effect import to this package, and open "nrmysql" instead: 2. Provide a context containing a newrelic.Transaction to all exec and query methods on sql.DB, sql.Conn, sql.Tx, and sql.Stmt. This requires using the context methods ExecContext, QueryContext, and QueryRowContext in place of Exec, Query, and QueryRow respectively. For example, instead of the following: Do this: A working example is shown here: https://github.com/newrelic/go-agent/tree/master/v3/integrations/nrmysql/example/main.go
Registry -
Documentation -
Download -
JSON
purl: pkg:golang/github.com/newrelic/go-agent/v3/integrations/[email protected]
Published:
Indexed: