Skip to content

Emit JSON logs for logs-ingester compatibility#185

Merged
matteogastaldello merged 1 commit into
mainfrom
logs-standardization
Jun 10, 2026
Merged

Emit JSON logs for logs-ingester compatibility#185
matteogastaldello merged 1 commit into
mainfrom
logs-standardization

Conversation

@matteogastaldello

Copy link
Copy Markdown
Collaborator

This pull request updates the logging configuration in main.go to use structured JSON logs compatible with the logs-ingester system, replacing the previous pretty-printed log output. The change ensures that each log line is a single JSON object with a standardized timestamp, improving log parsing and integration with downstream systems.

Logging improvements:

  • Replaced the use of prettylog with Go's standard slog.NewJSONHandler, outputting each log line as a JSON object to stderr with a canonical "timestamp" field in RFC3339Nano UTC format for compatibility with logs-ingester.
  • Removed the import of prettylog from the codebase, as it is no longer needed.Replace prettylog (colored text) with a slog JSON handler on stderr. Each line is now a single JSON object with a canonical "timestamp" in RFC3339Nano UTC plus a "service" field; traceId/name/namespace are already injected by unstructured-runtime. Handler logic inlined to avoid a plumbing bump that conflicts with the runtime's slogs/pretty test dep.

Replace prettylog (colored text) with a slog JSON handler on stderr.
Each line is now a single JSON object with a canonical "timestamp" in
RFC3339Nano UTC plus a "service" field; traceId/name/namespace are
already injected by unstructured-runtime. Handler logic inlined to avoid
a plumbing bump that conflicts with the runtime's slogs/pretty test dep.
@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@matteogastaldello matteogastaldello merged commit 80dbb62 into main Jun 10, 2026
5 of 7 checks passed
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