diff --git a/mongodb.go b/mongodb.go index 2de864f..3786445 100644 --- a/mongodb.go +++ b/mongodb.go @@ -56,6 +56,9 @@ func Connect(cfg Config) (*mongo.Database, error) { Password: opts.Password, } } + if cfg.Monitor != nil { + connectOptions.SetMonitor(cfg.Monitor) + } // Connect client, err := mongo.Connect(context.Background(), connectOptions.ApplyURI(cfg.Host))