[SERVER-47020] Connection accepted and ended messages Created: 20/Mar/20  Updated: 29/Oct/23  Resolved: 18/May/22

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: None
Fix Version/s: 6.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Bruce Lucas (Inactive) Assignee: Reo Kimura (Inactive)
Resolution: Fixed Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-49417 sessionId use in "connection accepted... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Service Arch 2022-05-30
Participants:

 Description   

Connection accepted and connection ended messages

A "connection accepted" message lists a "sessionId" which seems to be the connection number:

{
    "_id": 45,
    "t": "2020-03-20T13:42:08.056Z",
    "s": "I",
    "c": "NETWORK",
    "id": 22943,
    "ctx": "listener",
    "msg": "connection accepted",
    "attr": {
        "remote": "127.0.0.1:46262",
        "sessionId": 1,
        "connectionCount": 1
    }
}

However the "connection ended" message does not, and it has to be parsed from the ctx "conn", which seems contrary to the goals of structured logging:

{
    "_id": 84,
    "t": "2020-03-20T13:42:08.113Z",
    "s": "I",
    "c": "NETWORK",
    "id": 22944,
    "ctx": "conn1",
    "msg": "connection ended",
    "attr": {
        "remote": "127.0.0.1:46262",
        "connectionCount": 1
    }
}

Can the "sessionId" be logged in the "connection ended" message? Alternatively can the "ctx" for the new connection be logged in the "connection accepted" message? The latter is actually possibily better since it allows all kinds of messages, not just the "connection ended" message, to be related back to the "connection accepted" message.

Also would "connectionId" be a better name than "sessionId" - it seems the latter can be confused with logical session ids used in transactions?

Minor point: "Connection ended" and "Connection accepted" should be capitalized



 Comments   
Comment by Lauren Lewis (Inactive) [ 21/Dec/21 ]

We haven’t heard back from you in at least 1 year, so I'm going to close this ticket. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Generated at Thu Feb 08 05:13:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.