newrelic_rpm 4.8.0.341 → 5.0.0.342

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.
Files changed (33) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +27 -0
  3. data/CHANGELOG.md +39 -0
  4. data/config.dot +0 -3
  5. data/lib/new_relic/agent/{throughput_monitor.rb → adaptive_sampler.rb} +22 -13
  6. data/lib/new_relic/agent/agent.rb +3 -4
  7. data/lib/new_relic/agent/configuration/default_source.rb +22 -17
  8. data/lib/new_relic/agent/configuration/high_security_source.rb +0 -2
  9. data/lib/new_relic/agent/database.rb +5 -0
  10. data/lib/new_relic/agent/database/explain_plan_helpers.rb +11 -0
  11. data/lib/new_relic/agent/distributed_trace_monitor.rb +4 -2
  12. data/lib/new_relic/agent/distributed_trace_payload.rb +88 -119
  13. data/lib/new_relic/agent/external.rb +14 -0
  14. data/lib/new_relic/agent/heap.rb +140 -0
  15. data/lib/new_relic/agent/instrumentation/bunny.rb +5 -1
  16. data/lib/new_relic/agent/instrumentation/rails5/action_cable.rb +5 -1
  17. data/lib/new_relic/agent/messaging.rb +10 -0
  18. data/lib/new_relic/agent/new_relic_service.rb +43 -23
  19. data/lib/new_relic/agent/priority_sampled_buffer.rb +68 -0
  20. data/lib/new_relic/agent/supported_versions.rb +1 -1
  21. data/lib/new_relic/agent/transaction.rb +14 -8
  22. data/lib/new_relic/agent/transaction/distributed_tracing.rb +113 -55
  23. data/lib/new_relic/agent/transaction/external_request_segment.rb +17 -11
  24. data/lib/new_relic/agent/transaction/message_broker_segment.rb +12 -4
  25. data/lib/new_relic/agent/transaction_error_primitive.rb +2 -8
  26. data/lib/new_relic/agent/transaction_event_aggregator.rb +16 -13
  27. data/lib/new_relic/agent/transaction_event_primitive.rb +5 -3
  28. data/lib/new_relic/agent/transaction_event_recorder.rb +3 -11
  29. data/lib/new_relic/recipes/capistrano3.rb +5 -2
  30. data/lib/new_relic/version.rb +2 -2
  31. data/newrelic_rpm.gemspec +3 -2
  32. metadata +38 -9
  33. data/lib/new_relic/agent/distributed_trace_priority_sampled_buffer.rb +0 -72
@@ -34,7 +34,10 @@ namespace :newrelic do
34
34
  user = fetch(:newrelic_user)
35
35
  license_key = fetch(:newrelic_license_key)
36
36
 
37
- unless scm == :none
37
+ has_scm_from_plugin = respond_to?(:scm_plugin_installed?) && scm_plugin_installed?
38
+ has_scm_from_config = defined?(scm) && !scm.nil? && scm != :none
39
+
40
+ if has_scm_from_plugin || has_scm_from_config
38
41
  changelog ||= lookup_changelog
39
42
  rev ||= fetch(:current_revision)
40
43
  end
@@ -69,7 +72,7 @@ namespace :newrelic do
69
72
 
70
73
  debug "Retrieving changelog for New Relic Deployment details"
71
74
 
72
- if scm == :git
75
+ if Rake::Task.task_defined?("git:check")
73
76
  log_command = "git --no-pager log --no-color --pretty=format:' * %an: %s' " +
74
77
  "--abbrev-commit --no-merges #{previous_revision}..#{current_revision}"
75
78
  `#{log_command}`
@@ -10,8 +10,8 @@ module NewRelic
10
10
  parts.compact.join('.')
11
11
  end
12
12
 
13
- MAJOR = 4
14
- MINOR = 8
13
+ MAJOR = 5
14
+ MINOR = 0
15
15
  TINY = 0
16
16
 
