Open
Description
=================================== FAILURES ===================================
________________________ TestMetrics.test_basic_metric _________________________
self = <tests.test_metrics.TestMetrics testMethod=test_basic_metric>
def test_basic_metric(self):
CeleryInstrumentor().instrument()
start_time = default_timer()
task_runtime_estimated = (default_timer() - start_time) * 1000
metrics = self.get_metrics()
CeleryInstrumentor().uninstrument()
> self.assertEqual(len(metrics), 1)
E AssertionError: 0 != 1
instrumentation/opentelemetry-instrumentation-celery/tests/test_metrics.py:46: AssertionError
Activity
jomcgi commentedon May 25, 2025
This should be resolved when we drop support for Python 3.8
I've rebased #3399 so should be able to get final reviews / merge soon.
rbagd commentedon May 26, 2025
Not sure if this specifically Python 3.8 related, albeit definitely more common. I've hit similar issues in other versions as well.
I've reworked Celery metrics instrumentation recently in this PR, and with that the tests seem more robust to flakiness, albeit one does have to wait for tasks to finish properly.