stackify-ruby-apm 1.6.0 → 1.6.1

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: 9e21411e3d9be64aa1c8907e09552f6aac44ecf712e59065d1a1156381c9a278
4
- data.tar.gz: a0b0aaa469349611840c4b222c920a87253678ab1d681969f4a5b5804cb40515
3
+ metadata.gz: b8ec4ca9ae4465f5108ab76f8759bdd94702f0b46c7a44a2c510314cff8e7f44
4
+ data.tar.gz: 4b95a706746da817c8aab319fadb72392f6806e9795c23cfe4b4558bd9660b56
5
5
  SHA512:
6
- metadata.gz: 61300001e05eb6eb32b0adfb66eead66dac56eea502fb1f64da60cfcdc51c5d33bf96f284f433441adb2488779f709307d9c05d5fc97c8271114dbf155be5413
7
- data.tar.gz: ebd7cc6ff9e131f89ff38152135fc82eb22b8955ec417959edb4bfa63843cfbc2fce4608e8241d14832b43dc88e24dbc1c096ea2789e1cfd7d7323ea0c8eb61b
6
+ metadata.gz: 5ba374e64587fc878524e7e47a003099e24cb444ca6fea2fdfed114339d2c64ed241b02abfbf2bd0c5f69cb87fdb50a37e456350b719d2c402b50a7d8cc874f0
7
+ data.tar.gz: e58a7a2206c39b3c15c896267f64aa3c91a6775c0fee17267012724a184c41f6486d295f3f50bfa82821075f95b72c754f5986b48ab84ba8da3e1b78bf0fbc65
@@ -5,6 +5,7 @@ module StackifyRubyAPM
5
5
  module Spies
6
6
  # @api private
7
7
  class NetHTTPSpy
8
+ # rubocop:disable Metrics/CyclomaticComplexity
8
9
  def install
9
10
  Net::HTTP.class_eval do
10
11
  alias_method 'request_without_apm', 'request'
@@ -21,6 +22,9 @@ module StackifyRubyAPM
21
22
 
22
23
  host ||= address
23
24
 
25
+ # For Ruby version 2.2.x, 2.3.x, 2.4.x we need to parse it and get the <scheme> & <host>/<path>
26
+ updated_uri = req.uri.scheme + '://' + req.uri.host + req.uri.path if defined?(req.uri.host)
27
+
24
28
  name = "#{method} #{host}"
25
29
  type = "ext.net_http.#{method}"
26
30
 
@@ -29,7 +33,7 @@ module StackifyRubyAPM
29
33
  ctx = Span::Context.new(
30
34
  CATEGORY: 'Web External',
31
35
  SUBCATEGORY: 'Execute',
32
- URL: req.uri.nil? ? host : req.uri,
36
+ URL: req.uri.nil? ? host : updated_uri,
33
37
  STATUS: '',
34
38
  METHOD: method
35
39
  )
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Sets the version of the APM
4
4
  module StackifyRubyAPM
5
- VERSION = '1.6.0'.freeze
5
+ VERSION = '1.6.1'.freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stackify-ruby-apm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stackify
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-29 00:00:00.000000000 Z
11
+ date: 2019-09-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler