opentelemetry-collector
opentelemetry-collector copied to clipboard
Limiter extension API interfaces and implementation helpers (**draft 5**)
Description
Draft demonstrating the following advances on the previous draft:
- Base limiter is the MustDeny function as a stand-alone, like memory limiter extension/processor would use.
- Rate/Resource limiters have a single non-blocking interface
- Helper functions wrap the non-blocking interfaces with blocking forms
- Limiter middleware helpers for HTTP and gRPC revived from earlier draft
- Basic rate limiter based on golang.org/x/time/rate
- Basic resource limiter based on collector-contrib/internal/otelarrow/admission2
- More-consistent functional style
- Suggested
configmiddlewareintegration memorylimiterextension
Follows drafts 1: https://github.com/open-telemetry/opentelemetry-collector/pull/12558 2: https://github.com/open-telemetry/opentelemetry-collector/pull/12633 3: https://github.com/open-telemetry/opentelemetry-collector/pull/12700 4: https://github.com/open-telemetry/opentelemetry-collector/pull/12953
Link to tracking issue
Part of #9591. Part of #12603.
Testing
NONE: This is a demonstration, smaller PRs will be broken apart and tested individually if reviewers like the look of this, the full assembly.
Documentation
Updated.