Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to slog #167

Merged
merged 1 commit into from
Sep 28, 2024
Merged

Switch to slog #167

merged 1 commit into from
Sep 28, 2024

Conversation

lucacome
Copy link
Contributor

This pull request includes several updates to dependencies, configuration files, and logging mechanisms, as well as some minor code refactoring. The most significant changes involve upgrading dependencies, switching from go-kit/log to slog for logging, and updating Go versions.

Dependency and Configuration Updates:

  • Updated Go version from 1.22 to 1.23 in .circleci/config.yml and .promu.yml.
  • Updated github.com/prometheus dependencies to use the new slog logging, which caused the bump to 1.22 in go.mod.

Logging Changes:

  • Replaced go-kit/log with slog for logging in collector.go, pgbouncer_exporter.go, and struct.go.

Linter and Error Handling:

  • Updated the linter configuration in .golangci.yml by adding new linters and updating error handling exclusions.
  • Removed old error handling exclusions from scripts/errcheck_excludes.txt.

Code Refactoring:

  • Refactored variable names in struct.go to fix lint errors.
  • Updated function signatures to use *slog.Logger instead of log.Logger in collector.go.

Signed-off-by: Luca Comellini <luca.com@gmail.com>
Copy link
Contributor

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SuperQ SuperQ merged commit 1e04a9c into prometheus-community:master Sep 28, 2024
4 checks passed
@lucacome lucacome deleted the slog branch September 28, 2024 14:33
SuperQ added a commit that referenced this pull request Oct 7, 2024
* [CHANGE] Switch logging to slog #167
* [ENHANCEMENT] Add auth_type to config collector #169

Signed-off-by: SuperQ <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants