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

Alerting: Add CustomDetails field in PagerDuty contact point #64860

Merged
merged 7 commits into from
Mar 29, 2023

Conversation

santihernandezc
Copy link
Contributor

@santihernandezc santihernandezc commented Mar 15, 2023

This PR adds support for CustomDetails in Grafana's PagerDuty notification channel. This field is an object containing arbitrary key-value pairs, currently available in external Alertmanagers but not when using Grafana's internal one.

The details provided by the user get merged with the default ones we use to provide information about the notification. In case of duplicate keys, the user-defined details prevail.

This field is optional, and it uses the same UI elements we use in external Alertmanagers.

Screen Shot 2023-03-15 at 19 09 56

These values are rendered on PagerDuty as part of the notification details.

Screen Shot 2023-03-15 at 19 11 31

Related issue: #63604

Note: For this feature, we need functionality introduced in the latest commit (as of now) of the grafana/alerting package, hence the update in go.mod and go.sum

@santihernandezc santihernandezc added area/alerting Grafana Alerting add to changelog no-backport Skip backport of PR labels Mar 15, 2023
@santihernandezc santihernandezc added this to the 9.5.0 milestone Mar 15, 2023
@santihernandezc santihernandezc requested review from yuri-tceretian and a team March 15, 2023 22:16
@santihernandezc santihernandezc requested a review from a team as a code owner March 15, 2023 22:16
@santihernandezc santihernandezc requested review from sakjur, papagian and suntala and removed request for a team March 15, 2023 22:16
Copy link
Contributor

@yuri-tceretian yuri-tceretian left a comment

Choose a reason for hiding this comment

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

LGTM. I tested and everything works as expected. Please address my comment in receivers.go.

@yuri-tceretian yuri-tceretian added the area/alerting/notifications Issues when sending alert notifications label Mar 15, 2023
@grafanabot grafanabot added the type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project label Mar 17, 2023
@santihernandezc santihernandezc merged commit 7b92849 into main Mar 29, 2023
@santihernandezc santihernandezc deleted the santihernandezc/add_custom_details_to_pagerduty branch March 29, 2023 13:35
Copy link
Contributor

@yuri-tceretian yuri-tceretian left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add to changelog area/alerting/notifications Issues when sending alert notifications area/alerting Grafana Alerting area/backend no-backport Skip backport of PR type/docs Flags the technical writing team for documentation support; auto adds to org-wide docs project
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants