Improve sql/driver function example use links
@@ -10,26 +10,29 @@ import (
// SQLDriverSegmentBuilder populates DatastoreSegments for sql.Driver
// instrumentation. Use this to instrument a database that is not supported by
// an existing integration package (nrmysql, nrpq, and nrsqlite3). See
-// _integrations/nrmysql for example use.
+// https://github.com/newrelic/go-agent/blob/master/_integrations/nrmysql/nrmysql.go
+// for example use.
type SQLDriverSegmentBuilder struct {
BaseSegment DatastoreSegment
ParseQuery func(segment *DatastoreSegment, query string)
ParseDSN func(segment *DatastoreSegment, dataSourceName string)
}
-// InstrumentSQLDriver wraps a driver.Driver, adding instrumentation for exec and
-// query calls made with a transaction-containing context. Use this to
+// InstrumentSQLDriver wraps a driver.Driver, adding instrumentation for exec
+// and query calls made with a transaction-containing context. Use this to
// instrument a database driver that is not supported by an existing integration
-// package (nrmysql, nrpq, and nrsqlite3). See _integrations/nrmysql for example
-// use.
+// package (nrmysql, nrpq, and nrsqlite3). See
+// https://github.com/newrelic/go-agent/blob/master/_integrations/nrmysql/nrmysql.go
+// for example use.
func InstrumentSQLDriver(d driver.Driver, bld SQLDriverSegmentBuilder) driver.Driver {
return optionalMethodsDriver(&wrapDriver{bld: bld, original: d})
}
-// InstrumentSQLConnector wraps a driver.Connector, adding instrumentation for exec
-// and query calls made with a transaction-containing context. Use this to
+// InstrumentSQLConnector wraps a driver.Connector, adding instrumentation for
+// exec and query calls made with a transaction-containing context. Use this to
// instrument a database connector that is not supported by an existing
-// integration package (nrmysql, nrpq, and nrsqlite3). See _integrations/nrmysql
+// integration package (nrmysql, nrpq, and nrsqlite3). See
+// https://github.com/newrelic/go-agent/blob/master/_integrations/nrmysql/nrmysql.go
// for example use.
func InstrumentSQLConnector(connector driver.Connector, bld SQLDriverSegmentBuilder) driver.Connector {
return &wrapConnector{original: connector, bld: bld}
