hyperdx-ruby 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4933bb0e69a1ad181315c58d286df867e1c657f3571fae7b1deeda5d731ca630
4
- data.tar.gz: 97bbb1208f0052283abee07c27a04a0005590e3dd06097e62644f04d86857014
3
+ metadata.gz: 39f4ff650e6ed4dce68795c54187bf8b113649714cc0a1fdb8003c445f2c0503
4
+ data.tar.gz: 3d62be63c08eaebae0a0e1826ed882a91c4de5661d3e0c086e46acb2ff7a775e
5
5
  SHA512:
6
- metadata.gz: b8fab542413e3d0ff9fd02f58356e0ae238bf37fe2e235052b02b735b64d5332dd415777571228dcf24ae5de2755ec9c0f2fbc991984bba780d62f07ee12eb27
7
- data.tar.gz: 357382ef8d18d2dbdf412c7595d85cfc48d5e287d719a5b34210bc9989f2a56672cc54f7f951bf2e071503c8d1b23558f778cf2963380915a03d752572c2383f
6
+ metadata.gz: 9a6df38e5bd98fa259046987d86a230e5d10f9219459d35c9d602a73b93b1029226cf2a5f15d328ce7027a8a81844be9bcb46cfb475f5963e3973442a24e34ea
7
+ data.tar.gz: a72176854e602e1ea8b7e2aab6de7f4d191b4dab9c2cd9baf4a8b2e33338e114e459488793f1ef11db1bd5ab3a721766b3472297e76ef038a176554ef2c538ce
@@ -56,7 +56,7 @@ module Hyperdx
56
56
 
57
57
  def process_message(msg, opts = {})
58
58
  processed_message = {
59
- line: msg,
59
+ message: msg,
60
60
  app: opts[:app],
61
61
  level: opts[:level],
62
62
  env: opts[:env],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hyperdx
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
data/lib/hyperdx/ruby.rb CHANGED
@@ -27,16 +27,16 @@ module Hyperdx
27
27
  @internal_logger = Logger.new($stdout)
28
28
  @internal_logger.level = Logger::DEBUG
29
29
  endpoint = opts[:endpoint] || Resources::ENDPOINT
30
- hostname = opts[:hostname] || Socket.gethostname
30
+ @hostname = opts[:hostname] || Socket.gethostname
31
31
 
32
- if hostname.size > Resources::MAX_INPUT_LENGTH || @app.size > Resources::MAX_INPUT_LENGTH
32
+ if @hostname.size > Resources::MAX_INPUT_LENGTH || @app.size > Resources::MAX_INPUT_LENGTH
33
33
  @internal_logger.debug("Hostname or Appname is over #{Resources::MAX_INPUT_LENGTH} characters")
34
34
  return
35
35
  end
36
36
 
37
- ip = opts.key?(:ip) ? "&ip=#{opts[:ip]}" : ""
38
- mac = opts.key?(:mac) ? "&mac=#{opts[:mac]}" : ""
39
- url = "#{endpoint}?hostname=#{hostname}#{mac}#{ip}"
37
+ @ip = opts.key?(:ip) ? opts[:ip] : ""
38
+ @mac = opts.key?(:mac) ? opts[:mac] : ""
39
+ url = "#{endpoint}?hdx_platform=ruby"
40
40
  uri = URI(url)
41
41
 
42
42
  request = Net::HTTP::Post.new(uri.request_uri, "Content-Type" => "application/json")
@@ -48,8 +48,11 @@ module Hyperdx
48
48
  def default_opts
49
49
  {
50
50
  app: @app,
51
- level: @log_level,
52
51
  env: @env,
52
+ hostname: @hostname,
53
+ ip: @ip,
54
+ level: @log_level,
55
+ mac: @mac,
53
56
  meta: @meta,
54
57
  }
55
58
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hyperdx-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Warren Lee