-
Notifications
You must be signed in to change notification settings - Fork 34
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 CustomDetails field to PagerDuty #65
Add CustomDetails field to PagerDuty #65
Conversation
It seems there is also some handling of this field that prometheus does, and our notifier does not seem to do. Specifically, if the overall request is too big and will be rejected by PD, it makes sure to trim the custom details before anything else. If we are going to make this field editable, let's consider handling it the same way? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great job
This PR enables users to add custom details to their PagerDuty integrations.
This field is an object containing arbitrary key-value pairs (docs). The field name is
custom_details
, as shown in the example payload in PagerDuty's docs.These details get merged with the default ones we're already sending. In case of a duplicate key, the user-defined value for that key prevails.
Note: we should consider using a
map[string]interface{}
instead ofmap[string]string
as we're currently doing. In the example I linked above, it's clear that the values in this object may not be always strings.