prometheus / prometheus/alertmanager
Prometheus SNS receiver validation
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
Problem
Right now SNS message will only be truncated because of message body size limit. We have a messageAttribute with key "truncated" set to indicate if a message has been truncated or not here However it could be other part of the message could be truncated
- Message attribute size is limit to 256KB with message body. See reference here: All parts of the message attribute, including name, type, and value, are included in the message size restriction, which is 256 KB.
- Subject: Subjects must be ASCII text that begins with a letter, number, or punctuation mark; must not include line breaks or control characters; and must be less than 100 characters long
In order to send out the message by best effort(we prefer to truncate the message than not sending out the message), and also to give users a better understanding of what's has been truncated and the reason. I purpose to change/add more attributes to indicate different part of a SNS message truncate/remove status
Purposal
Keep the existing messageAttributes["truncated"]
In case of the concern of backward compatibility, we will still keep messageAttributes["truncated"] and this will remain indication of the message body truncation or not.
The other truncation status will be in another new messageAttribute with key "modified" and value will be the a list of [message section: modify reason].
For example if both message subject + message attribute has been modified. We will set messageAttributes["modified"]=["subject: Max message size limit exceed", "messageAttribute: Invalid non-alphanumeric character was found in the message attribute name. Can only include alphanumeric characters, hyphens, underscores, or dots."]
Remove the existing messageAttributes["truncated"]
We will remove the existing messageAttributes and add a new messageAttribute with key "modified" and value will be the a list of [message section: modify reason].
For example if both message subject + message body has been modified. We will set messageAttributes["modified"]=["subject: Max message size limit exceed", "message: Max message size limit exceed"]
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with notify/sns/sns.go at the existing truncated message attribute handling. Review the proposed SNS subject, message body, and message-attribute limits and decide which compatibility option is intended. Done means truncation or removal reasons are reported consistently while preserving the required existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, go
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100