module Dogapi
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Unless explicitly stated otherwise all files in this repository are licensed under the BSD-3-Clause License. This product includes software developed at Datadog (www.datadoghq.com/). Copyright 2011-Present Datadog, Inc.
Constants
- USER_AGENT
- VERSION
Public Class Methods
# File lib/dogapi/common.rb 208 def Dogapi.find_datadog_host 209 # allow env-based overriding, useful for tests 210 ENV['DATADOG_HOST'] || 'https://api.datadoghq.com' 211 end
# File lib/dogapi/common.rb 216 def Dogapi.find_localhost 217 return @@hostname if @@hostname 218 out, status = Open3.capture2('hostname', '-f', err: File::NULL) 219 unless status.exitstatus.zero? 220 begin 221 out = Addrinfo.getaddrinfo(Socket.gethostname, nil, nil, nil, nil, Socket::AI_CANONNAME).first.canonname 222 rescue SocketError 223 out, status = Open3.capture2('hostname', err: File::NULL) 224 raise SystemCallError, 'Both `hostname` and `hostname -f` failed.' unless status.exitstatus.zero? 225 end 226 end 227 @@hostname = out.strip 228 end
# File lib/dogapi/common.rb 230 def Dogapi.find_proxy 231 ENV['DD_PROXY_HTTPS'] || ENV['dd_proxy_https'] || 232 ENV['DD_PROXY_HTTP'] || ENV['dd_proxy_http'] || 233 ENV['HTTPS_PROXY'] || ENV['https_proxy'] || ENV['HTTP_PROXY'] || ENV['http_proxy'] 234 end
Very simplified hash with indifferent access - access to string or symbol keys via symbols. E.g.: my_hash = { 'foo' => 1 } Dogapi.symbolized_access(my_hash)
my_hash # => 1
# File lib/dogapi/common.rb 250 def Dogapi.symbolized_access(hash) 251 hash.default_proc = proc { |h, k| h.key?(k.to_s) ? h[k.to_s] : nil } 252 hash 253 end