newrelic-faraday 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/lib/newrelic_faraday/instrumentation.rb +7 -7
- data/lib/newrelic_faraday/version.rb +1 -1
- data/newrelic-faraday.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6e9705543d8176c849702e8ac20cc104bebe09bc
|
4
|
+
data.tar.gz: f1de38d91ef9e1271ab9ea58d6201ea58e15b1ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fa9d163ded05de9d96620965dce610f27b82104785fe2eafd11a576752706b4fe0e23b9664ebf2417ef3da65fd0d03310d5cff8d6dc98b390eda06f4716bbaac
|
7
|
+
data.tar.gz: 3c0689fefce0b9b78b377cbb9b67964f680e2426b6b2cdd2665bfb7ccc0be51586054dbaf2f695740add4c58a75c1db83580530df5ec7f3b9f67758fd1a3e60a
|
data/.gitignore
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'new_relic/agent'
|
2
|
+
|
1
3
|
DependencyDetection.defer do
|
2
4
|
named :faraday
|
3
5
|
|
@@ -14,7 +16,7 @@ DependencyDetection.defer do
|
|
14
16
|
def run_request_with_newrelic_trace(method, url, params, headers, &block)
|
15
17
|
newrelic_host = parse_host_for_newrelic url
|
16
18
|
metrics = ["External/#{newrelic_host}/Faraday::Connection/#{method}", "External/#{newrelic_host}/all", "External/all"]
|
17
|
-
if NewRelic::Agent::
|
19
|
+
if NewRelic::Agent::Transaction.recording_web_transaction?
|
18
20
|
metrics << "External/allWeb"
|
19
21
|
else
|
20
22
|
metrics << "External/allOther"
|
@@ -27,12 +29,10 @@ DependencyDetection.defer do
|
|
27
29
|
alias run_request run_request_with_newrelic_trace
|
28
30
|
|
29
31
|
def parse_host_for_newrelic(url)
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
''
|
35
|
-
end
|
32
|
+
return host if host
|
33
|
+
URI(url).host.to_s
|
34
|
+
rescue
|
35
|
+
''
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
data/newrelic-faraday.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(/^(test|spec|features)\//)
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.add_dependency 'faraday', '>= 0.6', '< 0.
|
21
|
+
spec.add_dependency 'faraday', '>= 0.6', '< 0.13'
|
22
22
|
spec.add_dependency 'newrelic_rpm', '~> 3.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'rake'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic-faraday
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eric Abbott
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-08-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: faraday
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0.6'
|
22
22
|
- - "<"
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '0.
|
24
|
+
version: '0.13'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -31,7 +31,7 @@ dependencies:
|
|
31
31
|
version: '0.6'
|
32
32
|
- - "<"
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0.
|
34
|
+
version: '0.13'
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: newrelic_rpm
|
37
37
|
requirement: !ruby/object:Gem::Requirement
|