newrelic_em_http 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/new_relic/agent/instrumentation/em_http.rb +20 -22
- data/newrelic_em_http.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc07435abe9a9aa46b536d502c969585fc580b365da0309ad31726d1cfce4388
|
4
|
+
data.tar.gz: 4c316021428ad2437316b0e60f831b66771ede72fac660e9f9c34de4de648a80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddfc9d407d9fd91063b0792be516b31cc4b511e2e77ca40c4ea3a26db66eb893b7e609ad10195db678bd6dfbc0e081db1055970325366d9381cc060bf5d9196e
|
7
|
+
data.tar.gz: 5755d1fba62fb2b903f4fa60fe25aadb00b0097365beca86a96d73fe8b8c2ef141bf79a0ca7fa3527741b9cd0afa168d380be56a04b68bb5a7abd5c0e88db403
|
data/CHANGELOG.md
ADDED
@@ -13,43 +13,41 @@ DependencyDetection.defer do
|
|
13
13
|
end
|
14
14
|
|
15
15
|
executes do
|
16
|
-
class EventMachine::
|
17
|
-
def
|
18
|
-
|
16
|
+
class EventMachine::HttpClient
|
17
|
+
def initialize_with_newrelic(conn, options)
|
18
|
+
initialize_without_newrelic(conn, options)
|
19
19
|
|
20
|
-
|
20
|
+
wrapped_request = ::NewRelic::Agent::HTTPClients::EmHttpRequest.new(self)
|
21
|
+
@newrelic_segment = ::NewRelic::Agent::Tracer.start_external_request_segment(
|
21
22
|
library: wrapped_request.type,
|
22
23
|
uri: wrapped_request.uri,
|
23
24
|
procedure: wrapped_request.method
|
24
25
|
)
|
25
|
-
|
26
|
-
client.callback do
|
27
|
-
wrapped_response = ::NewRelic::Agent::HTTPClients::EmHttpResponse.new(client)
|
28
|
-
client.newrelic_segment.read_response_headers wrapped_response
|
29
|
-
client.newrelic_segment.finish
|
30
|
-
end
|
31
|
-
|
32
|
-
activate_connection_without_newrelic(client)
|
33
26
|
end
|
34
27
|
|
35
|
-
alias_method :
|
36
|
-
alias_method :
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
executes do
|
41
|
-
class EventMachine::HttpClient
|
42
|
-
attr_accessor :newrelic_segment
|
28
|
+
alias_method :initialize_without_newrelic, :initialize
|
29
|
+
alias_method :initialize, :initialize_with_newrelic
|
43
30
|
|
44
31
|
def send_request_with_newrelic(head, body)
|
45
32
|
wrapped_request = ::NewRelic::Agent::HTTPClients::EmHttpRequest.new(self, head)
|
46
|
-
newrelic_segment.add_request_headers wrapped_request
|
33
|
+
@newrelic_segment.add_request_headers wrapped_request
|
34
|
+
|
47
35
|
send_request_without_newrelic(head, body)
|
48
36
|
end
|
49
37
|
|
50
38
|
alias_method :send_request_without_newrelic, :send_request
|
51
39
|
alias_method :send_request, :send_request_with_newrelic
|
40
|
+
|
41
|
+
def succeed_with_newrelic(client)
|
42
|
+
wrapped_response = ::NewRelic::Agent::HTTPClients::EmHttpResponse.new(self)
|
43
|
+
@newrelic_segment.read_response_headers wrapped_response
|
44
|
+
@newrelic_segment.finish
|
45
|
+
|
46
|
+
succeed_without_newrelic(client)
|
47
|
+
end
|
48
|
+
|
49
|
+
alias_method :succeed_without_newrelic, :succeed
|
50
|
+
alias_method :succeed, :succeed_with_newrelic
|
52
51
|
end
|
53
52
|
end
|
54
|
-
|
55
53
|
end
|
data/newrelic_em_http.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_em_http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andriy Yanko
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: newrelic_rpm
|
@@ -104,6 +104,7 @@ files:
|
|
104
104
|
- ".gitignore"
|
105
105
|
- ".rspec"
|
106
106
|
- ".travis.yml"
|
107
|
+
- CHANGELOG.md
|
107
108
|
- Gemfile
|
108
109
|
- README.md
|
109
110
|
- Rakefile
|
@@ -131,8 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
131
132
|
- !ruby/object:Gem::Version
|
132
133
|
version: '0'
|
133
134
|
requirements: []
|
134
|
-
|
135
|
-
rubygems_version: 2.7.6
|
135
|
+
rubygems_version: 3.0.3
|
136
136
|
signing_key:
|
137
137
|
specification_version: 4
|
138
138
|
summary: EM::HTTP instrumentation for New Relic RPM
|