Skip to content

Commit e4914f8

Browse files
authored
chore: for ignored queues collect telemetry anyways, but prevent alerting (#3545)
1 parent c5616d7 commit e4914f8

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

services/apps/cron_service/src/jobs/queueMonitoring.job.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,15 @@ const job: IJobDefinition = {
2828
let msg = ``
2929

3030
for (const [topic, groups] of map) {
31-
if (toIgnore.includes(topic.trim())) {
32-
ctx.log.info(`Ignoring topic ${topic}!`)
33-
continue
34-
}
35-
3631
const totalMessages = await getTopicMessageCount(ctx.log, admin, topic)
3732
telemetry.gauge(`kafka.${topic}.total`, totalMessages)
3833

3934
if (groups.length === 0) {
40-
msg += `No consumer groups found for topic ${topic}! Total messages in topic: ${totalMessages}\n`
41-
continue
35+
if (toIgnore.includes(topic.trim())) {
36+
ctx.log.info(`Ignoring topic ${topic}!`)
37+
} else {
38+
msg += `No consumer groups found for topic ${topic}! Total messages in topic: ${totalMessages}\n`
39+
}
4240
}
4341

4442
for (const group of groups) {

0 commit comments

Comments
 (0)