Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-4732

Ensure toString methods of events containing a connection id also include the server and cluster id

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.8.0
    • Affects Version/s: None
    • Component/s: Monitoring
    • None
    • Fully Compatible
    • Not Needed

      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:

       
      2022-09-14 02:09:42.402 Received ServerHeartbeatStartedEvent: ServerHeartbeatStartedEvent{connectionId=connectionId{localValue:11, serverValue:173309}} 
      

      We should update either ConnectionId#toString or *Event#toString to include the host name/port and perhaps the cluster id as well.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: