Wire k6provider structured logging into k6#5845
Open
mstoykov wants to merge 2 commits intografana:masterfrom
Open
Wire k6provider structured logging into k6#5845mstoykov wants to merge 2 commits intografana:masterfrom
mstoykov wants to merge 2 commits intografana:masterfrom
Conversation
9fb6f00 to
f7a30b9
Compare
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds a slog.Handler bridge (logrusSlogHandler) that forwards k6provider's structured log events through k6's existing logrus logger, so provider operations (artifact resolution, cache hits, downloads, retries, pruning) appear in k6's log output at the correct level. Removes the now-redundant manual provisioning Info log and its formatDependencies helper from k6buildProvisioner. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
f7a30b9 to
2f8b4ab
Compare
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.
What?
Adds a
slog.Handlerbridge (logrusSlogHandler) that forwards k6provider'sstructured log events through k6's existing logrus logger. Provider operations
— artifact resolution, cache hits, downloads, retries, and cache pruning —
now appear in k6's log output at the correct level with structured fields.
Removes the now-redundant manual
"A new k6 binary has been provisioned"Info log and its
formatDependencieshelper from the provisioner.Screenshots and log output examples: grafana/k6provider#116
Why?
k6provider gained structured
sloglogging support (grafana/k6provider#116).Without this change those log events are silently discarded. Wiring them
through k6's logger makes provisioning behaviour observable without adding
noise for users who don't need it (Debug-level events stay hidden by default).
Checklist
make check) and all pass.Related PR(s)/Issue(s)