[SERVER-10637] Provide a mechanism to expose the connectionId so that drivers can log it Created: 28/Aug/13 Updated: 18/Jan/22 Resolved: 05/Jun/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Networking |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.1 |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Jeffrey Yemin | Assignee: | Anthony Roy |
| Resolution: | Done | Votes: | 4 |
| Labels: | neweng, service_architecture | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||||||||||||||||||||||
| Sprint: | Platforms 2018-06-04, Platforms 2018-06-18 | ||||||||||||||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
Sometimes application developers and support engineers need to correlate what's happening in their application with activity in the database, and one easy way to do this would be if drivers could log the server's connectionId for outgoing messages, something like:
and correlate it with a server log message like:
It would also be useful to include the connectionId with any exception thrown by a driver. Currently the only command that will return this connectionId is "getlasterror". While drivers can use this (by calling it after connecting and caching the result), it's not ideal. For one, "getlasterror" is likely to be removed in a future release. For another, the server will log this call, and it may confuse people that getlasterror is being called after every connect. So the request is to provide some other supported mechanism that will provide the server's connectionId to clients. A good solution would be to add the connectionId to the isMaster response. Drivers are already calling isMaster and therefore would be able to discover the server's connectionId without having to issue a separate command requiring an additional network round trip. |
| Comments |
| Comment by Anthony Roy [ 05/Jun/18 ] |
|
connectionId has been added to the isMaster response. |
| Comment by Githook User [ 05/Jun/18 ] |
|
Author: {'username': 'Ant2888', 'name': 'Anthony Roy', 'email': 'anthony.roy@10gen.com'}Message: Added connectionId to allow drivers to correlate client-side conections with |
| Comment by Robert Stam [ 29/Oct/14 ] |
|
The best solution would be to add the connectionId to the isMaster response. Drivers are already calling isMaster. |
| Comment by Scott Hernandez (Inactive) [ 11/Sep/14 ] |
|
Currently the shell kills ops, during shutdown, by using "whatMyUri" then killing anything from currentOps which has that client address. This command could return the connectionId as well. |