with self._metrics_lock and self._internal_callbacks_results_lock:
This meant that this block was the same as:
with True:
Completely negating the purpose of the lock, and allowing threads to modify the list of metrics while it was being flushed. And even worse, it allowed the list of metrics to be deleted after other threads have added metrics to it.
This fixes the lock.
It also adds the option --no-print-metrics to dt-sdk run, a useful flag to have for extensions that report a large number of metrics.
There is also a fix for the docs build as documented here
Some time ago this line:
was replaced with this line:
This meant that this block was the same as:
Completely negating the purpose of the lock, and allowing threads to modify the list of metrics while it was being flushed. And even worse, it allowed the list of metrics to be deleted after other threads have added metrics to it.
This fixes the lock.
It also adds the option
--no-print-metrics
todt-sdk run
, a useful flag to have for extensions that report a large number of metrics.There is also a fix for the docs build as documented here