Fix #64: Omit empty steps and errors from wide event logs#65
Merged
Conversation
575c3f4 to
2e99d69
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.
Summary
Closes #64
Modifies the wide event logging to omit
stepsanderrorsfields when they are empty arrays, reducing log noise and improving readability.Before
{"level":"DEBUG","name":"http.request","timestamp":"2026-03-01T19:38:32.602385+03:00","duration":195040541,"steps":[],"errors":[],"request.remoteAddr":"127.0.0.1:60449","tokens.type":"bearer","request.method":"GET","request.status":301,"serviceName":"http server"}After
{"level":"DEBUG","name":"http.request","timestamp":"2026-03-01T19:38:32.602385+03:00","duration":195040541,"request.remoteAddr":"127.0.0.1:60449","tokens.type":"bearer","request.method":"GET","request.status":301,"serviceName":"http server"}Changes
log/event.go:toAttrs()method now conditionally appendsstepsanderrorsattributes only when they contain dataTesting & Validation
task test)task lint)Code Review Summary
Blockers: None (P0/P1)
Findings: No material issues identified
Risk: Minor - downstream log parsers may need to handle missing fields instead of empty arrays
Breaking Changes
Log entries will no longer contain
steps: []orerrors: []when empty. Systems parsing these logs should be updated to handle missing keys.