mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #23317 from overleaf/bg-improve-real-time-ping-logs
Add connection details to real-time ping logs GitOrigin-RevId: f993d71deb1a512295af6c7146a19b730742e33f
This commit is contained in:
@@ -235,6 +235,14 @@ module.exports = Router = {
|
||||
user = { _id: 'anonymous-user', anonymousAccessToken }
|
||||
}
|
||||
|
||||
const connectionDetails = {
|
||||
userId: user._id,
|
||||
projectId,
|
||||
remoteIp: client.remoteIp,
|
||||
publicId: client.publicId,
|
||||
clientId: client.id,
|
||||
}
|
||||
|
||||
let pingTimestamp
|
||||
let pingId = -1
|
||||
let pongId = -1
|
||||
@@ -243,8 +251,7 @@ module.exports = Router = {
|
||||
if (pongId !== pingId) {
|
||||
logger.warn(
|
||||
{
|
||||
publicId: client.publicId,
|
||||
clientId: client.id,
|
||||
...connectionDetails,
|
||||
pingId,
|
||||
pongId,
|
||||
lastPingTimestamp: pingTimestamp,
|
||||
@@ -262,8 +269,7 @@ module.exports = Router = {
|
||||
if (receivedPingId !== pingId) {
|
||||
logger.warn(
|
||||
{
|
||||
publicId: client.publicId,
|
||||
clientId: client.id,
|
||||
...connectionDetails,
|
||||
receivedPingId,
|
||||
pingId,
|
||||
sentTimestamp,
|
||||
@@ -279,8 +285,7 @@ module.exports = Router = {
|
||||
) {
|
||||
logger.warn(
|
||||
{
|
||||
publicId: client.publicId,
|
||||
clientId: client.id,
|
||||
...connectionDetails,
|
||||
receivedPingId,
|
||||
pingId,
|
||||
sentTimestamp,
|
||||
|
||||
Reference in New Issue
Block a user