mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-04 10:39:23 +02:00
15 lines
488 B
TypeScript
15 lines
488 B
TypeScript
import { Container, Service } from '@n8n/di';
|
|
|
|
import { AbstractServer } from '@/abstract-server';
|
|
|
|
@Service()
|
|
export class WebhookServer extends AbstractServer {
|
|
/** Mounts `/metrics` so dedicated webhook procs are scrapeable. */
|
|
async configure(): Promise<void> {
|
|
if (this.globalConfig.endpoints.metrics.enable) {
|
|
const { PrometheusMetricsService } = await import('@/metrics/prometheus-metrics.service');
|
|
await Container.get(PrometheusMetricsService).init(this.app);
|
|
}
|
|
}
|
|
}
|