Skip to content

[FEATURE] Add Prometheus metrics and a Grafana dashboard for TransactionMs #10

@abengl

Description

@abengl

Description
Expose Prometheus-compatible metrics from the banking microservices and build a single Grafana dashboard focused on the transfer pipeline health: request rates, error rates, and latency.

Tasks

  • Add micrometer-registry-prometheus to TransactionMs, AccountMs, and CustomerMs
  • Expose /actuator/prometheus in each service (already have Actuator — just needs the endpoint enabled in properties)
  • Add Prometheus and Grafana as services in docker-compose.yml
  • Configure Prometheus prometheus.yml to scrape all three microservices
  • Build a Grafana dashboard with the following panels:
    • Transfer request rate (requests/sec on POST /api/v1/transactions/transfer)
    • Transfer error rate (4xx and 5xx responses)
    • p95 latency for the transfer endpoint
    • Active HTTP connections per service
  • Export the dashboard as dashboard.json and include it in the repository under /grafana
  • Add a custom Counter metric in TransactionMs for transactions.completed and transactions.failed using Micrometer API directly

Acceptance Criteria

  • http://localhost:9090 (Prometheus) shows all three services as targets with state UP
  • http://localhost:3000 (Grafana) loads the dashboard without manual configuration after docker-compose up
  • The dashboard updates in real time when the Generator runs a generation batch
  • transactions.completed and transactions.failed counters are visible in Prometheus and the Grafana dashboard
  • No hardcoded Grafana credentials beyond the default admin/admin dev setup

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions