File tree Expand file tree Collapse file tree 2 files changed +406
-8
lines changed
src/databricks/sql/telemetry Expand file tree Collapse file tree 2 files changed +406
-8
lines changed Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ class TelemetryClient(BaseTelemetryClient):
158
158
# Telemetry endpoint paths
159
159
TELEMETRY_AUTHENTICATED_PATH = "/telemetry-ext"
160
160
TELEMETRY_UNAUTHENTICATED_PATH = "/telemetry-unauth"
161
+ DEFAULT_BATCH_SIZE = 10
161
162
162
163
def __init__ (
163
164
self ,
@@ -169,7 +170,7 @@ def __init__(
169
170
):
170
171
logger .debug ("Initializing TelemetryClient for connection: %s" , session_id_hex )
171
172
self ._telemetry_enabled = telemetry_enabled
172
- self ._batch_size = 10 # TODO: Decide on batch size
173
+ self ._batch_size = self . DEFAULT_BATCH_SIZE # TODO: Decide on batch size
173
174
self ._session_id_hex = session_id_hex
174
175
self ._auth_provider = auth_provider
175
176
self ._user_agent = None
@@ -466,6 +467,9 @@ def close(session_id_hex):
466
467
logger .debug (
467
468
"No more telemetry clients, shutting down thread pool executor"
468
469
)
469
- TelemetryClientFactory ._executor .shutdown (wait = True )
470
+ try :
471
+ TelemetryClientFactory ._executor .shutdown (wait = True )
472
+ except Exception as e :
473
+ logger .debug ("Failed to shutdown thread pool executor: %s" , e )
470
474
TelemetryClientFactory ._executor = None
471
475
TelemetryClientFactory ._initialized = False
You can’t perform that action at this time.
0 commit comments