mirror of
https://github.com/trycua/computer.git
synced 2026-01-09 15:00:35 -06:00
Reset telemetry client between tests
This commit is contained in:
@@ -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",
|
||||
]
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user