17
17
  begin
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.version = NewRelic::VERSION::STRING
11
11
  s.required_ruby_version = '>= 2.0.0'
12
12
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
13
- s.authors = [ "Matthew Wear", "Chris Pine", "Dana Scheider" ]
13
+ s.authors = [ "Matthew Wear", "Chris Pine", "Erin Dees" ]
14
14
  s.date = Time.now.strftime('%Y-%m-%d')
15
15
  s.licenses = ['New Relic']
16
16
  s.description = <<-EOS
@@ -47,7 +47,8 @@ EOS
47
47
  s.add_development_dependency 'yard'
48
48
  s.add_development_dependency 'rails', '~> 3.2.13'
49
49
  s.add_development_dependency 'json', '>= 2.0.2' if RUBY_VERSION >= '2.4.0' # possible bundler issue?
50
- s.add_development_dependency 'pry', '~> 0.9.12'
50
+ s.add_development_dependency 'pry-nav', '~> 0.2.4'
51
+ s.add_development_dependency 'pry-stack_explorer', '~> 0.4.9'
51
52
  s.add_development_dependency 'hometown', '~> 0.2.5'
52
53
 
53
54
  if RUBY_PLATFORM == 'java'
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: newrelic_rpm
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.0.341
4
+ version: 5.0.0.342
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Wear
8
8
  - Chris Pine
9
- - Dana Scheider
9
+ - Erin Dees
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2018-01-23 00:00:00.000000000 Z
13
+ date: 2018-03-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -83,19 +83,47 @@ dependencies:
83
83
  - !ruby/object:Gem::Version
84
84
  version: 3.2.13
85
85
  - !ruby/object:Gem::Dependency
86
- name: pry
86
+ name: json
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: 2.0.2
92
+ type: :development
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ version: 2.0.2
99
+ - !ruby/object:Gem::Dependency
100
+ name: pry-nav
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: 0.2.4
106
+ type: :development
107
+ prerelease: false
108
+ version_requirements: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - "~>"
111
+ - !ruby/object:Gem::Version
112
+ version: 0.2.4
113
+ - !ruby/object:Gem::Dependency
114
+ name: pry-stack_explorer
87
115
  requirement: !ruby/object:Gem::Requirement
88
116
  requirements:
89
117
  - - "~>"
90
118
  - !ruby/object:Gem::Version
91
- version: 0.9.12
119
+ version: 0.4.9
92
120
  type: :development
93
121
  prerelease: false
94
122
  version_requirements: !ruby/object:Gem::Requirement
95
123
  requirements:
96
124
  - - "~>"
97
125
  - !ruby/object:Gem::Version
98
- version: 0.9.12
126
+ version: 0.4.9
99
127
  - !ruby/object:Gem::Dependency
100
128
  name: hometown
101
129
  requirement: !ruby/object:Gem::Requirement
@@ -166,6 +194,7 @@ files:
166
194
  - init.rb
167
195
  - install.rb
168
196
  - lib/new_relic/agent.rb
197
+ - lib/new_relic/agent/adaptive_sampler.rb
169
198
  - lib/new_relic/agent/agent.rb
170
199
  - lib/new_relic/agent/agent_logger.rb
171
200
  - lib/new_relic/agent/attribute_filter.rb
@@ -208,7 +237,6 @@ files:
208
237
  - lib/new_relic/agent/deprecator.rb
209
238
  - lib/new_relic/agent/distributed_trace_monitor.rb
210
239
  - lib/new_relic/agent/distributed_trace_payload.rb
211
- - lib/new_relic/agent/distributed_trace_priority_sampled_buffer.rb
212
240
  - lib/new_relic/agent/encoding_normalizer.rb
213
241
  - lib/new_relic/agent/error_collector.rb
214
242
  - lib/new_relic/agent/error_event_aggregator.rb
@@ -219,6 +247,7 @@ files:
219
247
  - lib/new_relic/agent/event_loop.rb
220
248
  - lib/new_relic/agent/external.rb
221
249
  - lib/new_relic/agent/harvester.rb
