amazon-cloudwatch-agent icon indicating copy to clipboard operation
amazon-cloudwatch-agent copied to clipboard

Add Block Reading Of Next Line If Logs Agent Buffersize Is Reached

Open sethAmazon opened this issue 2 years ago • 4 comments
trafficstars

Description of the issue

We want cx to configure a max buffer size for logs

Description of changes

Add a good enough buffer to block reading and opening new log files

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

https://github.com/aws/amazon-cloudwatch-agent-test/pull/264

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make linter

sethAmazon avatar Jun 16 '23 19:06 sethAmazon

Codecov Report

Merging #767 (567c46c) into main (c0c8a92) will decrease coverage by 0.08%. The diff coverage is 25.00%.

@@            Coverage Diff             @@
##             main     #767      +/-   ##
==========================================
- Coverage   56.69%   56.61%   -0.08%     
==========================================
  Files         376      379       +3     
  Lines       17971    18191     +220     
==========================================
+ Hits        10188    10299     +111     
- Misses       7182     7285     +103     
- Partials      601      607       +6     
Impacted Files Coverage Δ
logs/logs.go 16.49% <0.00%> (-3.76%) :arrow_down:
plugins/outputs/cloudwatchlogs/cloudwatchlogs.go 23.14% <0.00%> (+0.29%) :arrow_up:
translator/config/schema.go 81.81% <ø> (ø)
translator/defaultKeyCase.go 0.00% <0.00%> (ø)
plugins/inputs/logfile/tail/tail.go 33.99% <20.00%> (-0.18%) :arrow_down:
plugins/outputs/cloudwatchlogs/pusher.go 89.53% <100.00%> (+0.25%) :arrow_up:
...ator/translate/logs/ruleMaxCloudwatchLogsBuffer.go 100.00% <100.00%> (ø)

... and 5 files with indirect coverage changes

codecov-commenter avatar Jun 16 '23 19:06 codecov-commenter

This code should be down streamed to ccwa after merge.

sethAmazon avatar Jun 20 '23 22:06 sethAmazon

Screenshot 2023-06-28 at 12 36 05 PM

sethAmazon avatar Jun 28 '23 16:06 sethAmazon

This PR was marked stale due to lack of activity.

github-actions[bot] avatar Jul 06 '23 00:07 github-actions[bot]