opentelemetry-collector icon indicating copy to clipboard operation
opentelemetry-collector copied to clipboard

[config/confighttp] add memorylimiterextension to confighttp

Open timannguyen opened this issue 1 year ago • 7 comments
trafficstars

Description: <Describe what has changed.>

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: <Describe what testing was performed and which tests were added.>

unit test

Documentation: <Describe the documentation added.>

confighttp README linking to memorylimiterextension.

timannguyen avatar Jan 25 '24 15:01 timannguyen

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.91%. Comparing base (420772e) to head (960c5a2). Report is 191 commits behind head on main.

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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 25 '24 19:01 codecov[bot]

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.

dmitryax avatar Jan 25 '24 22:01 dmitryax

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.

Yeah I think what we can do is simulate how Auth is handled in confighttp. We can add a component ID in HTTPServerSettings for rate(memory) limiting components and only load it if users specify it.

splunkericl avatar Jan 26 '24 16:01 splunkericl

@dmitryax updated to only add the extension to the struct. nonfunctional.

timannguyen avatar Jan 29 '24 20:01 timannguyen

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Mar 20 '24 03:03 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Apr 04 '24 03:04 github-actions[bot]

This PR was marked stale due to lack of activity. It will be closed in 14 days.

github-actions[bot] avatar Apr 20 '24 03:04 github-actions[bot]

Closed as inactive. Feel free to reopen if this PR is still being worked on.

github-actions[bot] avatar May 08 '24 03:05 github-actions[bot]