250
+ - lib/new_relic/agent/heap.rb
222
251
  - lib/new_relic/agent/hostname.rb
223
252
  - lib/new_relic/agent/http_clients/abstract_request.rb
224
253
  - lib/new_relic/agent/http_clients/curb_wrappers.rb
@@ -308,6 +337,7 @@ files:
308
337
  - lib/new_relic/agent/pipe_channel_manager.rb
309
338
  - lib/new_relic/agent/pipe_service.rb
310
339
  - lib/new_relic/agent/prepend_supportability.rb
340
+ - lib/new_relic/agent/priority_sampled_buffer.rb
311
341
  - lib/new_relic/agent/range_extensions.rb
312
342
  - lib/new_relic/agent/rules_engine.rb
313
343
  - lib/new_relic/agent/rules_engine/replacement_rule.rb
@@ -335,7 +365,6 @@ files:
335
365
  - lib/new_relic/agent/threading/backtrace_node.rb
336
366
  - lib/new_relic/agent/threading/backtrace_service.rb
337
367
  - lib/new_relic/agent/threading/thread_profile.rb
338
- - lib/new_relic/agent/throughput_monitor.rb
339
368
  - lib/new_relic/agent/transaction.rb
340
369
  - lib/new_relic/agent/transaction/abstract_segment.rb
341
370
  - lib/new_relic/agent/transaction/attributes.rb
@@ -454,7 +483,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
454
483
  version: 1.3.1
455
484
  requirements: []
456
485
  rubyforge_project:
457
- rubygems_version: 2.4.5.1
486
+ rubygems_version: 2.7.3
458
487
  signing_key:
459
488
  specification_version: 4
460
489
  summary: New Relic Ruby Agent
@@ -1,72 +0,0 @@
1
- # encoding: utf-8
2
- # This file is distributed under New Relic's license terms.
3
- # See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.
4
-
5
- require 'new_relic/agent/event_buffer'
6
- require 'set'
7
-
8
- module NewRelic
9
- module Agent
10
- class DistributedTracePrioritySampledBuffer < SampledBuffer
11
- attr_reader :seen_lifetime, :captured_lifetime
12
-
13
- def initialize(capacity)
14
- @low_priority_indices = []
15
- @high_priority_indices = Set.new
16
- super
17
- end
18
-
19
- def append_sampled(x = nil, &blk)
20
- raise ArgumentError, "Expected argument or block, but received both" if x && blk
21
-
22
- @seen += 1
23
- @seen_lifetime += 1
24
- if @items.size < @capacity
25
- x = blk.call if block_given?
26
- insert_high_priority x
27
- @captured_lifetime += 1
28
- return x
29
- elsif !@low_priority_indices.empty? # overwite random low priority sample
30
- m = rand(@low_priority_indices.size)
31
- insert_high_priority x, @low_priority_indices.delete_at(m)
32
- return x
33
- else
34
- NewRelic::Agent.increment_metric "Supportability/DistributedTracing/SampledBufferFailure/BufferFull"
35
- return nil
36
- end
37
- end
38
-
39
- def append_event(x = nil, &blk)
40
- raise ArgumentError, "Expected argument or block, but received both" if x && blk
41
-
42
- if @items.size < @capacity
43
- x = blk.call if block_given?
44
- insert_low_priority x
45
- @captured_lifetime += 1
46
- return x
47
- else
48
- m = rand(@seen) # [0, @seen)
49
- if m < @capacity && !@high_priority_indices.include?(m)
50
- x = blk.call if block_given?
51
- insert_low_priority x, m
52
- return x
53
- else
54
- # discard current sample
55
- return nil
56
- end
57
- end
58
- end
59
-
60
- def insert_low_priority x, index = @items.size
61
- @items[index] = x
62
- @low_priority_indices << index
63
- end
64
-
65
- def insert_high_priority x, index = @items.size
66
- @items[index] = x
67
- @high_priority_indices << index
68
- end
69
- end
70
- end
71
- end
72
-