Skip to content

Commit c503ab0

Browse files
vuanhphungIsaac
andcommitted
docs: note that log_latency reads telemetry_enabled once, before the call
Signed-off-by: Vu Anh Phung <vu.phung@databricks.com> Co-authored-by: Isaac <no-reply@databricks.com>
1 parent 8fedb5f commit c503ab0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/databricks/sql/telemetry/latency_logger.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,8 @@ def execute(self, query):
179179
def decorator(func):
180180
@functools.wraps(func)
181181
def wrapper(self, *args, **kwargs):
182-
# Use the connection's cached telemetry_enabled flag. When it is off
182+
# Use the connection's cached telemetry_enabled flag (set in
183+
# Connection.__init__), read once before the call. When it is off
183184
# and DEBUG logging is disabled (always the case on kernel
184185
# connections, which export telemetry from the kernel), skip timing.
185186
connection = getattr(self, "connection", None)

0 commit comments

Comments
 (0)