Skip to content
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

[IMPROVEMENT] Tracking for failed alerts #200

Merged
merged 1 commit into from
Dec 2, 2019

Conversation

kfdm
Copy link
Collaborator

@kfdm kfdm commented Nov 28, 2019

Even though Promgen is instrumented with Sentry, users need a way to know if their alerts are being sent properly. While a more robust retry mechanism will be attempted in the future this should give more visibility into the current state

  • Add error_count and sent_count to Alert model for tracking
  • Add AlertError log for tracking failed messages
  • Refactor tasks.send_alert to better log errors and increment counters

Future work to make sender.test more aware to avoid special casing the alert_pk check in tasks.send_alert

@codecov-io
Copy link

codecov-io commented Nov 28, 2019

Codecov Report

Merging #200 into master will decrease coverage by 0.56%.
The diff coverage is 48.78%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #200      +/-   ##
==========================================
- Coverage    47.8%   47.24%   -0.57%     
==========================================
  Files          45       46       +1     
  Lines        2510     2542      +32     
==========================================
+ Hits         1200     1201       +1     
- Misses       1310     1341      +31
Impacted Files Coverage Δ
promgen/models.py 28.84% <0%> (-0.48%) ⬇️
promgen/views.py 48.93% <0%> (-0.21%) ⬇️
promgen/migrations/0011_notifier_counts.py 100% <100%> (ø)
promgen/util.py 36.36% <33.33%> (-0.31%) ⬇️
promgen/notification/__init__.py 24.13% <50%> (-55.03%) ⬇️
promgen/tasks.py 43.37% <68.75%> (+3.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 167b4a9...efe8dd8. Read the comment docs.

Even though Promgen is instrumented with Sentry, users need a way to
know if their alerts are being sent properly. While a more robust retry
mechanism will be attempted in the future this should give more
visibility into the current state

- Add `error_count` and `sent_count` to Alert model for tracking
- Add `AlertError` log for tracking failed messages
- Refactor `tasks.send_alert` to better log errors and increment counters

Future work to make sender.test more aware to avoid special casing the
alert_pk check in `tasks.send_alert`
@kfdm kfdm requested review from m-tkg and matsumana November 29, 2019 06:40
@kfdm kfdm marked this pull request as ready for review November 29, 2019 06:40
@m-tkg m-tkg requested a review from shokada December 2, 2019 01:47
@kfdm kfdm merged commit bebdc16 into line:master Dec 2, 2019
@kfdm kfdm deleted the alert-error-tracking branch December 2, 2019 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants