From 4e410825f29880ff9502d41e3874b9ec8cef49cd Mon Sep 17 00:00:00 2001 From: Ben Caimano Date: Fri, 19 Mar 2021 17:43:30 +0000 Subject: SERVER-24912 Audit setting ClientMetadata as its own event --- src/mongo/transport/service_entry_point_impl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mongo/transport/service_entry_point_impl.cpp') diff --git a/src/mongo/transport/service_entry_point_impl.cpp b/src/mongo/transport/service_entry_point_impl.cpp index 111dfd4bbd3..92d80da802e 100644 --- a/src/mongo/transport/service_entry_point_impl.cpp +++ b/src/mongo/transport/service_entry_point_impl.cpp @@ -163,6 +163,7 @@ void ServiceEntryPointImpl::startSession(transport::SessionHandle session) { auto clientName = "conn{}"_format(session->id()); auto client = _svcCtx->makeClient(clientName, session); + auto uuid = client->getUUID(); const bool quiet = serverGlobalParams.quiet.load(); @@ -193,12 +194,13 @@ void ServiceEntryPointImpl::startSession(transport::SessionHandle session) { LOGV2(22943, "Connection accepted", "remote"_attr = session->remote(), + "uuid"_attr = uuid.toString(), "connectionId"_attr = session->id(), "connectionCount"_attr = connectionCount); } auto ssmIt = *maybeSsmIt; - ssmIt->setCleanupHook([this, ssmIt, quiet, session = std::move(session)] { + ssmIt->setCleanupHook([this, ssmIt, quiet, session = std::move(session), uuid] { size_t connectionCount; auto remote = session->remote(); { @@ -212,6 +214,7 @@ void ServiceEntryPointImpl::startSession(transport::SessionHandle session) { LOGV2(22944, "Connection ended", "remote"_attr = remote, + "uuid"_attr = uuid.toString(), "connectionId"_attr = session->id(), "connectionCount"_attr = connectionCount); } -- cgit v1.2.1