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

Update internal logging to expose the slog logger to components #2076

Closed
wildum opened this issue Nov 13, 2024 · 1 comment
Closed

Update internal logging to expose the slog logger to components #2076

wildum opened this issue Nov 13, 2024 · 1 comment
Assignees

Comments

@wildum
Copy link
Contributor

wildum commented Nov 13, 2024

Context:

  • Update mysqld_exporter to v0.16.0 #1643
  • exporter-toolkit has changed the signature of web.ListenAndServe to use slog, meaning that a bunch of exporters in Alloy are suddenly impacted and will need to be updated

We use slog but we are passing a go-kit logger interface to the components for compatibility. Ideally we would like to be able to pass the slog logger to the components that can support it.

The solution might be to pass our internal logger down to the components because it supports both go-kit and slog but it would require to implement the log.With equivalent.

The blast radius is important with this change.

@wildum wildum self-assigned this Nov 13, 2024
@wildum
Copy link
Contributor Author

wildum commented Nov 27, 2024

This cannot be done easily because of the context that's passed everywhere through the code base. Closing it and approving the use of an adapter for now

@wildum wildum closed this as completed Nov 27, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant