mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 13:21:08 +02:00
- Replace Prometheus with VictoriaMetrics (2-year retention) - Add DuckDB analytics module for business KPIs (unlimited retention) - Add master overview dashboard combining all metrics - Add business metrics dashboard for user growth tracking - Add backup script for VictoriaMetrics snapshots and DuckDB - Add ADR documentation for monitoring stack decision Analytics API endpoints: - GET /api/v1/analytics/health - Service health - GET /api/v1/analytics/latest - Latest metrics snapshot - GET /api/v1/analytics/growth - User growth over time - GET /api/v1/analytics/monthly - Monthly aggregates - POST /api/v1/analytics/snapshot - Manual snapshot trigger
48 lines
1.3 KiB
TypeScript
48 lines
1.3 KiB
TypeScript
import { Module } from '@nestjs/common';
|
|
import { ConfigModule } from '@nestjs/config';
|
|
import { ThrottlerModule } from '@nestjs/throttler';
|
|
import { APP_FILTER } from '@nestjs/core';
|
|
import configuration from './config/configuration';
|
|
import { AuthModule } from './auth/auth.module';
|
|
import { CreditsModule } from './credits/credits.module';
|
|
import { FeedbackModule } from './feedback/feedback.module';
|
|
import { ReferralsModule } from './referrals/referrals.module';
|
|
import { SettingsModule } from './settings/settings.module';
|
|
import { TagsModule } from './tags/tags.module';
|
|
import { AiModule } from './ai/ai.module';
|
|
import { HealthModule } from './health/health.module';
|
|
import { MetricsModule } from './metrics';
|
|
import { AnalyticsModule } from './analytics';
|
|
import { HttpExceptionFilter } from './common/filters/http-exception.filter';
|
|
|
|
@Module({
|
|
imports: [
|
|
ConfigModule.forRoot({
|
|
isGlobal: true,
|
|
load: [configuration],
|
|
}),
|
|
ThrottlerModule.forRoot([
|
|
{
|
|
ttl: 60000, // 60 seconds
|
|
limit: 100, // 100 requests per minute
|
|
},
|
|
]),
|
|
MetricsModule,
|
|
AnalyticsModule,
|
|
AiModule,
|
|
AuthModule,
|
|
CreditsModule,
|
|
FeedbackModule,
|
|
HealthModule,
|
|
ReferralsModule,
|
|
SettingsModule,
|
|
TagsModule,
|
|
],
|
|
providers: [
|
|
{
|
|
provide: APP_FILTER,
|
|
useClass: HttpExceptionFilter,
|
|
},
|
|
],
|
|
})
|
|
export class AppModule {}
|