You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Emit workload startup message as structured JSON instead of plain text #4295
Every toolhive proxy container currently emits the following plain-text line on startup:
Workload started successfully. Press Ctrl+C to stop.
This is the only non-JSON log line emitted by the proxy. All other output is structured JSON. This inconsistency breaks log collection pipelines that expect all output to be JSON-parseable.
Impact
Any user setting up log collection (OTel Collector filelog receiver, Fluentd, Filebeat, Promtail, etc.) with JSON parsing will encounter a parse error on every pod start and restart due to this line. Common symptoms:
OTel Collector stanza json_parser: emits "consume entries: expected { character for map value" and drops or fails the entry
Fluentd/Filebeat JSON parsers: silently discard or error on the line
OTTL ParseJSON(): emits "invalid character 'W' looking for beginning of value"
Users have to add special-case handling (e.g. on_error: drop, not IsMap(body) guards in OTTL) solely to work around this one line, which is not documented anywhere.
Suggested fix
Emit the startup message as a structured JSON log entry consistent with the rest of the proxy output:
This is a one-line change that eliminates an entire class of log pipeline edge cases for all users who set up log collection.
Context
Discovered while setting up OTel Collector → Loki log collection for ToolHive audit logs in a Kubernetes environment. The plain-text line was the root cause of several cascading errors during pipeline setup.
Just shipped #4567 for this — one-line change from fmt.Println to slog.Info. The startup message will now be emitted as structured JSON consistent with all other proxy log output.
Activity
Emit workload startup message as structured JSON log
danbarr commentedon Apr 5, 2026
Just shipped #4567 for this — one-line change from
fmt.Printlntoslog.Info. The startup message will now be emitted as structured JSON consistent with all other proxy log output.Emit workload startup message as structured JSON log (stacklok#4567)