SIENTIAPDE-1325
Enhance Ingestor Class with Asynchronous Metrics and Monitoring Integration - Refactored Ingestor class to inherit from SientiaMonitoring for improved observability. - Updated methods to utilize asynchronous operations for declaring active ingestors and managing slots. - Integrated pod_id label into various metrics for better tracking. - Adjusted unit tests to reflect changes in the Ingestor initialization and asynchronous behavior.
This commit is contained in:
@@ -54,7 +54,7 @@ def test_active_ingestors():
|
||||
assert metrics.ACTIVE_INGESTORS is not None
|
||||
assert isinstance(metrics.ACTIVE_INGESTORS, Gauge)
|
||||
assert metrics.ACTIVE_INGESTORS._name == 'ingestor_active_total'
|
||||
assert set(metrics.ACTIVE_INGESTORS._labelnames) == set()
|
||||
assert set(metrics.ACTIVE_INGESTORS._labelnames) == {'pod_id'}
|
||||
|
||||
|
||||
def test_slots_total():
|
||||
@@ -62,7 +62,7 @@ def test_slots_total():
|
||||
assert metrics.SLOTS_TOTAL is not None
|
||||
assert isinstance(metrics.SLOTS_TOTAL, Gauge)
|
||||
assert metrics.SLOTS_TOTAL._name == 'ingestor_slots_total'
|
||||
assert set(metrics.SLOTS_TOTAL._labelnames) == set()
|
||||
assert set(metrics.SLOTS_TOTAL._labelnames) == {'pod_id'}
|
||||
|
||||
|
||||
def test_leases_total():
|
||||
@@ -70,7 +70,7 @@ def test_leases_total():
|
||||
assert metrics.LEASES_TOTAL is not None
|
||||
assert isinstance(metrics.LEASES_TOTAL, Gauge)
|
||||
assert metrics.LEASES_TOTAL._name == 'ingestor_leases_total'
|
||||
assert set(metrics.LEASES_TOTAL._labelnames) == set()
|
||||
assert set(metrics.LEASES_TOTAL._labelnames) == {'pod_id'}
|
||||
|
||||
|
||||
def test_slots_managed():
|
||||
|
||||
Reference in New Issue
Block a user