newrelic_rpm 8.16.0 → 9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -28
- data/.rubocop_todo.yml +41 -3
- data/CHANGELOG.md +126 -0
- data/CONTRIBUTING.md +1 -1
- data/README.md +3 -1
- data/bin/nrdebug +16 -16
- data/lib/new_relic/agent/agent_helpers/connect.rb +1 -1
- data/lib/new_relic/agent/agent_helpers/special_startup.rb +1 -2
- data/lib/new_relic/agent/attribute_filter.rb +0 -2
- data/lib/new_relic/agent/commands/thread_profiler_session.rb +3 -3
- data/lib/new_relic/agent/configuration/default_source.rb +98 -474
- data/lib/new_relic/agent/configuration/high_security_source.rb +0 -2
- data/lib/new_relic/agent/configuration/security_policy_source.rb +0 -16
- data/lib/new_relic/agent/database.rb +0 -14
- data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +1 -2
- data/lib/new_relic/agent/error_collector.rb +1 -1
- data/lib/new_relic/agent/error_filter.rb +3 -3
- data/lib/new_relic/agent/instrumentation/active_job.rb +1 -1
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/fiber/chain.rb +20 -0
- data/lib/new_relic/agent/instrumentation/fiber/instrumentation.rb +24 -0
- data/lib/new_relic/agent/instrumentation/fiber/prepend.rb +18 -0
- data/lib/new_relic/agent/instrumentation/fiber.rb +25 -0
- data/lib/new_relic/agent/instrumentation/grape.rb +1 -1
- data/lib/new_relic/agent/instrumentation/memcache.rb +2 -2
- data/lib/new_relic/agent/instrumentation/net_http.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +1 -8
- data/lib/new_relic/agent/instrumentation/rake.rb +1 -1
- data/lib/new_relic/agent/instrumentation/redis.rb +1 -1
- data/lib/new_relic/agent/instrumentation/resque.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sequel.rb +4 -5
- data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +3 -7
- data/lib/new_relic/agent/monitors/cross_app_monitor.rb +0 -1
- data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +0 -1
- data/lib/new_relic/agent/new_relic_service.rb +1 -1
- data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +0 -1
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +1 -1
- data/lib/new_relic/agent/tracer.rb +10 -1
- data/lib/new_relic/agent/transaction/abstract_segment.rb +2 -2
- data/lib/new_relic/agent/transaction/tracing.rb +2 -2
- data/lib/new_relic/agent/transaction.rb +17 -16
- data/lib/new_relic/agent.rb +1 -19
- data/lib/new_relic/cli/commands/install.rb +9 -9
- data/lib/new_relic/control/instance_methods.rb +1 -1
- data/lib/new_relic/local_environment.rb +0 -10
- data/lib/new_relic/supportability_helper.rb +0 -1
- data/lib/new_relic/version.rb +2 -2
- data/lib/newrelic_rpm.rb +1 -1
- data/lib/sequel/extensions/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +3 -3
- data/lib/sequel/plugins/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +3 -3
- data/lib/tasks/helpers/format.rb +1 -1
- data/lib/tasks/instrumentation_generator/instrumentation.thor +7 -10
- data/lib/tasks/instrumentation_generator/templates/Envfile.tt +1 -1
- data/newrelic.yml +5 -8
- data/newrelic_rpm.gemspec +16 -13
- metadata +13 -14
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +0 -83
- data/lib/new_relic/agent/instrumentation/authlogic.rb +0 -33
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +0 -215
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +0 -36
- data/lib/new_relic/agent/instrumentation/sunspot.rb +0 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4283d6fa7224688ad73c78ae5b36f499eb377c96b0511050b588ac2b0884d8e
|
4
|
+
data.tar.gz: a10eafed3eaef851da18ba4b4bc8b8c3984f2fd4d7291750be84c418ba942132
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e680bc7110e8fd9efd9e25ec3559512c74f7f254922a73f80b79cefbef1f5a88d43c6b68cefe4297f64cc430b96e0a561e9980abaa6c7074a51dd8b8f5f13fb0
|
7
|
+
data.tar.gz: 0530bc3faa79c4259eee31482bf08adeea08966fead73979f65c7c17f0f33293b905c265a125fd69318f0130c48ae61ab5a4071fa9a1be101c0e47bba2b61abd
|
data/.rubocop.yml
CHANGED
@@ -1081,18 +1081,6 @@ Performance/MapCompact:
|
|
1081
1081
|
Performance/MethodObjectAsBlock:
|
1082
1082
|
Enabled: false
|
1083
1083
|
|
1084
|
-
# TODO: OLD RUBIES - Requires 2.4
|
1085
|
-
Performance/RegexpMatch:
|
1086
|
-
Enabled: false
|
1087
|
-
|
1088
|
-
# TODO: OLD RUBIES - Requires 2.4
|
1089
|
-
Performance/Sum:
|
1090
|
-
Enabled: false
|
1091
|
-
|
1092
|
-
# TODO: OLD RUBIES - Requires 2.3
|
1093
|
-
Performance/UnfreezeString:
|
1094
|
-
Enabled: false
|
1095
|
-
|
1096
1084
|
# Disabling for now
|
1097
1085
|
Security/Eval:
|
1098
1086
|
Enabled: false
|
@@ -1330,11 +1318,6 @@ Style/ExplicitBlockArgument:
|
|
1330
1318
|
Style/ExponentialNotation:
|
1331
1319
|
Enabled: false
|
1332
1320
|
|
1333
|
-
# TODO: MAJOR VERSION - Re-enable FetchEnvVar after dropping support for Ruby 2.2
|
1334
|
-
# Ruby 2.3+ allows for ENV.fetch('KEY') { default }
|
1335
|
-
Style/FetchEnvVar:
|
1336
|
-
Enabled: false
|
1337
|
-
|
1338
1321
|
Style/FloatDivision:
|
1339
1322
|
Enabled: false
|
1340
1323
|
|
@@ -1740,17 +1723,6 @@ Style/RescueStandardError:
|
|
1740
1723
|
Style/ReturnNil:
|
1741
1724
|
Enabled: false
|
1742
1725
|
|
1743
|
-
# Can't use, not available in Ruby 2.2
|
1744
|
-
Style/SafeNavigation:
|
1745
|
-
Enabled: false
|
1746
|
-
# ConvertCodeThatCanStartToReturnNil: false
|
1747
|
-
# AllowedMethods:
|
1748
|
-
# - present?
|
1749
|
-
# - blank?
|
1750
|
-
# - presence
|
1751
|
-
# - try
|
1752
|
-
# - try!
|
1753
|
-
|
1754
1726
|
Style/Sample:
|
1755
1727
|
Enabled: true
|
1756
1728
|
|
data/.rubocop_todo.yml
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2023-02-02 15:27:55 UTC using RuboCop version 1.44.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 422
|
10
10
|
# Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods, CountRepeatedAttributes.
|
11
11
|
Metrics/AbcSize:
|
12
12
|
Max: 54
|
@@ -31,7 +31,13 @@ Minitest/DuplicateTestRun:
|
|
31
31
|
- 'test/multiverse/suites/rails/error_tracing_test.rb'
|
32
32
|
- 'test/multiverse/suites/sinatra/ignoring_test.rb'
|
33
33
|
|
34
|
-
# Offense count:
|
34
|
+
# Offense count: 1
|
35
|
+
# This cop supports safe autocorrection (--autocorrect).
|
36
|
+
Minitest/EmptyLineBeforeAssertionMethods:
|
37
|
+
Exclude:
|
38
|
+
- 'test/new_relic/agent_test.rb'
|
39
|
+
|
40
|
+
# Offense count: 269
|
35
41
|
Minitest/MultipleAssertions:
|
36
42
|
Max: 28
|
37
43
|
|
@@ -57,6 +63,38 @@ Minitest/EmptyLineBeforeAssertionMethods:
|
|
57
63
|
- 'test/new_relic/agent_test.rb'
|
58
64
|
- 'test/new_relic/cli/commands/deployments_test.rb'
|
59
65
|
|
66
|
+
# Offense count: 23
|
67
|
+
# This cop supports safe autocorrection (--autocorrect).
|
68
|
+
Performance/RegexpMatch:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
# Offense count: 1
|
72
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
73
|
+
# Configuration parameters: OnlySumOrWithInitialValue.
|
74
|
+
Performance/Sum:
|
75
|
+
Exclude:
|
76
|
+
- 'lib/new_relic/agent/system_info.rb'
|
77
|
+
|
78
|
+
# Offense count: 72
|
79
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
80
|
+
Performance/UnfreezeString:
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
# Offense count: 21
|
84
|
+
# This cop supports safe autocorrection (--autocorrect).
|
85
|
+
# Configuration parameters: AllowedVars.
|
86
|
+
Style/FetchEnvVar:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
# Offense count: 1
|
90
|
+
# This cop supports safe autocorrection (--autocorrect).
|
60
91
|
Style/RedundantStringEscape:
|
61
92
|
Exclude:
|
62
93
|
- 'test/new_relic/agent/logging_test.rb'
|
94
|
+
|
95
|
+
# Offense count: 115
|
96
|
+
# This cop supports unsafe autocorrection (--autocorrect-all).
|
97
|
+
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
|
98
|
+
# AllowedMethods: present?, blank?, presence, try, try!
|
99
|
+
Style/SafeNavigation:
|
100
|
+
Enabled: false
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,131 @@
|
|
1
1
|
# New Relic Ruby Agent Release Notes
|
2
2
|
|
3
|
+
## v9.0.0
|
4
|
+
|
5
|
+
Version 9.0.0 of the agent removes several deprecated configuration options and API methods, enables Thread tracing by default, adds Fiber instrumentation, removes support for Ruby versions 2.2 and 2.3, removes instrumentation for several deprecated gems, changes how the API method `set_transaction_name` works, and updates `rails_defer_initialization` to be an environment variable only configuration option.
|
6
|
+
|
7
|
+
|
8
|
+
- **Remove deprecated configuration options**
|
9
|
+
|
10
|
+
The following configuration options have been removed and will no longer work. Please update all configs to use the replacements listed below. [PR#1782](https://github.com/newrelic/newrelic-ruby-agent/pull/1782)
|
11
|
+
|
12
|
+
| Removed | Replacement | `newrelic.yml` example |
|
13
|
+
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------- |
|
14
|
+
| `analytics_events.capture_attributes` | `transaction_events.attributes.enabled` | `transaction_events.attributes.enabled: false` |
|
15
|
+
| `browser_monitoring.capture_attributes` | `browser_monitoring.attributes.enabled` | `browser_monitoring.attributes.enabled: false` |
|
16
|
+
| `error_collector.capture_attributes` | `error_collector.attributes.enabled` | `error_collector.attributes.enabled: false` |
|
17
|
+
| `resque.capture_params` | `attributes.include` | `attributes.include: ['job.resque.args.*']` |
|
18
|
+
| `sidekiq.capture_params` | `attributes.include` | `attributes.include: ['job.sidekiq.args.*']` |
|
19
|
+
| `transaction_tracer.capture_attributes` | `transaction_tracer.attributes.enabled` | `transaction_tracer.attributes.enabled: false` |
|
20
|
+
| `error_collector.ignore_errors` | `error_collector.ignore_classes` | `error_collector.ignore_classes: ['ActionController::RoutingError', 'CustomError']` |
|
21
|
+
| `analytics_events.enabled` | `transaction_events.enabled` | `transaction_events.enabled: false` |
|
22
|
+
| `analytics_events.max_samples_stored` | `transaction_events.max_samples_stored` | `transaction_events.max_samples_stored: 1200` |
|
23
|
+
| `disable_database_instrumentation` | `disable_sequel_instrumentation` | `disable_sequel_instrumentation: true` |
|
24
|
+
| `disable_bunny` | `instrumentation.bunny` | `instrumentation.bunny: disabled` |
|
25
|
+
| `disable_curb` | `instrumentation.curb` | `instrumentation.curb: disabled` |
|
26
|
+
| `disable_dj` | `instrumentation.delayed_job` | `instrumentation.delayed_job: disabled` |
|
27
|
+
| `disable_excon` | `instrumentation.excon` | `instrumentation.excon: disabled` |
|
28
|
+
| `disable_grape` | `instrumentation.grape` | `instrumentation.grape: disabled` |
|
29
|
+
| `disable_grape_instrumentation` | `instrumentation.grape` | `instrumentation.grape: disabled` |
|
30
|
+
| `disable_httpclient` | `instrumentation.httpclient` | `instrumentation.httpcient: disabled` |
|
31
|
+
| `disable_httprb` | `instrumentation.httprb` | `instrumentation.httprb: disabled` |
|
32
|
+
| `disable_dalli` | `instrumentation.memcache` | `instrumentation.memcache: disabled` |
|
33
|
+
| `disable_dalli_cas_client` | `instrumentation.memcache` | `instrumentation.memcache: disabled` |
|
34
|
+
| `disable_memcache_client` | `instrumentation.memcache-client` | `instrumentation.memcache-client: disabled` |
|
35
|
+
| `disable_memcache_instrumentation` | `instrumentation.memcache` | `instrumentation.memcache: disabled` |
|
36
|
+
| `disable_memcached` | `instrumentation.memcached` | `instrumentation.memcached: disabled` |
|
37
|
+
| `disable_mongo` | `instrumentation.mongo` | `instrumentation.mongo: disabled` |
|
38
|
+
| `disable_net_http` | `instrumentation.net_http` | `instrumentation.net_http: disabled` |
|
39
|
+
| `prepend_net_instrumentation` | `instrumentation.net_http` | `instrumentation.net_http: prepend` |
|
40
|
+
| `disable_puma_rack` | `instrumentation.puma_rack` | `instrumentation.puma_rack: disabled` |
|
41
|
+
| `disable_puma_rack_urlmap` | `instrumentation.puma_rack_urlmap` | `instrumentation.puma_rack_urlmap: disabled` |
|
42
|
+
| `disable_rack` | `instrumentation.rack` | `instrumentation.rack: disabled` |
|
43
|
+
| `disable_rack_urlmap` | `instrumentation.rack_urlmap` | `instrumentation.rack_urlmap: disabled` |
|
44
|
+
| `disable_redis` | `instrumentation.redis` | `instrumentation.redis: disabled` |
|
45
|
+
| `disable_redis_instrumentation` | `instrumentation.redis` | `instrumentation.redis: disabled` |
|
46
|
+
| `disable_resque` | `instrumentation.resque` | `instrumentation.resque: disabled` |
|
47
|
+
| `disable_sinatra` | `instrumentation.sinatra` | `instrumentation.sinatra: disabled` |
|
48
|
+
| `disable_rake` | `instrumentation.rake` | `instrumentation.rake: disabled` |
|
49
|
+
| `disable_rake_instrumentation` | `instrumentation.rake` | `instrumentation.rake: disabled` |
|
50
|
+
| `disable_typhoeus` | `instrumentation.typhoeus` | `instrumentation.typhoeus: disabled` |
|
51
|
+
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
- **Enable Thread instrumentation by default**
|
56
|
+
|
57
|
+
The configuration option `instrumentation.thread.tracing` is now enabled by default. This configuration allows the agent to properly monitor code occurring inside threads. In Ruby agent 9.0, instrumented code within threads will be recorded and associated with the current transaction when the thread was created.
|
58
|
+
|
59
|
+
This may be a breaking change if you are currently using custom thread instrumentation. New transactions inside of threads will no longer be started if one already exists. [PR#1767](https://github.com/newrelic/newrelic-ruby-agent/pull/1767)
|
60
|
+
|
61
|
+
- **Add Fiber instrumentation**
|
62
|
+
|
63
|
+
`Fiber` instances are now automatically instrumented similarly to `Thread` instances. This can be [configured](https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration/#instrumentation-fiber) using `instrumentation.fiber`. [PR#1802](https://github.com/newrelic/newrelic-ruby-agent/pull/1802)
|
64
|
+
|
65
|
+
|
66
|
+
- **Removed support for Ruby 2.2 and 2.3**
|
67
|
+
|
68
|
+
Ruby 2.2 and 2.3 are no longer supported by the Ruby agent. To continue using the latest Ruby Agent version, please update to Ruby 2.4.0 or above. [PR#1778](https://github.com/newrelic/newrelic-ruby-agent/pull/1778)
|
69
|
+
|
70
|
+
- **Removed deprecated instrumentation**
|
71
|
+
|
72
|
+
Instrumentation for the following gems had been previously deprecated and has now been removed. [PR#1788](https://github.com/newrelic/newrelic-ruby-agent/pull/1788)
|
73
|
+
- Acts As Solr
|
74
|
+
- Authlogic
|
75
|
+
- DataMapper
|
76
|
+
- Rainbows
|
77
|
+
- Sunspot
|
78
|
+
|
79
|
+
Versions of the following technologies had been previously deprecated and are no longer supported.
|
80
|
+
|
81
|
+
- Passenger: 2.2.x - 4.0.x
|
82
|
+
- Puma: 2.0.x
|
83
|
+
- Grape: 0.2.0
|
84
|
+
- Padrino: 0.14.x
|
85
|
+
- Rails: 3.2.x
|
86
|
+
- Sinatra: 1.4.x, 1.5.x
|
87
|
+
- Mongo: 1.8.x - 2.3.x
|
88
|
+
- Sequel: 3.37.x, 4.0.x
|
89
|
+
- Delayed_Job: 2.0.x - 4.0.x
|
90
|
+
- Sidekiq: 4.2.x
|
91
|
+
- Excon: below 0.55.0
|
92
|
+
- HttpClient: 2.2.0 - 2.8.0
|
93
|
+
- HttpRb: 0.9.9 - 2.2.1
|
94
|
+
- Typhoeus: 0.5.3 - 1.2.x
|
95
|
+
- Bunny: 2.0.x - 2.6.x
|
96
|
+
- ActiveMerchant: 1.25.0 - 1.64.x
|
97
|
+
|
98
|
+
|
99
|
+
- **Updated API method `set_transaction_name`**
|
100
|
+
|
101
|
+
When the method `NewRelic::Agent.set_transaction_name` is called, it will now always change the name and category of the currently running transaction to what is passed into the method. This is a change from previous agent versions.
|
102
|
+
|
103
|
+
Previously, if `set_transaction_name` was called with a new transaction name and a new category that did not match the category already assigned to a transaction, neither the new name nor category would be saved to the transaction. If this method is being called in a situation in which it was previously ignored due to category differences, this will now change the name and category of the transaction. [PR#1797](https://github.com/newrelic/newrelic-ruby-agent/pull/1797)
|
104
|
+
|
105
|
+
- **Removed API method: `NewRelic::Agent.disable_transaction_tracing`**
|
106
|
+
|
107
|
+
The deprecated API method `NewRelic::Agent.disable_transaction_tracing` has been removed. Instead use either `NewRelic::Agent#ignore_transaction` to disable the recording of the current transaction or `NewRelic::Agent.disable_all_tracing` to yield a block without collecting any metrics or traces in any of the subsequent calls. [PR#1792](https://github.com/newrelic/newrelic-ruby-agent/pull/1792)
|
108
|
+
|
109
|
+
- **Renamed ActiveJob metrics**
|
110
|
+
|
111
|
+
Previously, ActiveJob was categorized as a message broker, which is inaccurate. We've updated the naming of ActiveJob traces from leading with `MessageBroker/ActiveJob` to simply leading with `ActiveJob`. [PR#1811](https://github.com/newrelic/newrelic-ruby-agent/pull/1811)
|
112
|
+
|
113
|
+
- **Code cleanup**
|
114
|
+
|
115
|
+
Thank you to community member [@esquith](https://github.com/esquith) for contributing some cleanup of orphaned constants in our code base. [PR#1793](https://github.com/newrelic/newrelic-ruby-agent/pull/1793) [PR#1794](https://github.com/newrelic/newrelic-ruby-agent/pull/1794) [PR#1808](https://github.com/newrelic/newrelic-ruby-agent/pull/1808)
|
116
|
+
|
117
|
+
Community member [@fchatterji](https://github.com/fchatterji) helped standardize how we reference `NewRelic` throughout our codebase [PR#1795](https://github.com/newrelic/newrelic-ruby-agent/pull/1795) and updated our README's community header [PR#1815](https://github.com/newrelic/newrelic-ruby-agent/pull/1815). Thanks fchatterji!
|
118
|
+
|
119
|
+
|
120
|
+
- **Bugfix: Allow rails initialization to be deferred by environment variable**
|
121
|
+
|
122
|
+
The Ruby agent may force some Rails libraries to load on agent initialization, preventing some settings defined in `config/initializers` from being applied. Changing the initialization process to run after `config/initializers`, however, may break the configuration for other gems (ex. Roadie Rails).
|
123
|
+
|
124
|
+
For those having troubles with agent initialization and Rails initializers, you can now pass the environment variable `NEW_RELIC_DEFER_RAILS_INITIALIZATION=true` to make the agent initialize after `config/initializers` are run. This config option can only be set using an environment variable and can't be set using YAML. [PR#1791](https://github.com/newrelic/newrelic-ruby-agent/pull/1791)
|
125
|
+
|
126
|
+
Thanks to [@jdelStrother](https://github.com/jdelStrother) for bringing this issue to our attention and testing our fixes along the way. [Issue#662](https://github.com/newrelic/newrelic-ruby-agent/issues/662)
|
127
|
+
|
128
|
+
|
3
129
|
## 8.16.0
|
4
130
|
|
5
131
|
Version 8.16.0 introduces more Ruby on Rails instrumentation (especially for Rails 6 and 7) for various Action\*/Active\* libraries whose actions produce [Active Support notifications events](https://guides.rubyonrails.org/active_support_instrumentation.html).
|
data/CONTRIBUTING.md
CHANGED
@@ -94,7 +94,7 @@ includes unreleased work. Please create all new branches off of `dev`.
|
|
94
94
|
- Fork the repository inside GitHub
|
95
95
|
- `git clone git@github.com:<gh username>/newrelic-ruby-agent.git`
|
96
96
|
1. Pick a Ruby version
|
97
|
-
- Use rbenv, rvm, chruby, asdf, etc. to install any version of Ruby between 2.
|
97
|
+
- Use rbenv, rvm, chruby, asdf, etc. to install any version of Ruby between 2.4 up to the latest stable version
|
98
98
|
1. Install development dependencies
|
99
99
|
- `bundle install`
|
100
100
|
1. Check that your env is setup correctly
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
[![
|
1
|
+
[![Community Plus header](https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
|
2
2
|
|
3
3
|
|
4
4
|
# New Relic Ruby Agent
|
@@ -12,6 +12,8 @@ to help you improve the customer experience and make data-driven business decisi
|
|
12
12
|
The New Relic Ruby agent is dual-purposed as either a Gem or a Rails plugin,
|
13
13
|
hosted on [github](https://github.com/newrelic/newrelic-ruby-agent).
|
14
14
|
|
15
|
+
This code is actively maintained by New Relic engineering teams and delivered here in GitHub. See below for troubleshooting and defect reporting instructions.
|
16
|
+
|
15
17
|
[![Gem Version](https://badge.fury.io/rb/newrelic_rpm.svg)](https://badge.fury.io/rb/newrelic_rpm)
|
16
18
|
|
17
19
|
## Supported Environments
|
data/bin/nrdebug
CHANGED
@@ -155,7 +155,7 @@ class RubyProcess
|
|
155
155
|
def gdb_script_body(backtrace_file)
|
156
156
|
backtrace_gathering_code = 'Thread.list.each { |t| bt = t.backtrace rescue nil; ' \
|
157
157
|
'puts \"#{t.inspect}\n#{bt && bt.join(\"\n\")}\n\n\" }'
|
158
|
-
|
158
|
+
<<~END
|
159
159
|
attach #{pid}
|
160
160
|
t a a bt
|
161
161
|
call (void)close(1)
|
@@ -247,21 +247,21 @@ class ProcessReport
|
|
247
247
|
end
|
248
248
|
|
249
249
|
def prompt_for_confirmation(target_pid, target_cmd)
|
250
|
-
puts
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
250
|
+
puts <<~PROMPT
|
251
|
+
Are you sure you want to attach to PID #{target_pid} ('#{target_cmd}')}?
|
252
|
+
|
253
|
+
************************** !WARNING! **************************
|
254
|
+
Extracting debug information from this process may cause it to CRASH OR HANG.
|
255
|
+
|
256
|
+
It is highly recommended that you only run this script against processes that
|
257
|
+
are already unresponsive.
|
258
|
+
|
259
|
+
Additionally, the output may contain sensitive information from the program's
|
260
|
+
command line arguments, environment, or open file list. Please examine the
|
261
|
+
output before sharing it.
|
262
|
+
************************** !WARNING! **************************
|
263
|
+
|
264
|
+
To continue, type 'continue':
|
265
265
|
PROMPT
|
266
266
|
|
267
267
|
until $stdin.gets.strip == 'continue'
|
@@ -10,8 +10,7 @@ module NewRelic
|
|
10
10
|
# requests, we need to wait until the children are forked
|
11
11
|
# before connecting, otherwise the parent process sends useless data
|
12
12
|
def using_forking_dispatcher?
|
13
|
-
|
14
|
-
if [:puma, :passenger, :rainbows, :unicorn].include?(Agent.config[:dispatcher])
|
13
|
+
if [:puma, :passenger, :unicorn].include?(Agent.config[:dispatcher])
|
15
14
|
::NewRelic::Agent.logger.info("Deferring startup of agent reporting thread because " \
|
16
15
|
"#{Agent.config[:dispatcher]} may fork.")
|
17
16
|
true
|
@@ -124,8 +124,6 @@ module NewRelic
|
|
124
124
|
|
125
125
|
def prep_capture_params_rules(config)
|
126
126
|
build_rule(['request.parameters.*'], include_destinations_for_capture_params(config[:capture_params]), true)
|
127
|
-
build_rule(['job.resque.args.*'], include_destinations_for_capture_params(config[:'resque.capture_params']), true)
|
128
|
-
build_rule(['job.sidekiq.args.*'], include_destinations_for_capture_params(config[:'sidekiq.capture_params']), true)
|
129
127
|
end
|
130
128
|
|
131
129
|
def prep_datastore_rules(config)
|
@@ -89,9 +89,9 @@ module NewRelic
|
|
89
89
|
end
|
90
90
|
|
91
91
|
def raise_unsupported_error
|
92
|
-
msg =
|
93
|
-
Thread profiling is not supported for Resque processes. If you did not intend to
|
94
|
-
profile a Resque process, profiling again might select an appropriate agent.
|
92
|
+
msg = <<~EOF
|
93
|
+
Thread profiling is not supported for Resque processes. If you did not intend to
|
94
|
+
profile a Resque process, profiling again might select an appropriate agent.
|
95
95
|
EOF
|
96
96
|
raise_command_error(msg)
|
97
97
|
end
|