Skip to content

Commit

Permalink
[feature] Add coauth.session.${sessionType} metric
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Sep 12, 2024
1 parent 1103d1b commit dc1932b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions DocService/sources/DocsCoServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1912,6 +1912,12 @@ exports.install = function(server, callbackFunction) {
yield sendStatusDocument(ctx, docId, c_oAscChangeBase.No, new commonDefines.OutputAction(commonDefines.c_oAscUserAction.Out, tmpUser.idOriginal), userIndex);
}
}
let sessionType = isView ? 'view' : 'edit';
let sessionTimeMs = new Date().getTime() - conn.sessionTimeConnect;
ctx.logger.debug(`closeDocument %s session time:%s`, sessionType, sessionTimeMs);
if(clientStatsD) {
clientStatsD.timing(`coauth.session.${sessionType}`, sessionTimeMs);
}
}
}

Expand Down

0 comments on commit dc1932b

Please sign in to comment.