misc: initial working setup for metrics observabilit

This commit is contained in:
Sheen Capadngan
2024-06-05 21:46:10 +08:00
parent 4c06f134fb
commit 60895537a7
11 changed files with 1781 additions and 20 deletions
+2 -1
View File
@@ -20,6 +20,7 @@ import { TQueueServiceFactory } from "@app/queue";
import { TSmtpService } from "@app/services/smtp/smtp-service";
import { globalRateLimiterCfg } from "./config/rateLimiter";
import { apiMetrics } from "./plugins/api-metrics";
import { fastifyErrHandler } from "./plugins/error-handler";
import { registerExternalNextjs } from "./plugins/external-nextjs";
import { serializerCompiler, validatorCompiler, ZodTypeProvider } from "./plugins/fastify-zod";
@@ -62,7 +63,7 @@ export const main = async ({ db, smtp, logger, queue, keyStore }: TMain) => {
});
// pull ip based on various proxy headers
await server.register(fastifyIp);
await server.register(apiMetrics);
await server.register(fastifySwagger);
await server.register(fastifyFormBody);
await server.register(fastifyErrHandler);