feat: Update libraries and add _total
suffix to metrics
#35
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.
This pull request introduces several updates to modernize the codebase, including upgrading dependencies, switching to a newer logging library, and following Prometheus metric naming conventions. The changes enhance compatibility, improve readability, and align with current best practices.
Dependency Updates:
Dockerfile
to1.24.4
and ingo.mod
to1.24
. This ensures compatibility with the latest language features and optimizations.go.mod
to newer versions, improving stability and adding support for modern features.Logging Library Migration:
go-kit/log
withslog
for logging incollect.go
andmain.go
. This simplifies log handling and improves the structure of log messages.Metric Naming Improvements:
collect.go
to include_total
suffixes, adhering to Prometheus naming conventions for counters. https://github.com/prometheus/client_golang/blob/0400fc44d42dd0bca7fb16e87ea0313bb2eb8c53/prometheus/testutil/promlint/promlint_test.go#L444Code Refactoring:
promlog
withpromslog
inmain.go
to align with updated Prometheus libraries. Adjusted related flag and logger initialization accordingly.These changes collectively enhance the maintainability, readability, and compliance of the codebase with modern standards. It will introduce breaking changes, as all the metrics will be renamed. The current names, raise errors in modern prometheus installations: