Skip to content

Add per-alias log levels, metrics, and web dashboard#14

Open
fotag wants to merge 9 commits into
nickntg:masterfrom
fotag:feature/add-different-log-level-per-config-alias
Open

Add per-alias log levels, metrics, and web dashboard#14
fotag wants to merge 9 commits into
nickntg:masterfrom
fotag:feature/add-different-log-level-per-config-alias

Conversation

@fotag

@fotag fotag commented Jun 19, 2026

Copy link
Copy Markdown
Contributor
  • Per-alias log level control

    • Add LogLevel property to ConfigurationEntry
    • Add EntryLogger class with runtime level changes
    • Pass EntryLogger to all message processors via IMessageProcessor interface
    • Add SetLogLevel/GetLogLevel API endpoints and Orchestrator methods
  • Metrics system

    • Add QueueMetrics model tracking messages received/sent/failed
    • Add MetricsStore for thread-safe per-alias metrics
    • Add periodic metrics logging via configurable interval
  • Web dashboard

    • Add Kestrel-based dashboard server with REST API and SSE
    • Real-time monitoring with sparkline graphs
    • Runtime log level changes via dropdown
    • Dark mode support
  • JSON structured logging

    • Update NLog.config to use JsonLayout
    • All logs include @timestamp, level, logger, message, alias
    • Route Kestrel logs through NLog
  • AWS profile support

    • Add Profile property to ConfigurationEntry
    • Support AWS credentials file profiles in AwsQueueClient
  • Build system improvements

    • Add Makefile with cross-platform build targets
    • Add Dockerfile for binary export and runtime images
    • Support for macOS, Linux (x64/arm64), Windows
  • Documentation

    • Update README with new features and build instructions

- Per-alias log level control
  - Add LogLevel property to ConfigurationEntry
  - Add EntryLogger class with runtime level changes
  - Pass EntryLogger to all message processors via IMessageProcessor interface
  - Add SetLogLevel/GetLogLevel API endpoints and Orchestrator methods

- Metrics system
  - Add QueueMetrics model tracking messages received/sent/failed
  - Add MetricsStore for thread-safe per-alias metrics
  - Add periodic metrics logging via configurable interval

- Web dashboard
  - Add Kestrel-based dashboard server with REST API and SSE
  - Real-time monitoring with sparkline graphs
  - Runtime log level changes via dropdown
  - Dark mode support

- JSON structured logging
  - Update NLog.config to use JsonLayout
  - All logs include @timestamp, level, logger, message, alias
  - Route Kestrel logs through NLog

- AWS profile support
  - Add Profile property to ConfigurationEntry
  - Support AWS credentials file profiles in AwsQueueClient

- Build system improvements
  - Add Makefile with cross-platform build targets
  - Add Dockerfile for binary export and runtime images
  - Support for macOS, Linux (x64/arm64), Windows

- Documentation
  - Update README with new features and build instructions
@nickntg

nickntg commented Jun 20, 2026

Copy link
Copy Markdown
Owner

@fotag I love this. While you're at it, you might bump the packages to latest .Net 8 versions:

  • AWSSDK.SQS -> 4.0.3.7
  • Confluent.Kafka -> 2.14.2
  • FluentValidation -> 12.1.1
  • Newtonsoft.Json -> 13.0.4
  • NLog -> 6.1.3
  • NLog.Extensions.Logging -> 6.1.3
  • NLog.Web.AspNetCore -> 6.1.3
  • RestSharp -> 114.0.0

Testing frameworks also need an update but we can tackle this on another PR.

fotag added 6 commits June 22, 2026 08:11
AWS SDK 4.x returns null instead of empty collections for MessageAttributes
and Attributes. Added null-safe handling to prevent ArgumentNullException.

Ref: aws/aws-sdk-net#3600
- Add null checks in Orchestrator.GetLogLevel/SetLogLevel for pre-Start calls
- Reorder startup: Orchestrator before Dashboard to prevent race condition
- Remove encode="false" from NLog exception attribute for valid JSON output

Fixes dashboard crashes when accessed during startup and enables
proper Filebeat JSON parsing of exception stack traces.
- Add universalTime=true to NLog @timestamp for correct UTC timestamps
- Change IOrchestrator DI registration from Transient to Singleton

Transient registration caused Dashboard to get a different Orchestrator
instance than Worker, resulting in 404 errors when changing log levels.
Plus add dashboard sorting/summary.
@fotag fotag force-pushed the feature/add-different-log-level-per-config-alias branch from 3b2e53f to d62300e Compare June 24, 2026 11:54
- Add DefaultLogLevel to AppSettings
- Exclude LogLevel from config comparison
- Dashboard shows timeout info
- Add message-id from SQS in logs
@fotag fotag force-pushed the feature/add-different-log-level-per-config-alias branch from d62300e to 3e28bae Compare June 24, 2026 11:58
- Log SQS MessageId instead of ReceiptHandle for correlation
- Add messageId as ES field in all logs
- Move attributes logging to Debug level
- Include attributes in Error logs
- Add timing and details to HTTP/Kafka/PowerShell processors
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