Skip to content

Add enhancement recommendation: System Logs and Observability#2

Closed
Copilot wants to merge 2 commits intoL4from
copilot/add-distributed-caching-layer
Closed

Add enhancement recommendation: System Logs and Observability#2
Copilot wants to merge 2 commits intoL4from
copilot/add-distributed-caching-layer

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 5, 2026

The system already runs Prometheus but its scrape config points only at itself — none of the application services are monitored. Grafana is being added but has nothing to visualize. This document evaluates all six candidate enhancements and recommends completing the observability stack as the highest-value next step.

What's in the document (ENHANCEMENT_RECOMMENDATION.md)

  • Current system inventory — table of all running services, tech, and role
  • All six options evaluated — each assessed for distributed systems learning value, implementation scope, and fit against existing gaps
  • Recommendation: System Logs and Observability — justified by:
    • Prometheus is already deployed but broken (scrapes only itself)
    • Grafana being added needs real metrics to display
    • All five services (api1, api2, nginx, notification-worker, kafka) get instrumented — demonstrates cross-service observability, not just single-service metrics
    • No external credentials or risky refactoring required
    • Produces a live Grafana dashboard as a concrete, demonstrable artifact

Implementation plan (outlined in doc)

  • Add prometheus-net.AspNetCore to the API; wire UseHttpMetrics() + MapMetrics()
  • Custom business counters (trade_offers_created_total, trade_offers_accepted_total, trade_offers_rejected_total) in TradeOffersController
  • MetricServer on port 9091 inside NotificationWorker
  • nginx-prometheus-exporter sidecar in docker-compose.yml
  • Updated prometheus.yml scraping all four service targets
  • Grafana added to compose with auto-provisioned Prometheus datasource and dashboard

Options ruled out

Option Why skipped
Redis caching Solves a non-existent scale problem on SQLite
New microservice Forces major refactoring without a clear business driver
Real email notifications Adds external SMTP dependency; no new distributed systems concept
Kubernetes ingress Scope jump unrelated to the current Docker Compose topology
Data sharding SQLite can't shard natively; prerequisite migration dwarfs the feature

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: snxethan <77033537+snxethan@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Redis for distributed caching to improve performance Add enhancement recommendation: System Logs and Observability Mar 5, 2026
Copilot stopped work on behalf of snxethan due to an error March 5, 2026 05:17
@snxethan snxethan closed this Mar 5, 2026
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