Skip to content
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

Revert backup chunk specification for suppressing useless chunk backup sets #247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions lib/fluent/plugin/out_cloudwatch_logs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ module Fluent::Plugin
class CloudwatchLogsOutput < Output
Fluent::Plugin.register_output('cloudwatch_logs', self)

class TooLargeEventError < Fluent::UnrecoverableError; end

helpers :compat_parameters, :inject, :formatter

DEFAULT_BUFFER_TYPE = "memory"
Expand Down Expand Up @@ -379,7 +377,8 @@ def put_events_by_chunk(group_name, stream_name, events)
while event = events.shift
event_bytesize = event[:message].bytesize + EVENT_HEADER_SIZE
if MAX_EVENT_SIZE < event_bytesize
raise TooLargeEventError, "Log event in #{group_name} is discarded because it is too large: #{event_bytesize} bytes exceeds limit of #{MAX_EVENT_SIZE}"
log.warn "Log event in #{group_name} is discarded because it is too large: #{event_bytesize} bytes exceeds limit of #{MAX_EVENT_SIZE}"
next
end

new_chunk = chunk + [event]
Expand Down