mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-03 14:19:01 +02:00
[web] Add startup metrics (#25277)
* [web] refactor startup sequence The primary objective here is to call loadGlobalBlobs() only once. But to get there, we need to reorder things and add extra try/catch sections to ensure we are not letting the global uncaughtException handler catch startup errors. Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com> * [web] add metrics for startup steps Co-authored-by: Antoine Clausse <antoine.clausse@overleaf.com> --------- Co-authored-by: Jakob Ackermann <jakob.ackermann@overleaf.com> GitOrigin-RevId: c73edea02516e919d55b896588dcd1862835fedf
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
* before any other module to support code instrumentation.
|
||||
*/
|
||||
|
||||
const metricsModuleImportStartTime = performance.now()
|
||||
|
||||
const APP_NAME = process.env.METRICS_APP_NAME || 'unknown'
|
||||
const BUILD_VERSION = process.env.BUILD_VERSION
|
||||
const ENABLE_PROFILE_AGENT = process.env.ENABLE_PROFILE_AGENT === 'true'
|
||||
@@ -103,3 +105,5 @@ function recordProcessStart() {
|
||||
const metrics = require('.')
|
||||
metrics.inc('process_startup')
|
||||
}
|
||||
|
||||
module.exports = { metricsModuleImportStartTime }
|
||||
|
||||
Reference in New Issue
Block a user