Skip to content

Add Metrics Hooks #12

Open
Open

Description

@AryanSharma48

Developers often want visibility into retry behavior and circuit breaker state transitions for monitoring and analytics.

Add optional metrics hooks that allow consumers to collect operational data without requiring a full observability platform.

Potential use cases:

  • Prometheus metrics
  • OpenTelemetry exporters
  • Internal monitoring dashboards
  • Custom analytics systems

Example

createResilientFetch({
onRetry: () => metrics.increment("retries"),
onFailure: () => metrics.increment("failures"),
onCircuitOpen: () => metrics.increment("circuit_open")
});

Acceptance Criteria

  • Design metrics hook interface
  • Support retry metrics
  • Support failure metrics
  • Support circuit breaker metrics
  • Add tests
  • Update documentation

Activity

  1. AryanSharma48 commented on Oct 10, 2026

    @AryanSharma48
    OwnerAuthor

    Voice-triggered fix started. A pull request will be opened for human review. Nothing is merged automatically.

  2. AryanSharma48 commented on Oct 10, 2026

    @AryanSharma48
    OwnerAuthor

    Automated Fix Ready for Review

    Pull Request: #68
    Workflow Run: https://github.com/AryanSharma48/smoothAPI/actions/runs/38042109506

    All tests passed in the headless agent verification run. A human must review and merge.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions