From 25051f1bf0358ee65f59b8afc04c9a91c1295239 Mon Sep 17 00:00:00 2001 From: Emilio Garcia Date: Thu, 30 Oct 2025 12:59:24 -0400 Subject: [PATCH] fix(telemetry): token counters changed to histograms to reflect count per request --- tests/integration/telemetry/conftest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/integration/telemetry/conftest.py b/tests/integration/telemetry/conftest.py index fd9224ae4..d6ed31412 100644 --- a/tests/integration/telemetry/conftest.py +++ b/tests/integration/telemetry/conftest.py @@ -7,6 +7,7 @@ """Telemetry test configuration supporting both library and server test modes.""" import os +import time import pytest @@ -59,6 +60,8 @@ def llama_stack_client(telemetry_test_collector, request): @pytest.fixture def mock_otlp_collector(telemetry_test_collector): """Provides access to telemetry data and clears between tests.""" + # prevent race conditions between tests caused by 200ms metric collection interval + time.sleep(0.3) telemetry_test_collector.clear() try: yield telemetry_test_collector