Module: FFWD::Plugin::Datadog

Includes:
Logging, FFWD::Plugin
Defined in:
lib/ffwd/plugin/datadog/utils.rb,
lib/ffwd/plugin/datadog/version.rb,
lib/ffwd/plugin/datadog/hook.rb,
lib/ffwd/plugin/datadog.rb

Overview

$LICENSE Copyright 2013-2014 Spotify AB. All rights reserved.

The contents of this file are licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Defined Under Namespace

Modules: Utils Classes: Hook

Constant Summary collapse

VERSION =
"0.4.7"
DEFAULT_URL =
"https://app.datadoghq.com"
DEFAULT_FLUSH_INTERVAL =
10
DEFAULT_BUFFER_LIMIT =
100000

Class Method Summary collapse

Class Method Details

.setup_output(config) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
47
48
# File 'lib/ffwd/plugin/datadog.rb', line 36

def self.setup_output config
  config[:url] ||= DEFAULT_URL
  config[:flush_interval] ||= DEFAULT_FLUSH_INTERVAL
  config[:buffer_limit] ||= DEFAULT_BUFFER_LIMIT

  unless config[:datadog_key]
    raise "datadog_key: must be specified"
  end

  hook = Hook.new(config[:url], config[:datadog_key])

  FFWD.flushing_output log, hook, config
end