Support a custom annotation key as text description for an alert
Opened this issue · 3 comments
Is your feature request related to a problem? Please describe.
Prometheus webhook adds Alert description based on a fixed sequence of possible annotations
text = description or summary or f'{severity.upper()}: {resource} is {event}'
Describe the solution you'd like
Should be nice to have an environmental variable to override that sequence with a specific annotation like PROMETHEUS_TEXT_KEY
.
What is an example of a "text key" that you would want to use instead of "description" or "summary"? And why?
I had a situation where I would like to use summary, but it was using description, the or condition creates a precedence.
I can see other situations where I prefer to use a label from my metric and/or my alert rule.
Making that short, the variable could add more flexibility and you are already using env variables to override hardcoded configuration.