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

Capture receiver integration errors #3016

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

gotjosh
Copy link
Member

@gotjosh gotjosh commented Jul 22, 2022

As an alerts traverses through the routing tree, there's a chance we fail to delivery the notification as we attempt to send it.

This creates a problem where a user that has a failure in their template or their receiver integration (e.g. webhook) is unavailable has no visibility on this problem.

This change, enhances the receiver API to include the last error, duration and time an alert went through the receiver.

This is heavily inspired by the targets Prometheus API which takes a similar approach.

As an alerts traverses through the routing tree, there's a chance we fail to delivery the notification as we attempt to send it.

This creates a problem where a user that has a failure in their template or their receiver integration (e.g. webhook) is unavailable has no visibility on this problem.

This change, enhances the receiver API to include the last error, duration and time an alert went through the receiver.

Signed-off-by: gotjosh <josue.abreu@gmail.com>
@gotjosh gotjosh force-pushed the better-receivers-api branch from 8c2fc45 to 3b9c467 Compare July 22, 2022 18:52
gotjosh added 2 commits July 25, 2022 10:33
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Signed-off-by: gotjosh <josue.abreu@gmail.com>
@gotjosh gotjosh force-pushed the better-receivers-api branch from cf11843 to b392f85 Compare July 25, 2022 09:44
integrations = append(integrations, &open_api_models.Integration{
Name: &iname,
SendResolve: &sr,
LastNotify: notify.UTC().String(),
Copy link
Contributor

Choose a reason for hiding this comment

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

As it's still a draft ignore it if you already planned to do so: can we make sure that the date is in ISO 8601 format?

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.

2 participants