Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Migrates the runtime/controller logging flow from go-kit/log (+ logging/level) toward log/slog, as a first step in the broader effort to replace go-kit/log across the codebase.
Changes:
- Switched several runtime/controller log callsites from
level.<X>(log.Logger).Log(...)to(*slog.Logger).<X>(...)and updated logger plumbing accordingly. - Added
(*logging.Logger).Slog()and alogging.NewSlogNop()helper to supportslog.Loggerusage while preserving dynamic logging updates. - Updated controller scheduler tests to use
slog-backed logging.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| internal/runtime/module.go | Stores/uses a *slog.Logger for module controller logging. |
| internal/runtime/logging/logger.go | Adds Slog() adapter and NewSlogNop() to produce *slog.Logger. |
| internal/runtime/internal/controller/scheduler.go | Converts scheduler/task logging and logger types to *slog.Logger. |
| internal/runtime/internal/controller/scheduler_test.go | Updates tests to use slog-backed loggers and validates warning/error output. |
| internal/runtime/internal/controller/node_custom_component.go | Removes unused go-kit logger plumbing from custom component node. |
| internal/runtime/internal/controller/node_config_logging.go | Types logging config node logger as *logging.Logger and removes casting. |
| internal/runtime/internal/controller/node_config_import.go | Converts import node logging to *slog.Logger (while still using go-kit logger for managed component options). |
| internal/runtime/internal/controller/node_config_foreach.go | Converts foreach node logging and helper signatures to *slog.Logger. |
| internal/runtime/internal/controller/loader.go | Converts loader logging and related helper signatures to *slog.Logger. |
| internal/runtime/internal/controller/component_references.go | Updates component reference warnings to use *slog.Logger. |
| internal/runtime/alloy.go | Switches runtime controller logger to *slog.Logger and updates log callsites. |
kgeckhart
approved these changes
Apr 10, 2026
Contributor
kgeckhart
left a comment
There was a problem hiding this comment.
It's so nice to no longer have to do "msg", .............
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.
Pull Request Details
Start moving to use
slog.Loggerinstead ofgo-kit/log.This will only change usage in runtime and I will follow up with pr(s) to migrate component usage. Eventually we can get rid of some wrappers and clean-up it a bit.
Issue(s) fixed by this Pull Request
Part of: #4813
Notes to the Reviewer
PR Checklist