* chore!: adopt log/slog, drop go-kit/log
The bulk of this change set was automated by the following script which
is being used to aid in converting the various exporters/projects to use
slog:
https://gist.github.com/tjhop/49f96fb7ebbe55b12deee0b0312d8434
This commit includes several changes:
- bump exporter-tookit to v0.13.1 for log/slog support
- updates golangci-lint deprecated configs
- enables sloglint linter
- removes old go-kit/log linter configs
- introduce some `if logger == nil { $newLogger }` additions to prevent
nil references
- converts cluster membership config to use a stdlib compatible slog
adapter, rather than creating a custom io.Writer for use as the
membership `logOutput` config
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
* chore: address PR feedback
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
---------
Signed-off-by: TJ Hoplock <t.hoplock@gmail.com>
* Feat(discord):
Allow for custom username and avatar URLs to be set in discord notifications.
Add `username` and `avatar_url` to discord configuration, default empty string.
Re-implement #3821
Signed-off-by: Jeff Wong <awole20@gmail.com>
* Test the new fields
Signed-off-by: gotjosh <josue.abreu@gmail.com>
* These are not templeatable strings
Signed-off-by: gotjosh <josue.abreu@gmail.com>
---------
Signed-off-by: Jeff Wong <awole20@gmail.com>
Signed-off-by: gotjosh <josue.abreu@gmail.com>
Co-authored-by: gotjosh <josue.abreu@gmail.com>
Just to ensure this works correclty as expected, I originally thought there was a bug with the shadowing of the `content` varible but there isn't - to avoid further confusion I have followed up on this document left by George: https://github.com/prometheus/alertmanager/pull/3555#discussion_r1398448423
Signed-off-by: gotjosh <josue.abreu@gmail.com>
* feat: implement webhook_url_file for discord
implements #3482
Signed-off-by: Philipp Born <git@pborn.eu>
* feat: implement webhook_url_file for msteams
implements #3536
Signed-off-by: Philipp Born <git@pborn.eu>
---------
Signed-off-by: Philipp Born <git@pborn.eu>
* Reflect Discord's max length message limits
Signed-off-by: Tomas Kozak <kozak@talko.cz>
* Fix log key name
Signed-off-by: Tomas Kozak <kozak@talko.cz>
---------
Signed-off-by: Tomas Kozak <kozak@talko.cz>