add safety mesasure for monitoring in case a service didn't find any results.
This commit is contained in:
parent
d6de45d783
commit
b985679d6b
@ -46,6 +46,9 @@ class PrometheusMonitor:
|
|||||||
|
|
||||||
runtime = time() - start
|
runtime = time() - start
|
||||||
|
|
||||||
|
if not result:
|
||||||
|
return result
|
||||||
|
|
||||||
processing_time_per_entity = runtime / len(result)
|
processing_time_per_entity = runtime / len(result)
|
||||||
|
|
||||||
self.entity_processing_time_sum.observe(processing_time_per_entity)
|
self.entity_processing_time_sum.observe(processing_time_per_entity)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user