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

Rework receivers status gathering to not need upstream changes. #191

Merged
merged 2 commits into from
May 28, 2024

Conversation

stevesg
Copy link
Contributor

@stevesg stevesg commented May 27, 2024

The Grafana version of the Alertmanager /api/v1/receivers API is extended
to return information about the last notification attempt for each integration.
This has been implemented as a change to the Prometheus Alertmanager fork. We
would like to avoid divergence from upstream where possible.

This change reworks the status gathering for receivers such that we do not need
upstream changes. It instead works by wrapping the notify.Notifier interface
for each integration, and capturing the necessary details. To make this as
clean as possible, there are two drop-in replacements for Receiver and
Integration, which wrap the upstream types plus the additional functionality.
This means the code that uses these types can stay largely untouched.

@stevesg stevesg force-pushed the stevesg/implement-receivers-status-differently branch from 42f705d to 3694fcd Compare May 27, 2024 07:18
The Grafana version of the Alertmanager /api/v1/receivers API is extended
to return information about the last notification attempt for each integration.
This has been implemented as a change to the Prometheus Alertmanager fork. We
would like to avoid divergence from upstream where possible.

This change reworks the status gathering for receivers such that we do not need
upstream changes. It instead works by wrapping the notify.Notifier interface
for each integration, and capturing the necessary details. To make this as
clean as possible, there are two drop-in replacements for Receiver and
Integration, which wrap the upstream types plus the additional functionality.
This means the code that uses these types can stay largely untouched.
@stevesg stevesg force-pushed the stevesg/implement-receivers-status-differently branch from 3694fcd to 05fee94 Compare May 27, 2024 07:55
Copy link
Contributor

@santihernandezc santihernandezc left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@santihernandezc santihernandezc merged commit 79c3bdb into main May 28, 2024
3 checks passed
@santihernandezc santihernandezc deleted the stevesg/implement-receivers-status-differently branch May 28, 2024 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants