mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-13 05:07:43 +02:00
UBERF-4319: Performance changes (#4474)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
@@ -80,14 +80,20 @@ export class APMMeasureContext implements MeasureContext {
|
||||
}
|
||||
}
|
||||
|
||||
async error (err: any): Promise<void> {
|
||||
async error (message: string, ...args: any[]): Promise<void> {
|
||||
this.logger.error(message, args)
|
||||
|
||||
await new Promise<void>((resolve) => {
|
||||
this.agent.captureError(err, () => {
|
||||
this.agent.captureError({ message, params: args }, () => {
|
||||
resolve()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
async info (message: string, ...args: any[]): Promise<void> {
|
||||
this.logger.info(message, args)
|
||||
}
|
||||
|
||||
end (): void {
|
||||
this.transaction?.end()
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import { writeFile } from 'fs/promises'
|
||||
|
||||
const apmUrl = process.env.APM_SERVER_URL
|
||||
const metricsFile = process.env.METRICS_FILE
|
||||
// const logsRoot = process.env.LOGS_ROOT
|
||||
const metricsConsole = (process.env.METRICS_CONSOLE ?? 'false') === 'true'
|
||||
|
||||
const METRICS_UPDATE_INTERVAL = !metricsConsole ? 1000 : 60000
|
||||
|
||||
Reference in New Issue
Block a user