feat(analytics): persona logging upgrade and Sentry system config
Add client-logging SDK, expanded event taxonomy, API observability, admin domain events UI, and move SENTRY_DSN to HQ system settings with @sentry/node bootstrap after config preload. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,8 +7,10 @@ import { json } from 'express';
|
||||
import { AppModule } from './app.module';
|
||||
import { HttpExceptionFilter } from './common/filters/http-exception.filter';
|
||||
import { ResponseInterceptor } from './common/interceptors/response.interceptor';
|
||||
import { LoggingInterceptor } from './common/logging/logging.interceptor';
|
||||
import { preloadSystemConfigEnv } from './common/system-config/system-config.env';
|
||||
import { AlertService } from './common/alert/alert.service';
|
||||
import { initSentryIfConfigured } from './integrations/sentry/sentry.bootstrap';
|
||||
|
||||
async function bootstrap() {
|
||||
const preloaded = await preloadSystemConfigEnv().catch((e) => {
|
||||
@@ -18,6 +20,7 @@ async function bootstrap() {
|
||||
if (preloaded > 0) {
|
||||
console.log(`[config] loaded ${preloaded} keys from system_config`);
|
||||
}
|
||||
initSentryIfConfigured();
|
||||
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule, { bodyParser: false });
|
||||
app.setGlobalPrefix('api/v1');
|
||||
@@ -38,7 +41,7 @@ async function bootstrap() {
|
||||
);
|
||||
app.useGlobalPipes(new ValidationPipe({ transform: true, whitelist: true }));
|
||||
app.useGlobalFilters(new HttpExceptionFilter(app.get(AlertService)));
|
||||
app.useGlobalInterceptors(new ResponseInterceptor());
|
||||
app.useGlobalInterceptors(new ResponseInterceptor(), app.get(LoggingInterceptor));
|
||||
const port = process.env.PORT || 3000;
|
||||
const cfg = loadAppConfig();
|
||||
const smsMode = cfg.mockSms ? 'MOCK' : 'ALIYUN';
|
||||
|
||||
Reference in New Issue
Block a user