Class: Fluent::InDatadogEvent

Inherits:
Input
  • Object
show all
Includes:
HandleTagNameMixin, Mixin::RewriteTagName
Defined in:
lib/fluent/plugin/in_datadog_event.rb

Instance Method Summary collapse

Constructor Details

#initializeInDatadogEvent

Returns a new instance of InDatadogEvent.



25
26
27
28
29
# File 'lib/fluent/plugin/in_datadog_event.rb', line 25

def initialize
  super
  #
  require "dogapi"
end

Instance Method Details

#shutdownObject



37
38
39
40
# File 'lib/fluent/plugin/in_datadog_event.rb', line 37

def shutdown
  @finished = true
  @thread.join
end

#startObject



31
32
33
34
35
# File 'lib/fluent/plugin/in_datadog_event.rb', line 31

def start
  @dog = Dogapi::Client.new(@api_key, @app_key)
  @finished = false
  @thread = Thread.new(&method(:run))
end