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

notify/email: wrap all errors for easier debugging #1953

Merged
merged 2 commits into from
Jul 10, 2019

Conversation

simonpasquier
Copy link
Member

In addition, this commit passes the current context to the TCP dialer and it doesn't log any QUIT errors if the email delivery wasn't successful.

Related #1944
Related #980

In addition, this commit passes the current context to the TCP dialer
and it doesn't log any QUIT errors if the email delivery wasn't
successful.

Signed-off-by: Simon Pasquier <[email protected]>
@@ -112,77 +112,87 @@ func (n *Email) auth(mechs string) (smtp.Auth, error) {

// Notify implements the Notifier interface.
func (n *Email) Notify(ctx context.Context, as ...*types.Alert) (bool, error) {
// TODO: move the check to the config pacakge.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// TODO: move the check to the config pacakge.
// TODO: move the check to the config package.

Is this supposed to happen in this pull request or a follow up?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I planned for a follow up PR.

Signed-off-by: Simon Pasquier <[email protected]>
@simonpasquier simonpasquier merged commit 9b0ecaa into prometheus:master Jul 10, 2019
@simonpasquier simonpasquier deleted the fix-email-errors branch July 10, 2019 09:24
DuskEagle pushed a commit to DuskEagle/alertmanager that referenced this pull request Aug 1, 2019
* notify/email: wrap all errors for easier debugging

In addition, this commit passes the current context to the TCP dialer
and it doesn't log any QUIT errors if the email delivery wasn't
successful.

Signed-off-by: Simon Pasquier <[email protected]>

* Fix typo

Signed-off-by: Simon Pasquier <[email protected]>
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