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

Add slack channel when logging error. #2177

Merged
merged 1 commit into from
Feb 5, 2020

Conversation

melchiormoulin
Copy link
Contributor

Add the slack channel when logging error from slack.
#2176

@simonpasquier
Copy link
Member

You need to sign your commit.

git amend -s
git push origin

return n.retrier.Check(resp.StatusCode, resp.Body)
retry, err := n.retrier.Check(resp.StatusCode, resp.Body)
if err != nil {
err = fmt.Errorf("%v on slack channel: %s", err, req.Channel)
Copy link
Member

Choose a reason for hiding this comment

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

You can use github.com/pkg/errors to wrap the error which is a bit shorter:

       retry, err := n.retrier.Check(resp.StatusCode, resp.Body)
       err = errors.Wrap(err, fmt.Sprintf("channel %q", req.Channel))
       return retry, err

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the tip

Signed-off-by: Melchior MOULIN <m.moulin@criteo.com>
@melchiormoulin
Copy link
Contributor Author

Is the test failed because of my commit ?
--- FAIL: TestReload (5.15s) acceptance.go:186: starting alertmanager cluster: starting alertmanager failed: timeout acceptance.go:177: Error sending SIGTERM to Alertmanager process: no such process

@simonpasquier
Copy link
Member

This is a flake, I've retriggered the test.

@simonpasquier simonpasquier merged commit e37f769 into prometheus:master Feb 5, 2020
@simonpasquier
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants