mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +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
@@ -25,7 +25,8 @@ export type EndpointGroup =
|
||||
| 'eventBus'
|
||||
| 'license'
|
||||
| 'variables'
|
||||
| 'tags';
|
||||
| 'tags'
|
||||
| 'metrics';
|
||||
|
||||
export interface SetupProps {
|
||||
applyAuth?: boolean;
|
||||
|
||||
@@ -51,6 +51,7 @@ import type { EndpointGroup, SetupProps, TestServer } from '../types';
|
||||
import { mockInstance } from './mocking';
|
||||
import { JwtService } from '@/services/jwt.service';
|
||||
import { RoleService } from '@/services/role.service';
|
||||
import { MetricsService } from '@/services/metrics.service';
|
||||
|
||||
/**
|
||||
* Plugin to prefix a path segment into a request URL pathname.
|
||||
@@ -187,6 +188,9 @@ export const setupTestServer = ({
|
||||
|
||||
for (const group of functionEndpoints) {
|
||||
switch (group) {
|
||||
case 'metrics':
|
||||
await Container.get(MetricsService).configureMetrics(app);
|
||||
break;
|
||||
case 'eventBus':
|
||||
registerController(app, config, new EventBusController());
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user