contrib/jinzhu/gorm
Those integration are enabled by having the
following import
in the project’s orchestrion.tool.go
file:
import (
_ "github.com/DataDog/orchestrion"
_ "gopkg.in/DataDog/dd-trace-go.v1/contrib/jinzhu/gorm" // integration
//...
)
The fantastic ORM library for Golang.
Open
Call to
gorm.Open
Replace the expression using the template:
// Using the following synthetic imports:
import (
gorm "github.com/jinzhu/gorm"
gormtrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/jinzhu/gorm"
)
func() (*gorm.DB, error) {
db, err := {{ . }}
if err != nil {
return nil, err
}
return gormtrace.WithCallbacks(db), err
}()