Skip to content

Commit

Permalink
Don't log errors from telemetry (#2084)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
billti authored Dec 30, 2024
1 parent ee533bb commit 5f42849
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pip/qsharp/telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def _post_telemetry() -> bool:
return True

except Exception:
logger.exception(
logger.debug(
"Failed to post telemetry. Pending metrics will be retried at the next interval."
)
return False
Expand Down Expand Up @@ -271,7 +271,7 @@ def on_metric(msg: Metric):
if msg == "exit":
logger.debug("Exiting telemetry thread")
if not _post_telemetry():
logger.error("Failed to post telemetry on exit")
logger.debug("Failed to post telemetry on exit")
return
else:
on_metric(msg)
Expand Down

0 comments on commit 5f42849

Please sign in to comment.