SIENTIAPDE-1110

Enhance logging in Ingestor class for subscription management

- Added debug logging for subscribing to new slots, resubscribing to modified slots, and unsubscribing from removed slots in the Ingestor class.
This commit is contained in:
vitor-aignosi
2025-07-08 11:35:18 -03:00
parent 725528de45
commit 7f88d89849

View File

@@ -260,15 +260,18 @@ class Ingestor:
for slot, config in new_managed_tags.items():
if slot not in old_managed_tags:
self.logger.debug("Subscribing to new slot %s", slot)
self.ingestor_manager.subscribe_to_tags({slot: config})
continue
if config != old_managed_tags[slot]:
self.logger.debug("Resubscribing to slot %s", slot)
self.ingestor_manager.unsubscribe_slot(slot)
self.ingestor_manager.subscribe_to_tags({slot: config})
for slot in old_managed_tags.keys():
if slot not in new_managed_tags:
self.logger.debug("Unsubscribing from slot %s", slot)
self.ingestor_manager.unsubscribe_slot(slot)
# Ensure the gauge is updated after any potential changes here