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 +4 -4
- data/lib/stackify_apm/spies/net_http.rb +5 -1
- data/lib/stackify_apm/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8ec4ca9ae4465f5108ab76f8759bdd94702f0b46c7a44a2c510314cff8e7f44
|
4
|
+
data.tar.gz: 4b95a706746da817c8aab319fadb72392f6806e9795c23cfe4b4558bd9660b56
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 :
|
36
|
+
URL: req.uri.nil? ? host : updated_uri,
|
33
37
|
STATUS: '',
|
34
38
|
METHOD: method
|
35
39
|
)
|
data/lib/stackify_apm/version.rb
CHANGED
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.
|
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-
|
11
|
+
date: 2019-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|