Skip to content
This repository was archived by the owner on Apr 20, 2026. It is now read-only.

feat(KLEF-177): Monitoring - #36

Merged
isaacwallace123 merged 2 commits into
mainfrom
feat/KLEF-177-Monitoring
Apr 20, 2026
Merged

feat(KLEF-177): Monitoring#36
isaacwallace123 merged 2 commits into
mainfrom
feat/KLEF-177-Monitoring

Conversation

@NathanRoos

Copy link
Copy Markdown
Contributor

Pull Request

Summary

Adds a basic workload log ingestion and retrieval system. Daemon nodes POST log batches via a node-authenticated internal endpoint; the panel reads them via a user-authenticated public endpoint.

Related Issues

Closes #


Changes

What's Included

  • 012_workload_log_lines.sql — new table with indexes on (workload_id, ts DESC) and (project_id, ts DESC)
  • core/logs/domain — LogLine struct with JSON tags
  • core/logs/ports — LogRepository interface (SaveBatch, ListByWorkload) — the extension point for future log-sink plugins
  • core/logs/adapters/persistence — Postgres implementation using a prepared-statement transaction per batch; results reversed to chronological order before return
  • core/logs/adapters/http — POST /api/v1/internal/workloads/{id}/log-lines (node auth) and GET /api/v1/projects/{pid}/workloads/{wid}/logs?limit= (user auth)
  • Bootstrap wiring in container.go and http.go

What's Not Included


Testing

How Was This Tested?

go build ./... — no compile errors. Not integration tested.

Test Coverage

  • Unit tests added or updated
  • Integration tests added or updated
  • Manually tested end-to-end

Breaking Changes

Does this PR introduce breaking changes?

  • Yes
  • No

If yes, describe the impact and any required migration steps:


Security Considerations

  • This PR affects authentication or authorization logic
  • This PR touches secrets, tokens, or environment variables
  • This PR affects infrastructure, deployment pipelines, or network configuration

If any box is checked, describe the security impact and any mitigations applied:


Documentation

Does this PR require documentation updates?

  • Yes
  • No

If yes, check all that apply:

  • README.md
  • ARCHITECTURE.md
  • API reference
  • Architecture diagrams (C4 / DDD)
  • /docs

UI/UX (If Applicable)

  • Includes new components or views
  • Changes styles or theme tokens
  • Responsive behavior verified
  • Requires design approval

Screenshots or recordings:


Pre-Merge Checklist

  • PR title follows semantic format (feat:, fix:, chore:, docs:, refactor:, test:)
  • All CI checks passing
  • Code follows project style guidelines
  • No debug logs or commented-out code left in
  • Dependencies reviewed (no unnecessary additions)
  • No sensitive information included

Reviewer Notes

@NathanRoos NathanRoos self-assigned this Apr 20, 2026
@github-actions github-actions Bot added the feature New feature label Apr 20, 2026
@isaacwallace123
isaacwallace123 merged commit 633c4a1 into main Apr 20, 2026
7 checks passed
@isaacwallace123
isaacwallace123 deleted the feat/KLEF-177-Monitoring branch April 20, 2026 21:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

feature New feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants