Skip to content

Wire k6provider structured logging into k6#5845

Open
mstoykov wants to merge 2 commits intografana:masterfrom
mstoykov:k6providerLogging
Open

Wire k6provider structured logging into k6#5845
mstoykov wants to merge 2 commits intografana:masterfrom
mstoykov:k6providerLogging

Conversation

@mstoykov
Copy link
Copy Markdown
Contributor

@mstoykov mstoykov commented Apr 15, 2026

What?

Adds a slog.Handler bridge (logrusSlogHandler) that forwards k6provider's
structured 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 formatDependencies helper from the provisioner.

Screenshots and log output examples: grafana/k6provider#116

Why?

k6provider gained structured slog logging 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

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Related PR(s)/Issue(s)

Note: k6provider is currently pinned to a pre-release pseudo-version
while grafana/k6provider#116 is in review. The dependency will be updated
to the tagged release before this PR is merged.

@mstoykov mstoykov requested a review from a team as a code owner April 15, 2026 10:11
@mstoykov mstoykov requested review from codebien and oleiade and removed request for a team April 15, 2026 10:11
@mstoykov mstoykov temporarily deployed to azure-trusted-signing April 15, 2026 10:17 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing April 15, 2026 10:19 — with GitHub Actions Inactive
@mstoykov mstoykov force-pushed the k6providerLogging branch from 9fb6f00 to f7a30b9 Compare April 16, 2026 08:32
@mstoykov mstoykov mentioned this pull request Apr 16, 2026
4 tasks
mstoykov and others added 2 commits April 16, 2026 11:56
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>
@mstoykov mstoykov force-pushed the k6providerLogging branch from f7a30b9 to 2f8b4ab Compare April 16, 2026 09:04
@mstoykov mstoykov added this to the v2.0.0 milestone Apr 16, 2026
@mstoykov mstoykov temporarily deployed to azure-trusted-signing April 16, 2026 09:10 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing April 16, 2026 09:12 — with GitHub Actions Inactive
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.

1 participant