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
Add log throttling per file (revised) #3185
Commits on May 6, 2021
-
in_tail: Handle log throttling per file feature
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com> Co-authored-by: Anthony Comtois <anthony.comtois@sky.uk>
Configuration menu - View commit details
-
Copy full SHA for d6755ed - Browse repository at this point
Copy the full SHA d6755edView commit details -
in_tail: Use size config type for read_bytes_limit_per_second
Because file size should be specified as numbers with SI prefix instead of raw numbers. Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for a5d3a5a - Browse repository at this point
Copy the full SHA a5d3a5aView commit details -
in_tail: Use actual read bytes to calculate read bytes number
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for d3d7119 - Browse repository at this point
Copy the full SHA d3d7119View commit details -
in_tail: Use more meaningful variable name
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 30a63ca - Browse repository at this point
Copy the full SHA 30a63caView commit details -
in_tail: Use fixed value instead of variable
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 61554dc - Browse repository at this point
Copy the full SHA 61554dcView commit details -
in_tail: test: Add log throttling testcases for w/o stat watcher situ…
…ations Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for a54f25b - Browse repository at this point
Copy the full SHA a54f25bView commit details -
in_tail: Guard for read empty lines
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 2b2260e - Browse repository at this point
Copy the full SHA 2b2260eView commit details -
Use Thread Pool on tailing to prevent Kernel#sleep for entire sleep
Because the previous in_tail implementation is single threaded. Thus, calling Kernel#sleep pauses entire tailing thread and in_tail plugin. Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 8ebc227 - Browse repository at this point
Copy the full SHA 8ebc227View commit details -
in_tail: Use Fluent::EventTime instead of Time
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 6e8a13c - Browse repository at this point
Copy the full SHA 6e8a13cView commit details -
in_tail: Check invalid max_thread_pool_size on #configure
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 5b19e40 - Browse repository at this point
Copy the full SHA 5b19e40View commit details -
in_tail: Set default value of max_thread_pool_size as 1
Because when not using log throttling, is is enough to run on single thread. Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 854cca8 - Browse repository at this point
Copy the full SHA 854cca8View commit details -
in_tail: Use 2 or more thread pool size on log throttling testcases
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for f76f45a - Browse repository at this point
Copy the full SHA f76f45aView commit details -
in_tail: Add warning for specifying less equal than 8192 on read_byte…
…s_limit_per_second Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 4b2526b - Browse repository at this point
Copy the full SHA 4b2526bView commit details -
in_tail: Check thread pool objects existences
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for f88c4ae - Browse repository at this point
Copy the full SHA f88c4aeView commit details -
in_tail: Use more strict parameter checking for log throttling feature
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 61ae7ca - Browse repository at this point
Copy the full SHA 61ae7caView commit details -
in_tail: thread_pool: Add tailing thread poll testcases
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for de6bef3 - Browse repository at this point
Copy the full SHA de6bef3View commit details -
Use 8192 bytes on number_bytes_read calculation
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 48d9be3 - Browse repository at this point
Copy the full SHA 48d9be3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d9a755 - Browse repository at this point
Copy the full SHA 4d9a755View commit details -
Use constant instead of interger values
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for a4459ae - Browse repository at this point
Copy the full SHA a4459aeView commit details -
in_tail: Fix unstable testcases
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 4da4ae3 - Browse repository at this point
Copy the full SHA 4da4ae3View commit details -
in_tail: Use thread pool only when log throttling feature is enabled
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for f29309b - Browse repository at this point
Copy the full SHA f29309bView commit details -
in_tail: Fix incorrect #join usage
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 490a329 - Browse repository at this point
Copy the full SHA 490a329View commit details -
in_tail: Use Fluent::Clock.new to obtain starting time
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for f1807c9 - Browse repository at this point
Copy the full SHA f1807c9View commit details -
in_tail: Use Fluent::Clock.now instead of Fluent::EventTime.now again
Signed-off-by: Hiroshi Hatake <hatake@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 7023b3f - Browse repository at this point
Copy the full SHA 7023b3fView commit details -
in_tail: Prevent to call for nil instance
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for ae9deef - Browse repository at this point
Copy the full SHA ae9deefView commit details -
in_tail: Prevent to reuse
@thread_pool
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for 8c63cb1 - Browse repository at this point
Copy the full SHA 8c63cb1View commit details -
in_tail: test: Use safe file removing method
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for 43e8f4f - Browse repository at this point
Copy the full SHA 43e8f4fView commit details -
in_tail: Remove needless start_reading variable reset
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for 808e27e - Browse repository at this point
Copy the full SHA 808e27eView commit details -
Use #bytesize for calculating read bytes
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for 1c88b0c - Browse repository at this point
Copy the full SHA 1c88b0cView commit details -
in_tail: thread_pool: Check running status properly
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for e3e9345 - Browse repository at this point
Copy the full SHA e3e9345View commit details -
in_tail: thread_pool: Detect running or not with only queue is closed
This is because checking `@queue` status is enough to detect whether thread pool is alived or not. Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 671c666 - Browse repository at this point
Copy the full SHA 671c666View commit details -
in_tail: test: Reconsider testing caluses and assertion conditions
To create test fixture should contain 20 lines or greater. Then, we should create 30 lines text included file. num_events should be specify more accurate values. 8192 bytes case, num_events should specify 2 to make more concreate circumstances. To prevent hard timout on driver#run, we should specify `shutdown: false` keyward argument. This is a culprit to generate plugin hard timeout error messages on testing. Signed-off-by: Hiroshi Hatake <cosmo0920.oucc@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e4747ea - Browse repository at this point
Copy the full SHA e4747eaView commit details -
in_tail: Extract as a method for sleep for log ingestion code
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for af2ea9b - Browse repository at this point
Copy the full SHA af2ea9bView commit details
Commits on May 11, 2021
-
Avoid to use
#sleep
for stop reading filesSpecify `read_more` as `false` is enough to prevent reading beyond bytes limits. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for d3a3023 - Browse repository at this point
Copy the full SHA d3a3023View commit details -
Remove needless thread poll implementation
If we don't use `#sleep` to prevent reading bytes beyond limits, it is not needed to implement thread pool mechanism. We just need to get out reading file loop when bytes limit is reached. Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for 478b487 - Browse repository at this point
Copy the full SHA 478b487View commit details -
Split complicated clause into read lines limits and log throttling
limits Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for 147ffbf - Browse repository at this point
Copy the full SHA 147ffbfView commit details -
Use early return on the log throttling first clause
Signed-off-by: Hiroshi Hatake <hatake@calyptia.com>
Configuration menu - View commit details
-
Copy full SHA for 6be3533 - Browse repository at this point
Copy the full SHA 6be3533View commit details -
in_tail: Replace a magic number with a constant
Should use TailWatcher::IOHandler::BYTES_TO_READ as mininum value of read_bytes_limit_per_second. Signed-off-by: Takuro Ashie <ashie@clear-code.com>
Configuration menu - View commit details
-
Copy full SHA for 98616e2 - Browse repository at this point
Copy the full SHA 98616e2View commit details