Skip to content

feat(Phase-7): Observability and production readiness #179

Description

@chitrank2050

Overview

This is the tracking issue for Phase 7. The goal is to prove Meterplex can run in production — structured metrics, distributed tracing, alerting on critical business signals, and operational dashboards.

Phases 1-6 build the features. Phase 7 proves you can debug them when they break at 3am.

Success Criteria

  • Prometheus metrics exposed at /metrics endpoint
  • OpenTelemetry tracing on all HTTP requests, Kafka consumer messages, and database queries
  • Structured JSON logs with request/event correlation IDs
  • Grafana dashboards for API latency, Kafka consumer lag, outbox backlog, billing cycle health
  • Alerts configured for: DLQ growth, publisher lag, invoice generation failures, webhook failures, auth brute force
  • One API request traceable end-to-end: HTTP → DB writes → Kafka → consumer → aggregate → Redis
  • Health check endpoint reports all dependency statuses (Postgres, Redis, Kafka)
  • Load test baseline with k6 documenting throughput and latency percentiles

Tracking / Sub-tasks

Resources

  • Architecture Log: docs/phases/phase-7.md (to be created)
  • Architecture Doc: docs/architecture/phase-7-observability.md (to be created)

Why this phase matters

The question isn't "does it work?" — phases 1-6 proved that. The question is "can you tell when it stops working?" and "can you figure out why?"

A system without observability is a system you can't operate. You can't debug what you can't see. You can't scale what you can't measure. You can't promise uptime without alerts.

This is the difference between "I built a billing system" and "I can run a billing system in production."

Note: This issue represents the "Phase 7" milestone. Individual PRs should reference the specific sub-tasks above.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions