Skip to content

Commit 5e29089

Browse files
committed
chore: Change all telemetry logging to DEBUG level
Reduces log noise by changing all telemetry-related log statements (info, warning, error) to debug level. Telemetry operations are background tasks and should not clutter logs with operational messages. Changes: - Circuit breaker state changes: info/warning -> debug - Telemetry send failures: error -> debug - All telemetry operations now consistently use debug level
1 parent 3bfbac1 commit 5e29089

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/databricks/sql/telemetry/circuit_breaker_manager.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,16 @@ def state_change(self, cb: CircuitBreaker, old_state, new_state) -> None:
6060
old_state_name = old_state.name if old_state else "None"
6161
new_state_name = new_state.name if new_state else "None"
6262

63-
logger.info(
63+
logger.debug(
6464
LOG_CIRCUIT_BREAKER_STATE_CHANGED, old_state_name, new_state_name, cb.name
6565
)
6666

6767
if new_state_name == CIRCUIT_BREAKER_STATE_OPEN:
68-
logger.warning(LOG_CIRCUIT_BREAKER_OPENED, cb.name)
68+
logger.debug(LOG_CIRCUIT_BREAKER_OPENED, cb.name)
6969
elif new_state_name == CIRCUIT_BREAKER_STATE_CLOSED:
70-
logger.info(LOG_CIRCUIT_BREAKER_CLOSED, cb.name)
70+
logger.debug(LOG_CIRCUIT_BREAKER_CLOSED, cb.name)
7171
elif new_state_name == CIRCUIT_BREAKER_STATE_HALF_OPEN:
72-
logger.info(LOG_CIRCUIT_BREAKER_HALF_OPEN, cb.name)
72+
logger.debug(LOG_CIRCUIT_BREAKER_HALF_OPEN, cb.name)
7373

7474

7575
class CircuitBreakerManager:

src/databricks/sql/telemetry/telemetry_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def _send_with_unified_client(self, url, data, headers, timeout=900):
307307
)
308308
return response
309309
except Exception as e:
310-
logger.error("Failed to send telemetry with unified client: %s", e)
310+
logger.debug("Failed to send telemetry with unified client: %s", e)
311311
raise
312312

313313
def _telemetry_request_callback(self, future, sent_count: int):

0 commit comments

Comments
 (0)