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:
Michael Auerswald
2023-08-04 20:51:07 +02:00
committed by GitHub
parent fdfc6c5a92
commit adcf5a96e8
12 changed files with 315 additions and 159 deletions

View File

@@ -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;