fix(api): expose the Kafka publish metrics on the registry Prometheus scrapes
CI/CD Pipeline / test (push) Successful in 7s
CI/CD Pipeline / build-push-deploy (push) Successful in 21s

This commit is contained in:
kaliouich committed 2026-10-26 11:32:45 +00:00
1 parent 9d27e5091e
commit 6649a946cb
2 files changed
+17 -4

No files matched your search

+2 -1
View File
@@ -14,6 +14,7 @@ app.use(express.json());
// ============================================================================
const register = new client.Registry();
client.collectDefaultMetrics({ register });
events.metrics.forEach((m) => register.registerMetric(m));
// Custom Tamagotchi metrics
const hungerGauge = new client.Gauge({
@@ -119,7 +120,7 @@ const pool = new Pool({
port: parseInt(process.env.DB_PORT || '5432'),
database: process.env.DB_NAME || 'tamagotchi',
user: process.env.DB_USER || 'tamagotchi',
password: process.env.DB_PASSWORD || 'tamagotchi123',
password: process.env.DB_PASSWORD || '<YOUR_DB_PASSWORD>',
});
async function initDB() {