File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import (
16
16
"strings"
17
17
18
18
"go.mongodb.org/mongo-driver/v2/bson"
19
+ "go.mongodb.org/mongo-driver/v2/event"
19
20
"go.mongodb.org/mongo-driver/v2/internal/bsonutil"
20
21
"go.mongodb.org/mongo-driver/v2/internal/driverutil"
21
22
"go.mongodb.org/mongo-driver/v2/internal/handshake"
@@ -629,7 +630,7 @@ func isLegacyHandshake(srvAPI *driver.ServerAPIOptions, loadbalanced bool) bool
629
630
630
631
func (h * Hello ) createOperation () driver.Operation {
631
632
op := driver.Operation {
632
- Clock : h .clock ,
633
+ // Clock: h.clock,
633
634
CommandFn : h .command ,
634
635
Database : "admin" ,
635
636
Deployment : h .d ,
@@ -639,6 +640,11 @@ func (h *Hello) createOperation() driver.Operation {
639
640
},
640
641
ServerAPI : h .serverAPI ,
641
642
OmitMaxTimeMS : h .omitMaxTimeMS ,
643
+ CommandMonitor : & event.CommandMonitor {
644
+ Started : func (ctx context.Context , e * event.CommandStartedEvent ) {
645
+ fmt .Println ("Hello started:" , e .CommandName , e .Command )
646
+ },
647
+ },
642
648
}
643
649
644
650
if isLegacyHandshake (h .serverAPI , h .loadBalanced ) {
You can’t perform that action at this time.
0 commit comments