[GODRIVER-2931] Add a way to get txnNumber from mongo.Session Created: 02/Aug/23 Updated: 27/Oct/23 Resolved: 12/Sep/23 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Sessions |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Tim Fogarty | Assignee: | Preston Vasquez |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Documentation Changes Summary: | 1. What would you like to communicate to the user about this feature? |
| Description |
| Comments |
| Comment by Tim Fogarty [ 12/Sep/23 ] | ||||||||||
|
Hi preston.vasquez@mongodb.com! Great! I think the CommandStartedEvent.Command would work for our use case. Thank you for the suggestion. Since we have a way to log this, please feel free to close the ticket if you don't want to implement Session.ID(). | ||||||||||
| Comment by Preston Vasquez [ 12/Sep/23 ] | ||||||||||
|
Hey tim.fogarty@mongodb.com , thank you for submitting this ticket ! What is the use case for exposing the current transaction number on the stable API? Although it's deprecated, you can source the TxnNumber from mongo.XSession:
I understand that this is unstable API. Alternatively, you mention that:
The event monitor will include both the "lsid" and "txnNumber" in the CommandStartedEvent.Command message. For example:
Will either of these solutions work for your team? |