module Dogapi

Constants

VERSION

Public Class Methods

find_datadog_host() click to toggle source
# File lib/dogapi/common.rb, line 151
def Dogapi.find_datadog_host
  # allow env-based overriding, useful for tests
  ENV["DATADOG_HOST"] || "https://app.datadoghq.com"
end
find_localhost() click to toggle source
# File lib/dogapi/common.rb, line 159
def Dogapi.find_localhost
  begin
    # prefer hostname -f over Socket.gethostname
    @@hostname ||= %x[hostname -f].strip
  rescue
    raise "Cannot determine local hostname via hostname -f"
  end
end