File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ type wrappedSession struct {
2727}
2828
2929func (ws * wrappedSession ) EndSession (ctx context.Context ) {
30- ctx , span := roundtripTrackingSpan (ctx , "github.com/mongodb/mongo-go-driver.Client .EndSession" )
30+ ctx , span := roundtripTrackingSpan (ctx , "github.com/mongodb/mongo-go-driver.Session .EndSession" )
3131 defer span .end (ctx )
3232
3333 ws .ss .EndSession (ctx )
@@ -38,11 +38,18 @@ func (ws *wrappedSession) StartTransaction(topts ...transactionopt.Transaction)
3838}
3939
4040func (ws * wrappedSession ) AbortTransaction (ctx context.Context ) error {
41- return ws .ss .AbortTransaction (ctx )
41+ ctx , span := roundtripTrackingSpan (ctx , "github.com/mongodb/mongo-go-driver.Session.AbortTransaction" )
42+ defer span .end (ctx )
43+
44+ err := ws .ss .AbortTransaction (ctx )
45+ if err != nil {
46+ span .setError (err )
47+ }
48+ return err
4249}
4350
4451func (ws * wrappedSession ) CommitTransaction (ctx context.Context ) error {
45- ctx , span := roundtripTrackingSpan (ctx , "github.com/mongodb/mongo-go-driver.Client.EndSession " )
52+ ctx , span := roundtripTrackingSpan (ctx , "github.com/mongodb/mongo-go-driver.Session.CommitTransaction " )
4653 defer span .end (ctx )
4754
4855 err := ws .ss .CommitTransaction (ctx )
You can’t perform that action at this time.
0 commit comments