-
-
Notifications
You must be signed in to change notification settings - Fork 40
fix(sentry): change log level for bot disconnection to info #919
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideThis PR updates the Sentry disconnection handler in tux/bot.py to lower its alert severity and provide more contextual messaging: instead of logging every disconnect as a warning, it now records them as informational events with an expanded description to reduce noise while still tracking occurrences. File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @anemoijereja-eden - I've reviewed your changes and they look great!
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## main #919 +/- ##
========================================
+ Coverage 8.92% 9.02% +0.09%
========================================
Files 121 121
Lines 10269 10269
Branches 1255 1255
========================================
+ Hits 917 927 +10
+ Misses 9278 9242 -36
- Partials 74 100 +26
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
Deploying tux with
|
Latest commit: |
7145055
|
Status: | ✅ Deploy successful! |
Preview URL: | https://fa64d7f8.tux-afh.pages.dev |
Branch Preview URL: | https://917-change-error-to-info.tux-afh.pages.dev |
TODO: reword the message, as requested by the issue. |
@sourcery-ai review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @anemoijereja-eden - I've reviewed your changes and they look great!
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location> `tux/bot.py:210` </location>
<code_context>
- sentry_sdk.capture_message("Bot disconnected from Discord")
+ scope.set_level("info")
+ sentry_sdk.capture_message(
+ "Bot disconnected from Discord, this happens sometimes and is fine as long as it's not hapening too often",
+ )
</code_context>
<issue_to_address>
Typo in the word 'hapening' should be 'happening'.
Fixing the typo ensures the log message is clear and professional.
</issue_to_address>
<suggested_fix>
<<<<<<< SEARCH
sentry_sdk.capture_message(
"Bot disconnected from Discord, this happens sometimes and is fine as long as it's not hapening too often",
)
=======
sentry_sdk.capture_message(
"Bot disconnected from Discord, this happens sometimes and is fine as long as it's not happening too often",
)
>>>>>>> REPLACE
</suggested_fix>
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Description
Corrects #917 by changing the log level of the bot disconnection warning.
Guidelines
My code follows the style guidelines of this project (formatted with Ruff)
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation if needed
My changes generate no new warnings
I have tested this change
Any dependent changes have been merged and published in downstream modules
I have added all appropriate labels to this PR
I have followed all of these guidelines.
How Has This Been Tested? (if applicable)
Please describe how you tested your code. e.g describe what commands you ran, what arguments, and any config stuff (if applicable)
Screenshots (if applicable)
Please add screenshots to help explain your changes.
Additional Information
Please add any other information that is important to this PR.
Summary by Sourcery
Set Sentry disconnect events to info level and clarify the disconnect message
Bug Fixes: