Skip to content

feat(config): add error rate limiting #19

@usernane

Description

@usernane

Description

No rate limiting for repeated errors. In high-traffic scenarios, the same error can flood logs.

Implementation Details

  • Add HandlerConfig::setRateLimit(int $maxPerMinute)
  • Track error signatures (hash of class+line+message)
  • Skip handler execution if rate exceeded
  • Log "X similar errors suppressed" summary periodically

Example Usage

$config = new HandlerConfig();
$config->setRateLimit(100); // Max 100 of same error per minute
Handler::setConfig($config);

Acceptance Criteria

  • Configurable rate limit per error signature
  • Duplicate errors suppressed when limit reached
  • Summary logged when suppression occurs
  • Rate limit resets after time window

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions