Skip to content

feat(backend): audit circuit breaker — Prometheus telemetry, exponent… - #1592

Merged
emdevelopa merged 1 commit into
emdevelopa:mainfrom
Judekings:feature/be-audit-circuit-breaker-issues-1433-1436
Sep 30, 2026
Merged

emdevelopa merged 1 commit into
emdevelopa:mainfrom
Judekings:feature/be-audit-circuit-breaker-issues-1433-1436

Conversation

@Judekings

Copy link
Copy Markdown

…ial retry, distributed locking, and stress tests (#1433 #1434 #1435 #1436)

Closes #1433
Closes #1434
Closes #1435
Closes #1436

…ial retry, distributed locking, and stress tests (emdevelopa#1433 emdevelopa#1434 emdevelopa#1435 emdevelopa#1436)

- emdevelopa#1433: Add prom-client Gauge/Counter/Histogram metrics to AuditCircuitBreaker
  for state, transitions, failures, successes, open duration, and health checks.
  Add Prometheus alerting rules (OPEN for >2m, flapping, high failure rate).

- emdevelopa#1434: Add execute(fn, options) method with automated exponential backoff retry
  (baseDelayMs * 2^attempt + jitter), configurable maxRetries and retryableErrors.
  Export CircuitOpenError. Update audit-writer.js to use execute().

- emdevelopa#1435: Add DistributedAuditCircuitBreakerLock with Redis SET NX PX locking,
  Lua-guarded release, state sync/publish across instances, and graceful Redis
  fallback. Add maxConcurrency semaphore to AuditWriterQueue.

- emdevelopa#1436: Add integration test suite (10 scenarios) and stress test suite
  (7 scenarios) covering full state machine, metrics, retry backoff, distributed
  lock, queue concurrency, and mixed-load circuit behavior.

Closes emdevelopa#1433
Closes emdevelopa#1434
Closes emdevelopa#1435
Closes emdevelopa#1436
@vercel

vercel Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Judekings is attempting to deploy a commit to the Emmanuel's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Sep 27, 2026

Copy link
Copy Markdown

@Judekings Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@emdevelopa
emdevelopa merged commit 2b183be into emdevelopa:main Sep 30, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment