Skip to content

Implement circuit breaker event indexing and current state API #987

Description

@Chucks1093

Summary

Index CircuitBreakerTripped events and expose an endpoint returning the circuit breaker configuration and recent trip history for each creator key.

Scope

  • GET /keys/:keyId/circuit-breaker — config (max_bps), active flag, and trip history
  • CircuitBreakerTripped events indexed with actual_bps and timestamp
  • Trip history paginated, last 50 events returned by default
  • Current max_bps config fetched from contract and cached 5 minutes
  • Trip events trigger in-app notification for key creator

Acceptance Criteria

  • Endpoint returns correct config and trip history
  • CircuitBreakerTripped events indexed correctly from contract
  • Trip history paginated correctly
  • Config cache refreshed every 5 minutes
  • Creator notification triggered on each trip event

ETA

12 hours

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions