Update to latest Prometheus dependencies#225
Merged
blkperl merged 3 commits intoLusitaniae:masterfrom Sep 19, 2024
Merged
Conversation
prometheus/common removed the version.NewCollector() function, which is now supplied by prometheus/client_golang (since v1.19.0). Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
The Prometheus ecosystem is moving away from go-kit/log, and instead adopting the Go standard library log/slog. prometheus/exporter-toolkit v0.13.0 introduced a non-backwards-compatible change, requiring exporters to supply a *slog.Logger to the web.ListenAndServe() function. The end-user changes are minimal. Logging is still in logfmt by default, albeit with some minor changes: - "ts" (timestamp) field is now "time", and expressed in local time with timezone offset (previously it was UTC) - "caller" field is replaced by "source", which is also now more verbose, with a fully qualified path - "level" field values are now capitalized, e.g. "INFO" Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
Some leftover cruft from pre-structured-logging which used a Sprintf, resulted in unpopulated verb in message: msg="caught sig: %+v. Wait 2 seconds..." Since the signal is explicitly included as a logfmt field, the message can be simplified. Demote the "Listening and waiting ..." message to debug, since exporter-toolkit already logs that is listening. Signed-off-by: Daniel Swarbrick <daniel.swarbrick@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update client_golang, common and exporter-toolkit dependencies. Migrate logging to Go standard library log/slog, as required by exporter-toolkit v0.13.0+.
Supersedes: #220
Supersedes: #221
Supersedes: #222