Skip to content

Conversation

@macmandr197
Copy link
Contributor

@macmandr197 macmandr197 commented Oct 8, 2025

I want to facilitate the parsing of JSON logs directly with Grafana Alloy + Loki. To do this, it would be beneficial to output the JSON logs as a single line to be then parsed within Grafana. Currently, because the report is "prettified" it treats each new line of the log, as a different log entry within grafana. Collapsing the log to a single line, will allow it to be parsed properly within Grafana.

@seanthegeek
Copy link
Contributor

seanthegeek commented Oct 24, 2025

Why include a --prettify-json when that's the default anyway? Wouldn't it be better to add just to just add the --no-prettify-json option?

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.29%. Comparing base (f618f69) to head (69db637).
⚠️ Report is 175 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #617      +/-   ##
==========================================
- Coverage   58.39%   58.29%   -0.10%     
==========================================
  Files          12       11       -1     
  Lines        1620     1748     +128     
==========================================
+ Hits          946     1019      +73     
- Misses        674      729      +55     

☔ 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.

@macmandr197
Copy link
Contributor Author

Why include a --prettify-json when that's the default anyway? Wouldn't it be better to add just to just add the --no-prettify-json option?

I was thinking it would beneficial to offer an explicit option for CLI readability for those who may be automating this via systemd service / Docker image creation.

@seanthegeek
Copy link
Contributor

Let's remove that option to avoid cluttering the CLI with an option that doesn't do anything, because the fact that the JSON is pettified by default is implied by the existence of --no-prettyify-json, and the sample output in the documentation. Then I'll merge this.

@macmandr197
Copy link
Contributor Author

Let's remove that option to avoid cluttering the CLI with an option that doesn't do anything, because the fact that the JSON is pettified by default is implied by the existence of --no-prettyify-json, and the sample output in the documentation. Then I'll merge this.

Sounds good. I have removed the option. Let me know what you think.

@seanthegeek
Copy link
Contributor

Please fix the test failures

@seanthegeek seanthegeek merged commit fce8476 into domainaware:master Nov 2, 2025
6 of 7 checks passed
seanthegeek added a commit that referenced this pull request Nov 21, 2025
- Fix parsing emails with an uncompressed aggregate report attachment (Closes #607)
- Add `--no-prettify-json` CLI option (PR #617)
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.

2 participants