Remove collection of unhandled exception error messages from telemetry#585
Remove collection of unhandled exception error messages from telemetry#585singe wants to merge 4 commits into
Conversation
Prevent post hog from collecting error message strings, only exception type.
Remove optional error message parameter from error function.
Remove exception message logging from unhandled exceptions.
Greptile SummaryThis PR removes the exception message (
Confidence Score: 4/5Safe to merge; the change is a small, targeted removal of exception message data from telemetry with no functional side-effects. The telemetry and call-site changes are consistent and complete — grep confirms no other callers pass the now-removed second argument. The only rough edge is that strix/interface/main.py now binds an unused except Exception as e: variable, which is a linter concern but not a runtime problem. strix/interface/main.py — the unused e binding in the except clause is worth cleaning up before merging. Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
strix/interface/main.py:823-827
Since `e` is no longer referenced after this change, the except clause now binds an unused variable. Most linters (ruff `E741`/`F841`, flake8) will flag this. The bare `raise` re-raises the active exception without needing `e`.
```suggestion
except Exception:
exit_reason = "error"
posthog.error("unhandled_exception")
scarf.error("unhandled_exception")
raise
```
Reviews (1): Last reviewed commit: "Simplify unhandled exception logging" | Re-trigger Greptile |
As it's not longer referenced.
This PR addresses issue #584
The telemetry collection policy states that error messages are not collected, this PR modifies the code to align it with the telemetry policy.