Documentation ¶
Overview ¶
Package atgorm provides wrappers for tracing GORM operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Open ¶
Open returns a *gorm.DB for the given dialect and arguments. The returned *gorm.DB will have callbacks registered with RegisterCallbacks, such that CRUD operations will be reported as spans.
Open accepts the following signatures:
- a datasource name (i.e. the second argument to sql.Open)
- a driver name and a datasource name
- a *sql.DB, or some other type with the same interface
If a driver and datasource name are supplied, and the appropriate atgorm/dialects package has been imported (or the driver has otherwise been registered with atsql), then the datasource name will be parsed for inclusion in the span context.
func RegisterCallbacks ¶
RegisterCallbacks registers callbacks on db for reporting spans to Atatus. This is called automatically by atgorm.Open; it is provided for cases where a *gorm.DB is acquired by other means.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
dialects
|
|
mysql
Package atgormmysql imports the gorm mysql dialect package, and also registers the mysql driver with atsql.
|
Package atgormmysql imports the gorm mysql dialect package, and also registers the mysql driver with atsql. |
postgres
Package atgormpostgres imports the gorm postgres dialect package, and also registers the lib/pq driver with atsql.
|
Package atgormpostgres imports the gorm postgres dialect package, and also registers the lib/pq driver with atsql. |
sqlite
Package atgormsqlite imports the gorm sqlite dialect package, and also registers the sqlite3 driver with atsql.
|
Package atgormsqlite imports the gorm sqlite dialect package, and also registers the sqlite3 driver with atsql. |