Description
Component(s)
extension/memorylimiter
Describe the issue you're reporting
Following a proposal roughly sketched in #9591 (comment), this is a concrete set of steps to upgrade the Collector's capabilities with regards to rate-limiting and admission-limiting requests.
This proposal has the following major steps:
- Add
extension/xextension/limiter
package, wherelimiter.Extension
andlimiter.Limiter
types are modeled on thex/storage
package - Add
config/configlimiter
package, similar to theconfigauth
package in exporting a type for naming extension components, performing a map lookup and type check over host extensions - Modify
configgrpc
addingLimiters []configlimiter.Limitation
- (a) w/ unittests in configgrpc
- (b) end-to-end test in
extension/admissionlimiterextension
- Modify
confighttp
addingLimiters []configlimiter.Limitation
- (a) w/ unittests in confighttp
- (b) end-to-end test in
extension/admissionlimiterextension
- Update
memorylimiterextension
to support the newlimiter.Extension
interface - Add
admissionlimiterextension
supporting the newlimiter.Extension
interface modeled on the OTel-Arrow admission controller
- (a) Initial skeleton
- (b) Copy implementation from https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/internal/otelarrow/admission2/README.md
- Remove
internal/otelarrow/admission2
from collector-contrib, updateotelarrowreceiver
to use limiter extensions.
Here are the major steps outlined as rough drafts:
Includes step (1) and (2). These can be easily separated into two PRs, first extension then config.
#12599
Includes (3) w/o tests plus the content above, look mainly at configgrpc.go
#12600
Includes (5) w/o tests plus the first, #12601
Includes (6a) w/o tests plus the first, #12602
I am looking for maintainers and approvers to sign off on the general approach. I would send part (1) as a stand-alone change and proceed in roughly the order presented above.