mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Add metrics option to cache (#6846)
* add metrics to cache * use events for metrics * pr comments / broken test * lint fix * update the test * improve tests * Update packages/cli/src/config/schema.ts * disable flaky test * lint fix --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in> Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <netroy@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
fdfc6c5a92
commit
adcf5a96e8
@@ -2,9 +2,6 @@
|
||||
/* eslint-disable @typescript-eslint/no-unnecessary-boolean-literal-compare */
|
||||
/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */
|
||||
/* eslint-disable prefer-const */
|
||||
|
||||
/* eslint-disable @typescript-eslint/restrict-template-expressions */
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-shadow */
|
||||
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
@@ -143,7 +140,6 @@ import {
|
||||
isLdapLoginEnabled,
|
||||
} from './Ldap/helpers';
|
||||
import { AbstractServer } from './AbstractServer';
|
||||
import { configureMetrics } from './metrics';
|
||||
import { PostHogClient } from './posthog';
|
||||
import { eventBus } from './eventbus';
|
||||
import { Container } from 'typedi';
|
||||
@@ -525,7 +521,11 @@ export class Server extends AbstractServer {
|
||||
}
|
||||
|
||||
async configure(): Promise<void> {
|
||||
configureMetrics(this.app);
|
||||
if (config.getEnv('endpoints.metrics.enable')) {
|
||||
// eslint-disable-next-line @typescript-eslint/naming-convention
|
||||
const { MetricsService } = await import('@/services/metrics.service');
|
||||
await Container.get(MetricsService).configureMetrics(this.app);
|
||||
}
|
||||
|
||||
this.instanceId = await UserSettings.getInstanceId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user