-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[config/confighttp] add memorylimiterextension to confighttp #9397
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9397 +/- ##
==========================================
- Coverage 90.93% 90.91% -0.02%
==========================================
Files 348 348
Lines 18379 18399 +20
==========================================
+ Hits 16713 16728 +15
- Misses 1344 1348 +4
- Partials 322 323 +1 ☔ View full report in Codecov by Sentry. |
c21489e
to
2a902ce
Compare
I'm not sure that silently applying any available memory_limiter extension is the right approach to start. What if I want some receivers to be more aggressive in rejecting based on memory utilization than others? There must be a way to configure that even if we allow the behavior defined in this PR. To avoid introducing breaking changes going forward, we need to design the user interface before applying this change. |
c3d1ec7
to
7691c98
Compare
Yeah I think what we can do is simulate how |
97e6f04
to
a87cc5f
Compare
@dmitryax updated to only add the extension to the struct. nonfunctional. |
021512f
to
579c4a0
Compare
579c4a0
to
664ddc2
Compare
9cade05
to
4f52623
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple nits. Otherwise LGTM
config/confighttp/README.md
Outdated
|
||
`memory_limiter`: [Memory limiter extension](../../extension/memorylimiterextension/README.md) that will reject incoming requests once the memory utilization grows above configured limits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep it as another option in the list
`memory_limiter`: [Memory limiter extension](../../extension/memorylimiterextension/README.md) that will reject incoming requests once the memory utilization grows above configured limits. | |
- `memory_limiter`: [Memory limiter extension](../../extension/memorylimiterextension/README.md) that will reject incoming requests once the memory utilization grows above configured limits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
if hss.MemoryLimiter != nil { | ||
ml, err := getMemoryLimiterExtension(hss.MemoryLimiter, host.GetExtensions()) | ||
if err != nil { | ||
return nil, err |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cover this path to make codecov happy. Should be easy I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
covered
8027d83
to
9b4a301
Compare
ee588e9
to
7e876fa
Compare
7e876fa
to
5902134
Compare
5902134
to
960c5a2
Compare
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Closed as inactive. Feel free to reopen if this PR is still being worked on. |
Description:
integrate MemoryLimiterExtension with confighttp. The line of thinking is if there is a limiter extension all http servers would be restricted based on that memory requirement in order to not crash the collector from OOM.
Link to tracking Issue: 8632
Testing:
unit test
Documentation:
confighttp README linking to memorylimiterextension.