From 933bd26173c59499bf5c25e56d8b81a81ee702ba Mon Sep 17 00:00:00 2001 From: KillianG Date: Wed, 13 Nov 2024 18:43:55 +0100 Subject: [PATCH] Fix serviceName not set Issue: BB-561 --- extensions/notification/queueProcessor/QueueProcessor.js | 2 ++ .../replicationStatusProcessor/ReplicationStatusProcessor.js | 2 ++ lib/constants.js | 1 + 3 files changed, 5 insertions(+) diff --git a/extensions/notification/queueProcessor/QueueProcessor.js b/extensions/notification/queueProcessor/QueueProcessor.js index d2a3b5a4c..35214ba51 100644 --- a/extensions/notification/queueProcessor/QueueProcessor.js +++ b/extensions/notification/queueProcessor/QueueProcessor.js @@ -14,6 +14,7 @@ const NotificationDestination = require('../destination'); const configUtil = require('../utils/config'); const messageUtil = require('../utils/message'); const NotificationConfigManager = require('../NotificationConfigManager'); +const libConstants = require('../../../lib/constants'); const processedEvents = ZenkoMetrics.createCounter({ name: 's3_notification_queue_processor_events_total', @@ -92,6 +93,7 @@ class QueueProcessor extends EventEmitter { this.kafkaConfig = kafkaConfig; this.notifConfig = notifConfig; this.destinationId = destinationId; + this.serviceName = libConstants.services.notificationQueueProcessor; this.destinationConfig = notifConfig.destinations.find(dest => dest.resource === destinationId); assert(this.destinationConfig, `Invalid destination argument "${destinationId}".` + diff --git a/extensions/replication/replicationStatusProcessor/ReplicationStatusProcessor.js b/extensions/replication/replicationStatusProcessor/ReplicationStatusProcessor.js index 14dd84066..66e2c0ca6 100644 --- a/extensions/replication/replicationStatusProcessor/ReplicationStatusProcessor.js +++ b/extensions/replication/replicationStatusProcessor/ReplicationStatusProcessor.js @@ -18,6 +18,7 @@ const FailedCRRProducer = require('../failedCRR/FailedCRRProducer'); const ReplayProducer = require('../replay/ReplayProducer'); const MetricsProducer = require('../../../lib/MetricsProducer'); const { http: HttpAgent, https: HttpsAgent } = require('httpagent'); +const libConstants = require('../../../lib/constants'); // StatsClient constant default for site metrics const INTERVAL = 300; // 5 minutes; @@ -225,6 +226,7 @@ class ReplicationStatusProcessor { this._consumer = null; this._gcProducer = null; this._mProducer = null; + this.serviceName = libConstants.services.replicationStatusProcessor; this.logger = new Logger('Backbeat:Replication:ReplicationStatusProcessor'); diff --git a/lib/constants.js b/lib/constants.js index 35bbe1bf1..e60b2fe13 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -23,6 +23,7 @@ const constants = { replicationQueueProcessor: 'ReplicationQueueProcessor', replicationReplayProcessor: 'ReplicationReplayProcessor', replicationStatusProcessor: 'ReplicationStatusProcessor', + notificationQueueProcessor: 'NotificationQueueProcessor', }, locationStatusCollection: '__locationStatusStore', lifecycleListing: {