Reset telemetry client between tests

This commit is contained in:
James Murdza
2025-08-11 09:38:26 -04:00
parent 4fa4595838
commit 34d160eabd
3 changed files with 8 additions and 1 deletions

View File

@@ -13,6 +13,7 @@ from core.telemetry.telemetry import (
record_event,
is_telemetry_enabled,
is_telemetry_globally_disabled,
destroy_telemetry_client,
)
@@ -26,4 +27,5 @@ __all__ = [
"record_event",
"is_telemetry_enabled",
"is_telemetry_globally_disabled",
"destroy_telemetry_client",
]

View File

@@ -190,6 +190,10 @@ def get_telemetry_client(
return _universal_client
def destroy_telemetry_client() -> None:
"""Destroy the global telemetry client."""
global _universal_client
_universal_client = None
def increment(counter_name: str, value: int = 1) -> None:
"""Increment a named counter using the global telemetry client.