Skip to content

Commit 5f42849

Browse files
authored
Don't log errors from telemetry (#2084)
Failure to send telemetry should not be reported as an error. This changes those log messages to `info` level. (Only `warning` or higher logs by default if not explicitly configured). Fixes #2081
1 parent ee533bb commit 5f42849

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pip/qsharp/telemetry.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def _post_telemetry() -> bool:
239239
return True
240240

241241
except Exception:
242-
logger.exception(
242+
logger.debug(
243243
"Failed to post telemetry. Pending metrics will be retried at the next interval."
244244
)
245245
return False
@@ -271,7 +271,7 @@ def on_metric(msg: Metric):
271271
if msg == "exit":
272272
logger.debug("Exiting telemetry thread")
273273
if not _post_telemetry():
274-
logger.error("Failed to post telemetry on exit")
274+
logger.debug("Failed to post telemetry on exit")
275275
return
276276
else:
277277
on_metric(msg)

0 commit comments

Comments
 (0)