go.mongodb.org/mongo-driver/mongo
Official Golang driver for MongoDB.
Inject mongotrace.NewMonitor
Call to
options.Client
Replace the expression using the template:
// Using the following synthetic imports:
import (
mongotrace "gopkg.in/DataDog/dd-trace-go.v1/contrib/go.mongodb.org/mongo-driver/mongo"
options "go.mongodb.org/mongo-driver/mongo/options"
)
{{ . }}.SetMonitor(mongotrace.NewMonitor())