mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
feat(config): add telemetry and metrics configuration options
- Introduce new environment variables for telemetry and Prometheus metrics in .env.example - Create example configuration files for Prometheus and Grafana dashboards - Update main application to utilize new configuration settings for Sentry, audio converter, and proxy - Enhance channel services to support audio conversion API integration - Implement middleware for metrics IP whitelisting and basic authentication in routes
This commit is contained in:
13
src/main.ts
13
src/main.ts
@@ -6,7 +6,15 @@ import { ProviderFiles } from '@api/provider/sessions';
|
||||
import { PrismaRepository } from '@api/repository/repository.service';
|
||||
import { HttpStatus, router } from '@api/routes/index.router';
|
||||
import { eventManager, waMonitor } from '@api/server.module';
|
||||
import { Auth, configService, Cors, HttpServer, ProviderSession, Webhook } from '@config/env.config';
|
||||
import {
|
||||
Auth,
|
||||
configService,
|
||||
Cors,
|
||||
HttpServer,
|
||||
ProviderSession,
|
||||
Sentry as SentryConfig,
|
||||
Webhook,
|
||||
} from '@config/env.config';
|
||||
import { onUnexpectedError } from '@config/error.config';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { ROOT_DIR } from '@config/path.config';
|
||||
@@ -140,7 +148,8 @@ async function bootstrap() {
|
||||
|
||||
eventManager.init(server);
|
||||
|
||||
if (process.env.SENTRY_DSN) {
|
||||
const sentryConfig = configService.get<SentryConfig>('SENTRY');
|
||||
if (sentryConfig.DSN) {
|
||||
logger.info('Sentry - ON');
|
||||
|
||||
// Add this after all routes,
|
||||
|
||||
Reference in New Issue
Block a user