Fix Alloy logfmt decode errors for JSON logs #46

Merged
eblume merged 1 commit from feature/fix-alloy-logfmt-errors into main 2026-01-22 18:00:35 -08:00
Owner

Summary

  • Use stage.match to conditionally apply logfmt parsing only to lines that don't start with {
  • This prevents error spam like "failed to decode logfmt" component_path=/ component_id=loki.process.pods component=stage type=logfmt err="logfmt syntax error at pos 2 on line 1: unexpected '\"'" when JSON-formatted logs hit the logfmt parser

Deployment and Testing

  • Sync alloy-k8s app to feature branch and verify errors stop appearing
  • Verify JSON logs are still parsed correctly
  • Verify logfmt logs (from Loki, Prometheus etc.) are still parsed correctly

🤖 Generated with Claude Code

## Summary - Use `stage.match` to conditionally apply logfmt parsing only to lines that don't start with `{` - This prevents error spam like `"failed to decode logfmt" component_path=/ component_id=loki.process.pods component=stage type=logfmt err="logfmt syntax error at pos 2 on line 1: unexpected '\"'"` when JSON-formatted logs hit the logfmt parser ## Deployment and Testing - [ ] Sync alloy-k8s app to feature branch and verify errors stop appearing - [ ] Verify JSON logs are still parsed correctly - [ ] Verify logfmt logs (from Loki, Prometheus etc.) are still parsed correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Use stage.match to conditionally apply logfmt parsing only to lines
that don't start with '{'. This prevents error spam when JSON-formatted
logs are passed to the logfmt parser.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
eblume merged commit e6de7ba391 into main 2026-01-22 18:00:35 -08:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
eblume/blumeops!46
No description provided.