[JAVA-4732] Ensure toString methods of events containing a connection id also include the server and cluster id Created: 22/Sep/22 Updated: 28/Oct/23 Resolved: 03/Oct/22 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Monitoring |
| Affects Version/s: | None |
| Fix Version/s: | 4.8.0 |
| Type: | Improvement | Priority: | Unknown |
| Reporter: | Jeffrey Yemin | Assignee: | Jeffrey Yemin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Documentation Changes: | Not Needed | ||||
| Description |
|
The toString methods of connection pool and server heartbeat event classes (and perhaps others) include a call to ConnectionId#toString, but while ConnectiondId has a ServerId property, it's not included. As a result, if applications log these events by calling toString, they won't see the host names, which makes it kind of useless, e.g. from a recent support case:
We should update either ConnectionId#toString or *Event#toString to include the host name/port and perhaps the cluster id as well. |
| Comments |
| Comment by Githook User [ 03/Oct/22 ] |
|
Author: {'name': 'Jeff Yemin', 'email': 'jeff.yemin@mongodb.com', 'username': 'jyemin'}Message: Add server address and cluster id to events' toString output (#1008)
|