mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-11 20:27:43 +02:00
UBERF-6374: Improve server logging and improve startup performance (#5210)
This commit is contained in:
@@ -17,7 +17,7 @@ let metricsContext: MeasureContext | undefined
|
||||
/**
|
||||
* @public
|
||||
*/
|
||||
export function getMetricsContext (): MeasureContext {
|
||||
export function getMetricsContext (factory?: () => MeasureMetricsContext): MeasureContext {
|
||||
if (metricsContext !== undefined) {
|
||||
return metricsContext
|
||||
}
|
||||
@@ -25,7 +25,11 @@ export function getMetricsContext (): MeasureContext {
|
||||
console.info('please provide apm server url for monitoring')
|
||||
|
||||
const metrics = newMetrics()
|
||||
metricsContext = new MeasureMetricsContext('System', {}, {}, metrics)
|
||||
if (factory !== undefined) {
|
||||
metricsContext = factory()
|
||||
} else {
|
||||
metricsContext = new MeasureMetricsContext('System', {}, {}, metrics)
|
||||
}
|
||||
|
||||
if (metricsFile !== undefined || metricsConsole) {
|
||||
console.info('storing measurements into local file', metricsFile)
|
||||
|
||||
@@ -55,8 +55,6 @@ class StorageBlobAdapter implements DbAdapter {
|
||||
return []
|
||||
}
|
||||
|
||||
async init (model: Tx[]): Promise<void> {}
|
||||
|
||||
async createIndexes (domain: Domain, config: Pick<IndexingConfiguration<Doc>, 'indexes'>): Promise<void> {}
|
||||
async removeOldIndex (domain: Domain, deletePattern: RegExp, keepPattern: RegExp): Promise<void> {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user