Skip to content

Limiter extension API interfaces and implementation helpers (**draft 6**)#13241

Closed
jmacd wants to merge 69 commits into
open-telemetry:mainfrom
jmacd:jmacd/limiter_v6
Closed

Limiter extension API interfaces and implementation helpers (**draft 6**)#13241
jmacd wants to merge 69 commits into
open-telemetry:mainfrom
jmacd:jmacd/limiter_v6

Conversation

@jmacd
Copy link
Copy Markdown
Contributor

@jmacd jmacd commented Jun 20, 2025

Description

Improves on the previous drafts:

Removes the SaturationChecker interface with only MustDeny(). This feature was a mistake, the concept of saturation is not required. The memorylimiterextension is modeled as a rate-limiter extension, instead. This reduces API surface area significantly.

Adds consumerlimiter package with NewLimitedFactory() for constructing receivers with pipelines that automatically apply limiters, configured by embedding the consumerlimiter.LimiterConfig, see the README.

Documents a proposed collector extension interface style called "Functional Composition". This is a draft, see docs/rfcs/functional-composition-pattern.md. If we like this, I'll put it in a separate PR.

Middleware config syntax proposal. A number of people have stumbled over the current syntax, which has the configmiggleware.Config item as a struct containing a single Id field. Instead, it could be a non-struct type (component.ID). See the open questions section in README.md.

Follows drafts
1: #12558
2: #12633
3: #12700
4: #12953
5: #13051

Link to tracking issue

Part of #7441
Part of #9591
Part of #12603
Part of #13228

Testing

N/A This will be broken into smaller PRs with tests.

Documentation

Documentation has been updated with new open questions.

@jmacd jmacd changed the title Limiter extension API interfaces and implementation helpers (**draft 5**) Limiter extension API interfaces and implementation helpers (**draft 6**) Jun 20, 2025
@jmacd
Copy link
Copy Markdown
Contributor Author

jmacd commented Jun 24, 2025

Closed in favor of #13265

@jmacd jmacd closed this Jun 24, 2025
pull Bot pushed a commit to Stars1233/opentelemetry-collector that referenced this pull request Apr 22, 2026
#### Description

Specifies the mechanics of our approach to safe interface evolution.

See  open-telemetry#14523
See open-telemetry#14525
See open-telemetry#13902

#### Testing

This pattern was "tested" in open-telemetry#13241 as I prototyped a rate-limiter
extension.

#### Documentation

✅

---------

Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
Co-authored-by: Pablo Baeyens <pablo.baeyens@datadoghq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant