diff --git a/README.md b/README.md index cddd1f9..9580cb0 100644 --- a/README.md +++ b/README.md @@ -328,7 +328,7 @@ rake test ## Caution -If an event message exceeds API limit (256KB), the event will be discarded. +If an event message exceeds API limit (1MB), the event will be discarded. ## Cross-Account Operation diff --git a/lib/fluent/plugin/out_cloudwatch_logs.rb b/lib/fluent/plugin/out_cloudwatch_logs.rb index ce62913..5ec6ceb 100644 --- a/lib/fluent/plugin/out_cloudwatch_logs.rb +++ b/lib/fluent/plugin/out_cloudwatch_logs.rb @@ -68,7 +68,7 @@ class TooLargeEventError < Fluent::UnrecoverableError; end end MAX_EVENTS_SIZE = 1_048_576 - MAX_EVENT_SIZE = 256 * 1024 + MAX_EVENT_SIZE = 1024 * 1024 EVENT_HEADER_SIZE = 26 def initialize diff --git a/test/plugin/test_out_cloudwatch_logs.rb b/test/plugin/test_out_cloudwatch_logs.rb index d849876..6c0aa56 100644 --- a/test/plugin/test_out_cloudwatch_logs.rb +++ b/test/plugin/test_out_cloudwatch_logs.rb @@ -974,11 +974,11 @@ def test_too_large_event @log_level debug EOC d.run(default_tag: fluentd_tag) do - d.feed(time, {'message' => '*' * 256 * 1024}) + d.feed(time, {'message' => '*' * 1024 * 1024}) end logs = d.logs - assert(logs.any?{|log| log =~ /Log event in .* discarded because it is too large: 262184 bytes exceeds limit of 262144/}) + assert(logs.any?{|log| log =~ /Log event in .* discarded because it is too large/}) end def test_do_not_emit_empty_record