[CSHARP-1799] Provide custom information in the executing commands Created: 14/Oct/16 Updated: 31/Mar/22 |
|
| Status: | Backlog |
| Project: | C# Driver |
| Component/s: | Diagnostics |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Minor - P4 |
| Reporter: | Ioan Crisan | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
We receive far more information to log, starting with the 2.2 driver, with the help of event subscribers. However, in an async environment, it is hard to tell, if not impossible, which command that we issued matches a specific event (for example CommandSucceededEvent). Ideally, it would be very handy to provide in a BulkWriteAsync command, or FindAsync, some sort of information (string?) that we can get in the event information and then match with our custom code (for example in the Options parameter). Alternatively, the result objects could provide a list of issued command ids related to that operation (BulkWrite/Find) - however I favor the first approach. |
| Comments |
| Comment by Jeffrey Yemin [ 03/Dec/20 ] |
|
Maybe applications could use $comment for this once it's supported for all CRUD methods. |
| Comment by Ioan Crisan [ 14/Oct/16 ] |
|
Clarification: our scenario is to log the events when there is a potential performance problem, so that we can tell whether the problem comes from our code or is related to some external factors, like the mongodb driver or the network. Therefore we need to correlate our logging to mongo logging. |