Top 2.2% dependent packages on proxy.golang.org
Top 1.8% dependent repos on proxy.golang.org
Top 1.7% forks on proxy.golang.org
Top 0.8% docker downloads on proxy.golang.org
proxy.golang.org : github.com/newrelic/go-agent/v3/integrations/nrsqlite3
Package nrsqlite3 instruments https://github.com/mattn/go-sqlite3. Use this package to instrument your SQLite 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 sqlite3 driver. If your code is using sql.Open like this: Then change the side-effect import to this package, and open "nrsqlite3" instead: If you are registering a custom sqlite3 driver with special behavior then you must wrap your driver instance using nrsqlite3.InstrumentSQLDriver. For example, if your code looks like this: Then instrument the driver like this: 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/nrsqlite3/example/main.go
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/newrelic/go-agent/v3/integrations/nrsqlite3
License: Apache-2.0
Latest release: almost 2 years ago
First release: over 5 years ago
Namespace: github.com/newrelic/go-agent/v3/integrations
Dependent packages: 6
Dependent repositories: 8
Stars: 692 on GitHub
Forks: 280 on GitHub
Docker dependents: 9
Docker downloads: 75,407
See more repository details: repos.ecosyste.ms
Last synced: 1 day ago