Skip to content

Commit 490dcc3

Browse files
committed
WIP
1 parent 5409307 commit 490dcc3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

x/mongo/driver/operation/hello.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"strings"
1717

1818
"go.mongodb.org/mongo-driver/v2/bson"
19+
"go.mongodb.org/mongo-driver/v2/event"
1920
"go.mongodb.org/mongo-driver/v2/internal/bsonutil"
2021
"go.mongodb.org/mongo-driver/v2/internal/driverutil"
2122
"go.mongodb.org/mongo-driver/v2/internal/handshake"
@@ -629,7 +630,7 @@ func isLegacyHandshake(srvAPI *driver.ServerAPIOptions, loadbalanced bool) bool
629630

630631
func (h *Hello) createOperation() driver.Operation {
631632
op := driver.Operation{
632-
Clock: h.clock,
633+
// Clock: h.clock,
633634
CommandFn: h.command,
634635
Database: "admin",
635636
Deployment: h.d,
@@ -639,6 +640,11 @@ func (h *Hello) createOperation() driver.Operation {
639640
},
640641
ServerAPI: h.serverAPI,
641642
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+
},
642648
}
643649

644650
if isLegacyHandshake(h.serverAPI, h.loadBalanced) {

0 commit comments

Comments
 (0)