Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lib/logdna.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def initialize(key, opts={})
@env = opts[:env]
@meta = opts[:meta]
@@client = nil unless defined? @@client

endpoint = opts[:endpoint] || Resources::ENDPOINT
hostname = opts[:hostname] || Socket.gethostname
ip = opts.key?(:ip) ? "&ip=#{opts[:ip]}" : ''
Expand Down Expand Up @@ -49,6 +49,7 @@ def initialize(key, opts={})
begin
request = Net::HTTP::Post.new(uri.request_uri, 'Content-Type' => 'application/json')
request.basic_auth 'username', key
request[:'user-agent'] = opts[:'user-agent'] || "ruby/#{LogDNA::VERSION}"
rescue => e
handle_exception(e)
return
Expand Down