Skip to content

Commit

Permalink
added custom_size_based_buffer class
Browse files Browse the repository at this point in the history
Added the feature for size and time based flushing of buffer.
Added config options for max_interval and max_size. Once either one is
reached the events stored in the buffer will be flushed.

Updated kusto.rb
  • Loading branch information
monishkadas-ms committed Sep 17, 2024
1 parent 58c2772 commit cbb7444
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/logstash/outputs/kusto.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,6 @@ class LogStash::Outputs::Kusto < LogStash::Outputs::Base
# Mapping name - deprecated, use json_mapping
config :mapping, validate: :string, deprecated: true

config :max_size, validate => :number, default => 1000

config :max_interval, validate => :number, default => 60

# Determines if local files used for temporary storage will be deleted
# after upload is successful
config :delete_temp_files, validate: :boolean, default: true
Expand All @@ -123,6 +119,12 @@ class LogStash::Outputs::Kusto < LogStash::Outputs::Base
# Check Proxy URL can be over http or https. Dowe need it this way or ignore this & remove this
config :proxy_protocol, validate: :string, required: false , default: 'http'

# Maximum size (number of events) of the buffer before it gets flushed, defaults to 1000
config :max_size, validate: :number, default: 1000

# Maximum interval (in seconds) before the buffer gets flushed, defaults to 60
config :max_interval, validate: :number, default: 60

default :codec, 'json_lines'

def register
Expand Down

0 comments on commit cbb7444

Please sign in to comment.