* 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>
* support loading webhook URL from a file
/cc #2498
Signed-off-by: Simon Rozet <me@simonrozet.com>
* notify/webhook: add test for reading url from file
Signed-off-by: Simon Rozet <me@simonrozet.com>
* notify/pushover: add tests for reading secrets from files
Signed-off-by: Simon Rozet <me@simonrozet.com>
---------
Signed-off-by: Simon Rozet <me@simonrozet.com>
* support loading pushover secrets from files
Add the user_key_file and token_file keys to the pushover config.
/cc https://github.com/prometheus/alertmanager/issues/2498
Signed-off-by: Simon Rozet <me@simonrozet.com>
While most integrations set a limit by UTF-8 compatible characters (some like Webex) use runes - as pointed out in https://github.com/prometheus/alertmanager/pull/3132. This PR makes it explicit wether the truncation is happening at a byte or rune level.
Signed-off-by: gotjosh <josue.abreu@gmail.com>
* Pass in response body to Retrier Check
* Custom error details for webhook notifier
Signed-off-by: Oktarian Tilney-Bassett <oktariantilneybassett@improbable.io>
We are re-enabling HTTP 2 again. There has been a few bugfixes upstream
in go, and we have also enabled ReadIdleTimeout.
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Instead of keeping all notifiers in the notify package, it splits them
into individual sub-packages. This improves readability and
maintainability of the code.
Signed-off-by: Simon Pasquier <spasquie@redhat.com>