alertmanager
alertmanager copied to clipboard
add SNS receiver validation
- Add validation for subject, if not a validate input, we will replace it with error message
- Add validation for message attribute, if not a validate attribute, we will remove the attribute
- Add validation for message, if not a validate message, we will replace the message with error message
- Add truncation logic that will include message attributes as SNS receiver count 256KB size limit with message body+attribute
:wave: could you split the change into several pull requests. There are things that make sense to me but others that would need prior discussion and agreement.
Add validation for subject, if not a validate input, we will replace it with error message
I'd be fine to truncate the subject when we detect that it's larger than the max size. I'm less convinced that replacing an invalid subject with an error message is a good approach.
Add validation for message attribute, if not a validate attribute, we will remove the attribute
that might be acceptable.
Add validation for message, if not a validate message, we will replace the message with error message
Same remark as for the subject.
Add truncation logic that will include message attributes as SNS receiver count 256KB size limit with message body+attribute
There could be a discussion about which fields should have priority.
I think we can close this PR.
It's been superseded by: https://github.com/prometheus/alertmanager/pull/2829, https://github.com/prometheus/alertmanager/pull/2834, https://github.com/prometheus/alertmanager/pull/2835 and https://github.com/prometheus/alertmanager/pull/2894