Skip to content

Emit workload startup message as structured JSON log - #4567

Merged
danbarr merged 3 commits into
mainfrom
fix-structured-startup-log
Apr 7, 2026
Merged

danbarr merged 3 commits into
mainfrom
fix-structured-startup-log

Conversation

@danbarr

@danbarr danbarr commented Apr 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

The proxy's foreground-mode startup message ("Workload started successfully. Press Ctrl+C to stop.") was emitted via fmt.Println, making it the only non-JSON log line in proxy output. This breaks log collection pipelines (OTel Collector, Fluentd, Filebeat, Promtail) that expect all output to be JSON-parseable, causing parse errors on every pod start/restart.

Replace with slog.Info so the message is emitted as structured JSON consistent with all other proxy log output.

Fixes #4295

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Test plan

  • Verified build succeeds (task build)
  • Confirmed no other fmt.Println log lines remain in runner.go
  • Change is a single-line swap from fmt.Println → slog.Info; no behavioral change beyond output format

Generated with Claude Code

The plain-text fmt.Println was the only non-JSON log line emitted by
the proxy, breaking log collection pipelines that expect all output
to be JSON-parseable. Replace with slog.Info for consistency.

Fixes #4295

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label Apr 5, 2026
@codecov

codecov Bot commented Apr 5, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 68.90%. Comparing base (f8b6051) to head (91e8730).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/runner/runner.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4567      +/-   ##
==========================================
+ Coverage   68.89%   68.90%   +0.01%     
==========================================
  Files         505      505              
  Lines       52425    52425              
==========================================
+ Hits        36118    36125       +7     
+ Misses      13514    13509       -5     
+ Partials     2793     2791       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions github-actions Bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Apr 6, 2026
@github-actions github-actions Bot added size/XS Extra small PR: < 100 lines changed and removed size/XS Extra small PR: < 100 lines changed labels Apr 7, 2026
@danbarr
danbarr merged commit deeb438 into main Apr 7, 2026
41 checks passed
@danbarr
danbarr deleted the fix-structured-startup-log branch April 7, 2026 14:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Emit workload startup message as structured JSON instead of plain text

3 participants