feat: add end-to-end observability (metrics, health, mobile RUM, dashboards, alerts) #32

Manually merged
Ichitux merged 8 commits from feat/observability-metrics-monitoring into main 2026-07-14 11:44:36 +00:00
Showing only changes of commit e281bd4fa8 - Show all commits
+9 -1
View File
@@ -5,7 +5,11 @@ import * as appMetrics from './src/metrics.js';
const redisClient = createClient({
socket: {
host: process.env.REDIS_HOST || 'localhost',
port: process.env.REDIS_PORT || 6379
port: process.env.REDIS_PORT || 6379,
reconnectStrategy: (retries) => {
if (retries > 10) return new Error('Redis max retries reached');
return Math.min(retries * 100, 3000);
}
},
password: process.env.REDIS_PASSWORD || undefined
});
@@ -44,5 +48,9 @@ redisClient.setEx = async (...args) => {
// Connect to Redis
await redisClient.connect();
// Connect to Redis — skip in test (services are mocked) or when REDIS_URL is unset
if (process.env.NODE_ENV !== 'test') {
await redisClient.connect();
}
export default redisClient;