newrelic_rpm 8.16.0 → 9.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +4 -106
- data/.rubocop_todo.yml +13 -14
- data/.simplecov +2 -1
- data/Brewfile +1 -0
- data/CHANGELOG.md +225 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +1 -1
- data/Guardfile +8 -7
- data/README.md +3 -2
- data/Rakefile +8 -8
- data/Thorfile +1 -1
- data/bin/newrelic +1 -0
- data/bin/newrelic_cmd +1 -0
- data/bin/nrdebug +36 -36
- data/init.rb +1 -1
- data/lib/new_relic/agent/agent.rb +3 -16
- data/lib/new_relic/agent/agent_helpers/connect.rb +5 -10
- data/lib/new_relic/agent/agent_helpers/harvest.rb +4 -4
- data/lib/new_relic/agent/agent_helpers/shutdown.rb +5 -5
- data/lib/new_relic/agent/agent_helpers/special_startup.rb +3 -4
- data/lib/new_relic/agent/agent_helpers/start_worker_thread.rb +47 -39
- data/lib/new_relic/agent/agent_helpers/startup.rb +13 -13
- data/lib/new_relic/agent/agent_helpers/transmit.rb +6 -6
- data/lib/new_relic/agent/agent_logger.rb +9 -9
- data/lib/new_relic/agent/attribute_filter.rb +2 -4
- data/lib/new_relic/agent/attribute_processing.rb +2 -2
- data/lib/new_relic/agent/audit_logger.rb +5 -5
- data/lib/new_relic/agent/autostart.rb +1 -1
- data/lib/new_relic/agent/commands/agent_command.rb +2 -2
- data/lib/new_relic/agent/commands/agent_command_router.rb +5 -4
- data/lib/new_relic/agent/commands/thread_profiler_session.rb +8 -8
- data/lib/new_relic/agent/configuration/default_source.rb +200 -588
- data/lib/new_relic/agent/configuration/environment_source.rb +2 -2
- data/lib/new_relic/agent/configuration/high_security_source.rb +3 -5
- data/lib/new_relic/agent/configuration/manager.rb +15 -2
- data/lib/new_relic/agent/configuration/security_policy_source.rb +10 -26
- data/lib/new_relic/agent/configuration/server_source.rb +24 -24
- data/lib/new_relic/agent/configuration/yaml_source.rb +4 -4
- data/lib/new_relic/agent/connect/request_builder.rb +1 -1
- data/lib/new_relic/agent/connect/response_handler.rb +1 -1
- data/lib/new_relic/agent/custom_event_aggregator.rb +4 -4
- data/lib/new_relic/agent/database/explain_plan_helpers.rb +1 -1
- data/lib/new_relic/agent/database/obfuscation_helpers.rb +2 -2
- data/lib/new_relic/agent/database/obfuscator.rb +2 -2
- data/lib/new_relic/agent/database.rb +4 -18
- data/lib/new_relic/agent/datastores/metric_helper.rb +5 -5
- data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +11 -11
- data/lib/new_relic/agent/datastores/redis.rb +6 -6
- data/lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb +8 -10
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +10 -10
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +7 -7
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb +1 -1
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb +6 -6
- data/lib/new_relic/agent/distributed_tracing/trace_context.rb +7 -7
- data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +4 -4
- data/lib/new_relic/agent/distributed_tracing.rb +5 -5
- data/lib/new_relic/agent/error_collector.rb +36 -8
- data/lib/new_relic/agent/error_filter.rb +5 -5
- data/lib/new_relic/agent/error_trace_aggregator.rb +5 -4
- data/lib/new_relic/agent/event_loop.rb +3 -3
- data/lib/new_relic/agent/external.rb +1 -1
- data/lib/new_relic/agent/harvester.rb +1 -3
- data/lib/new_relic/agent/heap.rb +2 -1
- data/lib/new_relic/agent/hostname.rb +1 -1
- data/lib/new_relic/agent/http_clients/abstract.rb +9 -21
- data/lib/new_relic/agent/http_clients/curb_wrappers.rb +7 -3
- data/lib/new_relic/agent/http_clients/excon_wrappers.rb +7 -5
- data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +4 -0
- data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +6 -2
- data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +5 -1
- data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +8 -5
- data/lib/new_relic/agent/http_clients/uri_util.rb +2 -2
- data/lib/new_relic/agent/instrumentation/action_controller_other_subscriber.rb +5 -2
- data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +3 -2
- data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +3 -3
- data/lib/new_relic/agent/instrumentation/active_job.rb +2 -2
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +3 -3
- data/lib/new_relic/agent/instrumentation/active_record.rb +3 -2
- data/lib/new_relic/agent/instrumentation/active_record_helper.rb +38 -35
- data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +3 -3
- data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +2 -2
- data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +3 -2
- data/lib/new_relic/agent/instrumentation/bunny/chain.rb +1 -1
- data/lib/new_relic/agent/instrumentation/bunny/instrumentation.rb +3 -3
- data/lib/new_relic/agent/instrumentation/bunny.rb +1 -1
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +6 -4
- data/lib/new_relic/agent/instrumentation/curb/chain.rb +1 -1
- data/lib/new_relic/agent/instrumentation/curb/instrumentation.rb +5 -5
- data/lib/new_relic/agent/instrumentation/curb.rb +1 -1
- data/lib/new_relic/agent/instrumentation/custom_events_subscriber.rb +2 -1
- data/lib/new_relic/agent/instrumentation/delayed_job/chain.rb +1 -0
- data/lib/new_relic/agent/instrumentation/delayed_job/instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +2 -1
- data/lib/new_relic/agent/instrumentation/elasticsearch/chain.rb +2 -2
- data/lib/new_relic/agent/instrumentation/elasticsearch/instrumentation.rb +4 -3
- data/lib/new_relic/agent/instrumentation/elasticsearch.rb +2 -2
- data/lib/new_relic/agent/instrumentation/excon/middleware.rb +2 -1
- data/lib/new_relic/agent/instrumentation/excon.rb +3 -3
- 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/instrumentation.rb +4 -4
- data/lib/new_relic/agent/instrumentation/grape.rb +4 -4
- data/lib/new_relic/agent/instrumentation/grpc/client/chain.rb +1 -1
- data/lib/new_relic/agent/instrumentation/grpc/client/instrumentation.rb +3 -2
- data/lib/new_relic/agent/instrumentation/grpc/client/prepend.rb +1 -1
- data/lib/new_relic/agent/instrumentation/grpc/client/request_wrapper.rb +1 -1
- data/lib/new_relic/agent/instrumentation/grpc/server/instrumentation.rb +4 -4
- data/lib/new_relic/agent/instrumentation/grpc_client.rb +1 -1
- data/lib/new_relic/agent/instrumentation/grpc_server.rb +1 -1
- data/lib/new_relic/agent/instrumentation/httprb.rb +1 -1
- data/lib/new_relic/agent/instrumentation/ignore_actions.rb +1 -1
- data/lib/new_relic/agent/instrumentation/logger.rb +1 -1
- data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +3 -1
- data/lib/new_relic/agent/instrumentation/memcache/instrumentation.rb +2 -2
- data/lib/new_relic/agent/instrumentation/memcache/prepend.rb +3 -1
- data/lib/new_relic/agent/instrumentation/memcache.rb +10 -10
- data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +3 -3
- data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +1 -1
- data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +6 -6
- data/lib/new_relic/agent/instrumentation/net_http.rb +2 -2
- data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +1 -1
- data/lib/new_relic/agent/instrumentation/padrino/instrumentation.rb +3 -3
- data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +2 -2
- data/lib/new_relic/agent/instrumentation/rack/instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +3 -2
- data/lib/new_relic/agent/instrumentation/rails_middleware.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rake/instrumentation.rb +8 -15
- data/lib/new_relic/agent/instrumentation/rake.rb +3 -3
- data/lib/new_relic/agent/instrumentation/redis/constants.rb +1 -1
- data/lib/new_relic/agent/instrumentation/redis/instrumentation.rb +2 -1
- data/lib/new_relic/agent/instrumentation/redis.rb +1 -1
- data/lib/new_relic/agent/instrumentation/resque/helper.rb +1 -1
- data/lib/new_relic/agent/instrumentation/resque.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sequel.rb +8 -9
- data/lib/new_relic/agent/instrumentation/sequel_helper.rb +10 -10
- data/lib/new_relic/agent/instrumentation/sidekiq/extensions/delayed_class.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sidekiq/server.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +1 -0
- data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sinatra/instrumentation.rb +6 -5
- data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +1 -1
- data/lib/new_relic/agent/instrumentation/thread/instrumentation.rb +3 -7
- data/lib/new_relic/agent/instrumentation/tilt/instrumentation.rb +2 -1
- data/lib/new_relic/agent/instrumentation/typhoeus/instrumentation.rb +5 -5
- data/lib/new_relic/agent/javascript_instrumentor.rb +29 -24
- data/lib/new_relic/agent/linking_metadata.rb +2 -2
- data/lib/new_relic/agent/log_event_aggregator.rb +15 -15
- data/lib/new_relic/agent/logging.rb +73 -33
- data/lib/new_relic/agent/messaging.rb +7 -5
- data/lib/new_relic/agent/method_tracer.rb +7 -7
- data/lib/new_relic/agent/method_tracer_helpers.rb +1 -1
- data/lib/new_relic/agent/monitors/cross_app_monitor.rb +4 -5
- data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +1 -1
- data/lib/new_relic/agent/new_relic_service/encoders.rb +1 -1
- data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +2 -2
- data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +0 -1
- data/lib/new_relic/agent/new_relic_service.rb +15 -16
- data/lib/new_relic/agent/obfuscator.rb +1 -1
- data/lib/new_relic/agent/parameter_filtering.rb +6 -6
- data/lib/new_relic/agent/pipe_channel_manager.rb +7 -6
- data/lib/new_relic/agent/pipe_service.rb +5 -3
- data/lib/new_relic/agent/priority_sampled_buffer.rb +1 -1
- data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +0 -1
- data/lib/new_relic/agent/sampler.rb +2 -1
- data/lib/new_relic/agent/sampler_collection.rb +1 -1
- data/lib/new_relic/agent/samplers/cpu_sampler.rb +5 -5
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +9 -9
- data/lib/new_relic/agent/samplers/memory_sampler.rb +9 -9
- data/lib/new_relic/agent/samplers/object_sampler.rb +1 -1
- data/lib/new_relic/agent/span_event_aggregator.rb +4 -4
- data/lib/new_relic/agent/span_event_primitive.rb +2 -2
- data/lib/new_relic/agent/sql_sampler.rb +2 -2
- data/lib/new_relic/agent/stats.rb +1 -1
- data/lib/new_relic/agent/synthetics_event_aggregator.rb +1 -1
- data/lib/new_relic/agent/system_info.rb +10 -10
- data/lib/new_relic/agent/threading/agent_thread.rb +1 -1
- data/lib/new_relic/agent/threading/backtrace_node.rb +3 -3
- data/lib/new_relic/agent/threading/backtrace_service.rb +3 -7
- data/lib/new_relic/agent/threading/thread_profile.rb +5 -5
- data/lib/new_relic/agent/timestamp_sampled_buffer.rb +1 -1
- data/lib/new_relic/agent/tracer.rb +19 -9
- data/lib/new_relic/agent/transaction/abstract_segment.rb +54 -48
- data/lib/new_relic/agent/transaction/datastore_segment.rb +1 -1
- data/lib/new_relic/agent/transaction/distributed_tracer.rb +7 -6
- data/lib/new_relic/agent/transaction/distributed_tracing.rb +13 -14
- data/lib/new_relic/agent/transaction/external_request_segment.rb +11 -11
- data/lib/new_relic/agent/transaction/message_broker_segment.rb +1 -1
- data/lib/new_relic/agent/transaction/request_attributes.rb +2 -2
- data/lib/new_relic/agent/transaction/segment.rb +1 -1
- data/lib/new_relic/agent/transaction/synthetics_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction/trace.rb +1 -1
- data/lib/new_relic/agent/transaction/trace_context.rb +4 -4
- data/lib/new_relic/agent/transaction/trace_node.rb +8 -7
- data/lib/new_relic/agent/transaction/tracing.rb +10 -4
- data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction.rb +60 -52
- data/lib/new_relic/agent/transaction_error_primitive.rb +5 -5
- data/lib/new_relic/agent/transaction_event_aggregator.rb +4 -4
- data/lib/new_relic/agent/transaction_event_primitive.rb +3 -3
- data/lib/new_relic/agent/transaction_sampler.rb +3 -3
- data/lib/new_relic/agent/transaction_time_aggregator.rb +7 -3
- data/lib/new_relic/agent/utilization/aws.rb +1 -1
- data/lib/new_relic/agent/utilization/azure.rb +3 -3
- data/lib/new_relic/agent/utilization/gcp.rb +3 -3
- data/lib/new_relic/agent/utilization/pcf.rb +1 -1
- data/lib/new_relic/agent/utilization/vendor.rb +1 -1
- data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +1 -1
- data/lib/new_relic/agent/vm/mri_vm.rb +9 -8
- data/lib/new_relic/agent/worker_loop.rb +1 -1
- data/lib/new_relic/agent.rb +79 -35
- data/lib/new_relic/cli/command.rb +3 -3
- data/lib/new_relic/cli/commands/deployments.rb +26 -25
- data/lib/new_relic/cli/commands/install.rb +23 -23
- data/lib/new_relic/collection_helper.rb +2 -2
- data/lib/new_relic/constants.rb +7 -8
- data/lib/new_relic/control/class_methods.rb +3 -3
- data/lib/new_relic/control/frameworks/rails.rb +30 -18
- data/lib/new_relic/control/instance_methods.rb +6 -6
- data/lib/new_relic/control/instrumentation.rb +1 -15
- data/lib/new_relic/control/private_instance_methods.rb +1 -1
- data/lib/new_relic/dependency_detection.rb +14 -18
- data/lib/new_relic/environment_report.rb +4 -4
- data/lib/new_relic/helper.rb +2 -1
- data/lib/new_relic/language_support.rb +1 -1
- data/lib/new_relic/latest_changes.rb +5 -5
- data/lib/new_relic/local_environment.rb +0 -10
- data/lib/new_relic/noticed_error.rb +20 -18
- data/lib/new_relic/rack/browser_monitoring.rb +20 -16
- data/lib/new_relic/recipes/capistrano3.rb +1 -1
- data/lib/new_relic/recipes/capistrano_legacy.rb +6 -6
- data/lib/new_relic/recipes/helpers/send_deployment.rb +5 -5
- data/lib/new_relic/supportability_helper.rb +2 -1
- data/lib/new_relic/version.rb +3 -3
- data/lib/newrelic_rpm.rb +4 -4
- data/lib/sequel/extensions/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +5 -5
- data/lib/sequel/plugins/{newrelic_instrumentation.rb → new_relic_instrumentation.rb} +4 -4
- data/lib/tasks/config.rake +12 -12
- data/lib/tasks/coverage_report.rake +4 -4
- data/lib/tasks/helpers/format.rb +10 -10
- data/lib/tasks/helpers/removers.rb +5 -5
- data/lib/tasks/install.rake +4 -4
- data/lib/tasks/instrumentation_generator/instrumentation.thor +15 -18
- data/lib/tasks/instrumentation_generator/templates/Envfile.tt +1 -1
- data/lib/tasks/instrumentation_generator/templates/chain.tt +1 -1
- data/lib/tasks/instrumentation_generator/templates/dependency_detection.tt +1 -1
- data/lib/tasks/multiverse.rb +13 -6
- data/lib/tasks/newrelic.rb +1 -0
- data/lib/tasks/tests.rake +6 -6
- data/newrelic.yml +10 -13
- data/newrelic_rpm.gemspec +29 -26
- data/test/agent_helper.rb +25 -24
- metadata +84 -16
- 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
- data/lib/new_relic/agent/range_extensions.rb +0 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd188401ae5aad975a09ff40578156c88aac17e12320f41ce4bee8149c769aaf
|
4
|
+
data.tar.gz: e32201ee58712dd1520f03ae23a46bd1c804c2991b835151a68643c00cf140e3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf9190f9bece2103511dc53071120f3dc758dba82cf042c1892d3376dc73a7b66e8898908bfe8406d85ba49ad67f7c6f5b2826e8e9b2a07d29ea05f5a99b701c
|
7
|
+
data.tar.gz: 5a240785708c245119750b33df64e5467e7f9b8abf9daae8b568a452da1913f40862788323232928ecc6da489fc7b998118f2397293a55e4d371e3f0a1ae0ad5
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -6,7 +6,7 @@ require:
|
|
6
6
|
# Default performance configurations: https://github.com/rubocop/rubocop-performance/blob/master/config/default.yml
|
7
7
|
- rubocop-performance
|
8
8
|
# Default rake configurations: https://github.com/rubocop/rubocop-rake/blob/master/config/default.yml
|
9
|
-
|
9
|
+
- rubocop-rake
|
10
10
|
|
11
11
|
AllCops:
|
12
12
|
TargetRubyVersion: 2.7
|
@@ -66,7 +66,7 @@ Style/RedundantEach: # new in 1.38
|
|
66
66
|
Enabled: true
|
67
67
|
Style/RedundantInitialize: # new in 1.27
|
68
68
|
Enabled: true
|
69
|
-
Style/RedundantStringEscape: # new in 1.37
|
69
|
+
Style/RedundantStringEscape: # new in 1.37, 'pending' by default so enabled to make sure it's applied
|
70
70
|
Enabled: true
|
71
71
|
Style/YodaExpression: # new in 1.42
|
72
72
|
Enabled: true
|
@@ -140,7 +140,8 @@ Performance/StringIdentifierArgument: # new in 1.13
|
|
140
140
|
Enabled: true
|
141
141
|
Performance/StringInclude: # new in 1.7
|
142
142
|
Enabled: true
|
143
|
-
|
143
|
+
Performance/Sum: # new in 1.8, pending so left enabled explicitly until 2.0
|
144
|
+
Enabled: true
|
144
145
|
|
145
146
|
# Old cops
|
146
147
|
|
@@ -238,10 +239,6 @@ Layout/ClosingParenthesisIndentation:
|
|
238
239
|
Layout/CommentIndentation:
|
239
240
|
Enabled: true
|
240
241
|
|
241
|
-
# Disabling for now
|
242
|
-
Layout/ConditionPosition:
|
243
|
-
Enabled: false
|
244
|
-
|
245
242
|
Layout/DefEndAlignment:
|
246
243
|
Enabled: true
|
247
244
|
EnforcedStyleAlignWith: start_of_line
|
@@ -260,19 +257,9 @@ Layout/EmptyComment:
|
|
260
257
|
AllowBorderComment: true
|
261
258
|
AllowMarginComment: true
|
262
259
|
|
263
|
-
# Disabling for now
|
264
|
-
Layout/EmptyLineAfterMagicComment:
|
265
|
-
Enabled: false
|
266
|
-
|
267
260
|
Layout/EmptyLineAfterMultilineCondition:
|
268
261
|
Enabled: false
|
269
262
|
|
270
|
-
# Disabling for now
|
271
|
-
Layout/EmptyLineBetweenDefs:
|
272
|
-
Enabled: false
|
273
|
-
# AllowAdjacentOneLineDefs: false
|
274
|
-
# NumberOfEmptyLines: 1
|
275
|
-
|
276
263
|
Layout/EmptyLines:
|
277
264
|
Enabled: true
|
278
265
|
|
@@ -361,10 +348,6 @@ Layout/HashAlignment:
|
|
361
348
|
Layout/HeredocArgumentClosingParenthesis:
|
362
349
|
Enabled: false
|
363
350
|
|
364
|
-
# Disabling for now
|
365
|
-
Layout/HeredocIndentation:
|
366
|
-
Enabled: false
|
367
|
-
|
368
351
|
Layout/IndentationConsistency:
|
369
352
|
Enabled: true
|
370
353
|
EnforcedStyle: normal
|
@@ -504,11 +487,6 @@ Layout/SpaceBeforeFirstArg:
|
|
504
487
|
Layout/SpaceBeforeSemicolon:
|
505
488
|
Enabled: true
|
506
489
|
|
507
|
-
# Disabling for now
|
508
|
-
Layout/SpaceInLambdaLiteral:
|
509
|
-
Enabled: false
|
510
|
-
# EnforcedStyle: require_no_space
|
511
|
-
|
512
490
|
Layout/SpaceInsideArrayLiteralBrackets:
|
513
491
|
Enabled: true
|
514
492
|
EnforcedStyle: no_space
|
@@ -532,10 +510,6 @@ Layout/SpaceInsideParens:
|
|
532
510
|
Enabled: true
|
533
511
|
EnforcedStyle: no_space
|
534
512
|
|
535
|
-
# Disabling for now
|
536
|
-
Layout/SpaceInsidePercentLiteralDelimiters:
|
537
|
-
Enabled: false
|
538
|
-
|
539
513
|
Layout/SpaceInsideRangeLiteral:
|
540
514
|
Enabled: true
|
541
515
|
|
@@ -562,40 +536,24 @@ Lint/AmbiguousAssignment:
|
|
562
536
|
Lint/AmbiguousBlockAssociation:
|
563
537
|
Enabled: false
|
564
538
|
|
565
|
-
# Disabling for now
|
566
|
-
Lint/AmbiguousOperator:
|
567
|
-
Enabled: false
|
568
|
-
|
569
539
|
Lint/AmbiguousOperatorPrecedence:
|
570
540
|
Enabled: false
|
571
541
|
|
572
542
|
Lint/AmbiguousRange:
|
573
543
|
Enabled: false
|
574
544
|
|
575
|
-
# Disabling for now
|
576
|
-
Lint/AmbiguousRegexpLiteral:
|
577
|
-
Enabled: false
|
578
|
-
|
579
|
-
# Disabling for now
|
580
545
|
Lint/AssignmentInCondition:
|
581
546
|
Enabled: false
|
582
|
-
# AllowSafeAssignment: true
|
583
547
|
|
584
548
|
Lint/BigDecimalNew:
|
585
549
|
Enabled: true
|
586
550
|
|
587
|
-
# Disabling for now
|
588
551
|
Lint/BinaryOperatorWithIdenticalOperands:
|
589
552
|
Enabled: false
|
590
553
|
|
591
|
-
# Disabling for now
|
592
|
-
Lint/BooleanSymbol:
|
593
|
-
Enabled: false
|
594
|
-
|
595
554
|
Lint/CircularArgumentReference:
|
596
555
|
Enabled: true
|
597
556
|
|
598
|
-
# Disabling for now
|
599
557
|
Lint/ConstantDefinitionInBlock:
|
600
558
|
Enabled: false
|
601
559
|
|
@@ -605,10 +563,6 @@ Lint/ConstantResolution:
|
|
605
563
|
Lint/Debugger:
|
606
564
|
Enabled: true
|
607
565
|
|
608
|
-
# Disabling for now
|
609
|
-
Lint/DeprecatedClassMethods:
|
610
|
-
Enabled: false
|
611
|
-
|
612
566
|
Lint/DeprecatedConstants:
|
613
567
|
Enabled: true
|
614
568
|
|
@@ -621,20 +575,12 @@ Lint/DisjunctiveAssignmentInConstructor:
|
|
621
575
|
Lint/DuplicateBranch:
|
622
576
|
Enabled: false
|
623
577
|
|
624
|
-
# Disabling for now
|
625
|
-
Lint/DuplicateCaseCondition:
|
626
|
-
Enabled: false
|
627
|
-
|
628
578
|
Lint/DuplicateElsifCondition:
|
629
579
|
Enabled: true
|
630
580
|
|
631
581
|
Lint/DuplicateHashKey:
|
632
582
|
Enabled: true
|
633
583
|
|
634
|
-
# Disabling for now
|
635
|
-
Lint/DuplicateMethods:
|
636
|
-
Enabled: false
|
637
|
-
|
638
584
|
Lint/DuplicateRegexpCharacterClassElement:
|
639
585
|
Enabled: true
|
640
586
|
|
@@ -659,11 +605,6 @@ Lint/EmptyClass:
|
|
659
605
|
Lint/EmptyConditionalBody:
|
660
606
|
Enabled: false
|
661
607
|
|
662
|
-
# Disabling for now
|
663
|
-
Lint/EmptyEnsure:
|
664
|
-
Enabled: false
|
665
|
-
# AutoCorrect: true
|
666
|
-
|
667
608
|
Lint/EmptyExpression:
|
668
609
|
Enabled: true
|
669
610
|
|
@@ -680,10 +621,6 @@ Lint/EmptyWhen:
|
|
680
621
|
Enabled: true
|
681
622
|
AllowComments: true
|
682
623
|
|
683
|
-
# Disabling for now
|
684
|
-
Lint/EnsureReturn:
|
685
|
-
Enabled: false
|
686
|
-
|
687
624
|
Lint/ErbNewArguments:
|
688
625
|
Enabled: true
|
689
626
|
|
@@ -1081,18 +1018,6 @@ Performance/MapCompact:
|
|
1081
1018
|
Performance/MethodObjectAsBlock:
|
1082
1019
|
Enabled: false
|
1083
1020
|
|
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
1021
|
# Disabling for now
|
1097
1022
|
Security/Eval:
|
1098
1023
|
Enabled: false
|
@@ -1267,9 +1192,6 @@ Style/DocumentationMethod:
|
|
1267
1192
|
Style/DoubleCopDisableDirective:
|
1268
1193
|
Enabled: false
|
1269
1194
|
|
1270
|
-
Style/DoubleNegation:
|
1271
|
-
Enabled: false
|
1272
|
-
|
1273
1195
|
Style/EachForSimpleLoop:
|
1274
1196
|
Enabled: true
|
1275
1197
|
|
@@ -1330,8 +1252,6 @@ Style/ExplicitBlockArgument:
|
|
1330
1252
|
Style/ExponentialNotation:
|
1331
1253
|
Enabled: false
|
1332
1254
|
|
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
1255
|
Style/FetchEnvVar:
|
1336
1256
|
Enabled: false
|
1337
1257
|
|
@@ -1740,17 +1660,6 @@ Style/RescueStandardError:
|
|
1740
1660
|
Style/ReturnNil:
|
1741
1661
|
Enabled: false
|
1742
1662
|
|
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
1663
|
Style/Sample:
|
1755
1664
|
Enabled: true
|
1756
1665
|
|
@@ -1809,17 +1718,6 @@ Style/StringConcatenation:
|
|
1809
1718
|
Style/StringHashKeys:
|
1810
1719
|
Enabled: false
|
1811
1720
|
|
1812
|
-
# Disabling for now
|
1813
|
-
Style/StringLiterals:
|
1814
|
-
Enabled: false
|
1815
|
-
# EnforcedStyle: double_quotes
|
1816
|
-
# ConsistentQuotesInMultiline: false
|
1817
|
-
|
1818
|
-
# Disabling for now
|
1819
|
-
Style/StringLiteralsInInterpolation:
|
1820
|
-
Enabled: false
|
1821
|
-
# EnforcedStyle: double_quotes
|
1822
|
-
|
1823
1721
|
Style/StringMethods:
|
1824
1722
|
Enabled: false
|
1825
1723
|
|
data/.rubocop_todo.yml
CHANGED
@@ -1,18 +1,19 @@
|
|
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
|
-
Max:
|
12
|
+
Max: 40
|
13
13
|
Exclude:
|
14
|
-
- test/**/*
|
15
14
|
- infinite_tracing/test/**/*
|
15
|
+
- lib/new_relic/cli/commands/deployments.rb
|
16
|
+
- test/**/*
|
16
17
|
|
17
18
|
# This cop supports safe autocorrection (--autocorrect).
|
18
19
|
Minitest/AssertInDelta:
|
@@ -31,7 +32,14 @@ Minitest/DuplicateTestRun:
|
|
31
32
|
- 'test/multiverse/suites/rails/error_tracing_test.rb'
|
32
33
|
- 'test/multiverse/suites/sinatra/ignoring_test.rb'
|
33
34
|
|
34
|
-
# Offense count:
|
35
|
+
# Offense count: 1
|
36
|
+
# This cop supports safe autocorrection (--autocorrect).
|
37
|
+
Minitest/EmptyLineBeforeAssertionMethods:
|
38
|
+
Exclude:
|
39
|
+
- 'test/new_relic/agent_test.rb'
|
40
|
+
- 'test/new_relic/cli/commands/deployments_test.rb'
|
41
|
+
|
42
|
+
# Offense count: 269
|
35
43
|
Minitest/MultipleAssertions:
|
36
44
|
Max: 28
|
37
45
|
|
@@ -51,12 +59,3 @@ Style/ConcatArrayLiterals:
|
|
51
59
|
Minitest/RefuteRespondTo:
|
52
60
|
Exclude:
|
53
61
|
- 'test/new_relic/cli/commands/deployments_test.rb'
|
54
|
-
|
55
|
-
Minitest/EmptyLineBeforeAssertionMethods:
|
56
|
-
Exclude:
|
57
|
-
- 'test/new_relic/agent_test.rb'
|
58
|
-
- 'test/new_relic/cli/commands/deployments_test.rb'
|
59
|
-
|
60
|
-
Style/RedundantStringEscape:
|
61
|
-
Exclude:
|
62
|
-
- 'test/new_relic/agent/logging_test.rb'
|
data/.simplecov
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require 'securerandom'
|
3
4
|
|
4
5
|
if ENV['CI']
|
@@ -10,6 +11,6 @@ end
|
|
10
11
|
SimpleCov.start do
|
11
12
|
enable_coverage(:branch)
|
12
13
|
SimpleCov.root(File.join(File.dirname(__FILE__), '/lib'))
|
13
|
-
track_files(
|
14
|
+
track_files('**/*.rb')
|
14
15
|
formatter(SimpleCov::Formatter::SimpleFormatter) if ENV['CI']
|
15
16
|
end
|
data/Brewfile
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,230 @@
|
|
1
1
|
# New Relic Ruby Agent Release Notes
|
2
2
|
|
3
|
+
## v9.2.2
|
4
|
+
|
5
|
+
Version 9.2.2 of the agent fixes a bug with the `Transaction#finished?` method.
|
6
|
+
|
7
|
+
- **Bugfix: Transaction#finished? no longer throws a NoMethodError when initial_segment is nil**
|
8
|
+
|
9
|
+
This change adds a safe navigation operator to `Transaction#finished?` to prevent `NoMethodErrors` when a transaction does not have any segments. Our thanks goes to [@JulienDefrance](https://github.com/JulienDefrance) for reporting this issue. [PR#1983](https://github.com/newrelic/newrelic-ruby-agent/pull/1983)
|
10
|
+
|
11
|
+
## v9.2.1
|
12
|
+
|
13
|
+
Version 9.2.1 fixes a bug causing the agent to continue storing data on finished transactions, and a bug preventing errors from being expected.
|
14
|
+
|
15
|
+
- **Bugfix: Finished transactions continue to store data on different threads**
|
16
|
+
|
17
|
+
Previously, when a new thread was spawned the agent would continue using the current transaction to record data on, even if this transaction had finished already in a different thread. Now the agent will only use the current transaction in the new thread if it is not yet finished. Thank you to [@fcheung](https://github.com/fcheung) for reporting this bug and providing us with an extremely helpful reproduction to debug. [PR#1969](https://github.com/newrelic/newrelic-ruby-agent/pull/1969)
|
18
|
+
|
19
|
+
|
20
|
+
- **Bugfix: Expected Errors passed to notice_error are expected again**
|
21
|
+
|
22
|
+
A bug was introduced in 9.1.0 that caused to agent not to mark errors as expected if the error was passed in to `notice_error` using the `expected: true` parameter. This has been fixed and errors will now be marked as expected, as expected. Thank you very much to [@eiskrenkov](https://github.com/eiskrenkov) for finding this bug and contributing a fix for it! [PR#1954](https://github.com/newrelic/newrelic-ruby-agent/pull/1954)
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
## v9.2.0
|
27
|
+
|
28
|
+
Version 9.2.0 of the agent introduces some performance improvements for working with high numbers of nested actions, and deprecates instrumentation for the `memcached` and `memcache-client` gems (with `dalli` still being supported).
|
29
|
+
|
30
|
+
- **Feature: Enhance performance for handling high numbers of nested actions**
|
31
|
+
|
32
|
+
With [Issue#1910](https://github.com/newrelic/newrelic-ruby-agent/issues/1910) community members [@parkerfinch](https://github.com/parkerfinch) and [@travisbell](https://github.com/travisbell) informed us of some CPU spikes and process hangs seen only when using the agent's thread instrumentation, which was enabled by default with v9.0. When thread instrumentation is enabled, instrumented actions taking place within threads are seen and reported on by the agent whereas they would have previously gone unnoticed. This is a great improvement to the agent's usefulness in an async context, and also makes it easier for higher numbers of nested actions to be observed.
|
33
|
+
For example, if an instrumented background job framework (Sidekiq, Resque) kicks off a job that the agent notices and then that job in turn performs actions such as database queries that the agent also instruments, nested actions are seen. However, with very high (10,000+) numbers of actions nested within a single instrumented outer action, the agent would struggle to efficiently crunch through all of the collected data at the time when the outer action finished.
|
34
|
+
The agent should now be much more efficient when any observed action with lots of nested actions is finished. Our performance testing was conducted with hundreds of thousands of nested actions taking place, and we hope that the benefits of thread tracing can now be enjoyed without any drawbacks. Thanks very much [@parkerfinch](https://github.com/parkerfinch) and [@travisbell](https://github.com/travisbell)! [PR#1927](https://github.com/newrelic/newrelic-ruby-agent/pull/1927)
|
35
|
+
|
36
|
+
- **Feature: The agent configuration will now reflect whether module prepending or method chaining was used for instrumentation**
|
37
|
+
|
38
|
+
For `:'instrumentation.*'` configuration parameters that are set to :auto (the default), the agent will automatically determine whether to use module prepending or method chaining. The agent will now update its in-memory configuration to give each relevant parameter a value of either :prepend or :chain so that the result of the determination can be introspected. This is intended to help 3rd party libraries that wish to further enhance the agent's instrumentation capabilities by prepending or chaining additional logic. Environment variable, YAML file, and server-side configuration based values are not impacted. [PR#1930](https://github.com/newrelic/newrelic-ruby-agent/pull/1930)
|
39
|
+
|
40
|
+
- **Feature: Deprecate memcached and memcache-client instrumentation**
|
41
|
+
|
42
|
+
Instrumentation for the memcached and memcache-client libraries is deprecated and will be removed during the next major release.
|
43
|
+
|
44
|
+
## v9.1.0
|
45
|
+
|
46
|
+
Version 9.1.0 of the agent delivers support for two new [errors inbox](https://docs.newrelic.com/docs/errors-inbox/errors-inbox/) features: error fingerprinting and user tracking, identifies the Amazon Timestream data store, removes Distributed Tracing warnings from agent logs when using Sidekiq, fixes bugs, and is tested against the recently released JRuby 9.4.2.0.
|
47
|
+
|
48
|
+
- **Feature: Error fingerprinting - supply your own errors inbox group names**
|
49
|
+
|
50
|
+
Are your error occurrences grouped poorly? Set your own error fingerprint via a callback function. A new `set_error_group_callback` public API method has been added that will accept a user defined proc. The proc will be invoked for each noticed error and whenever it returns a string, that string will be used as the error group name for the error and will take precedence over any server-side grouping that takes place with the New Relic errors inbox. This gives users much greater control over the grouping of their errors.
|
51
|
+
|
52
|
+
The customer defined proc will be expected to receive exactly one input argument, a hash. The hash contains the following:
|
53
|
+
|
54
|
+
| Key | Value |
|
55
|
+
| ---------------------| ---------------------------------------------------------------------------- |
|
56
|
+
| `:error` | The Ruby error class instance. Offers `#class`, `#message`, and `#backtrace` |
|
57
|
+
| `:customAttributes` | Any customer defined custom attributes for the current transaction |
|
58
|
+
| `:'request.uri'` | The current request URI if available |
|
59
|
+
| `:'http.statusCode'` | The HTTP status code (200, 404, etc.) if available |
|
60
|
+
| `:'http.method'` | The HTTP method (GET, PUT, etc.) if available |
|
61
|
+
| `:'error.expected'` | Whether (true) or not (false) the error was expected |
|
62
|
+
| `:'options'` | The options hash passed to `NewRelic::Agent.notice_error` |
|
63
|
+
|
64
|
+
The callback only needs to be set once per initialization of the New Relic agent.
|
65
|
+
|
66
|
+
Example usage:
|
67
|
+
|
68
|
+
```
|
69
|
+
proc = proc { |hash| "Access" if hash[:'http.statusCode'] == 401 }
|
70
|
+
NewRelic::Agent.set_error_group_callback(proc)
|
71
|
+
```
|
72
|
+
|
73
|
+
- **Feature: User tracking - associate errors with a user id**
|
74
|
+
|
75
|
+
You can now see the number of users impacted by an error group. Identify the end user with a new `set_user_id` public API method that will accept a string representation of a user id and associate that user id with the current transaction. Transactions and errors will then have a new `enduser.id` agent attribute associated with them. This will allow agent users to tag transactions and errors as belonging to given user ids in support of greater filtering and alerting capabilities.
|
76
|
+
|
77
|
+
- **Identify Amazon Timestream when the amazon_timestream AR adapter is used**
|
78
|
+
|
79
|
+
When the agent sees the [activerecord-amazon-timestream-adapter](https://rubygems.org/gems/activerecord-amazon-timestream-adapter) gem being used, it will now identify the data store as "Timestream". Thanks very much to [@wagner](https://github.com/wagner) for contributing this enhancement! [PR#1872](https://github.com/newrelic/newrelic-ruby-agent/pull/1872)
|
80
|
+
|
81
|
+
- **Bugfix: Remove Distributed Tracing related warnings from agent logs when headers are not present in Sidekiq**
|
82
|
+
|
83
|
+
Previously, the agent would log a warning to `newrelic_agent.log` every time it attempted to accept empty Distributed Tracing headers from Sidekiq jobs which could result in an excessive number of warnings. Now the agent will no longer create these warnings when using Sidekiq. [PR#1834](https://github.com/newrelic/newrelic-ruby-agent/pull/1834)
|
84
|
+
|
85
|
+
- **Bugfix: Log request headers in debug-level logs instead of human-readable Objects**
|
86
|
+
|
87
|
+
Previously, the agent sometimes received children of the `NewRelic::Agent::HTTPClients::AbstractRequest` class as an argument when `NewRelic::Agent::Transaction::DistributedTracers#log_request_headers` was called. This caused debug-level log messages that print the request headers to show human-readable Objects (ex. `#<NewRelic::Agent::HTTPClients::HTTPClientRequest:0x00007fd0dda983e0>`) instead of the request headers. Now, the hash of the request headers should always be logged. [PR#1839](https://github.com/newrelic/newrelic-ruby-agent/pull/1839)
|
88
|
+
|
89
|
+
- **Bugfix: Fix undefined method `controller_path` logged in Action Controller Instrumentation**
|
90
|
+
|
91
|
+
Previously, the agent could log an error when trying to determine the metric name in the Action Controller instrumentation if the controller class did not respond to `controller_path`. This has been resolved and the agent will no longer call this method unless the class responds to it. Thank you to [@gsar](https://github.com/gsar) for letting us know about this issue. [PR#1844](https://github.com/newrelic/newrelic-ruby-agent/pull/1844)
|
92
|
+
|
93
|
+
- **Bugfix: Fix Transaction#finish exception and decrease log level for related warning during async transactions**
|
94
|
+
|
95
|
+
Previously, the agent would raise a non-fatal error when a segment without a parent was unfinished when the transaction completed. This error was raised while constructing a `warn`-level log message. Now that Thread instrumentation is on by default, this log message emits more frequently and is less concerning. In cases where we see a Thread, Fiber, or concurrent-ruby segment in a transaction, the message will be degraded to a `debug`-level. Thanks to [@NielsKSchjoedt](https://github.com/NielsKSchjoedt) for creating the issue and [@boomer196](https://github.com/boomer196) for testing solutions. [PR#1876](https://github.com/newrelic/newrelic-ruby-agent/pull/1876)
|
96
|
+
|
97
|
+
- **CI: Target JRuby 9.4.2.0**
|
98
|
+
|
99
|
+
The agent is now actively being tested against JRuby 9.4.2.0. NOTE that this release does not contain any non-CI related changes for JRuby. Old agent versions are still expected to work with newer JRubies and the newest agent version is still expected to work with older JRubies.
|
100
|
+
|
101
|
+
|
102
|
+
## v9.0.0
|
103
|
+
|
104
|
+
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.
|
105
|
+
|
106
|
+
|
107
|
+
- **Remove deprecated configuration options**
|
108
|
+
|
109
|
+
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)
|
110
|
+
|
111
|
+
| Removed | Replacement | `newrelic.yml` example |
|
112
|
+
| ----------------------------------------- | ----------------------------------------- | ----------------------------------------------------------------------------------- |
|
113
|
+
| `analytics_events.capture_attributes` | `transaction_events.attributes.enabled` | `transaction_events.attributes.enabled: false` |
|
114
|
+
| `browser_monitoring.capture_attributes` | `browser_monitoring.attributes.enabled` | `browser_monitoring.attributes.enabled: false` |
|
115
|
+
| `error_collector.capture_attributes` | `error_collector.attributes.enabled` | `error_collector.attributes.enabled: false` |
|
116
|
+
| `resque.capture_params` | `attributes.include` | `attributes.include: ['job.resque.args.*']` |
|
117
|
+
| `sidekiq.capture_params` | `attributes.include` | `attributes.include: ['job.sidekiq.args.*']` |
|
118
|
+
| `transaction_tracer.capture_attributes` | `transaction_tracer.attributes.enabled` | `transaction_tracer.attributes.enabled: false` |
|
119
|
+
| `error_collector.ignore_errors` | `error_collector.ignore_classes` | `error_collector.ignore_classes: ['ActionController::RoutingError', 'CustomError']` |
|
120
|
+
| `analytics_events.enabled` | `transaction_events.enabled` | `transaction_events.enabled: false` |
|
121
|
+
| `analytics_events.max_samples_stored` | `transaction_events.max_samples_stored` | `transaction_events.max_samples_stored: 1200` |
|
122
|
+
| `disable_database_instrumentation` | `disable_sequel_instrumentation` | `disable_sequel_instrumentation: true` |
|
123
|
+
| `disable_bunny` | `instrumentation.bunny` | `instrumentation.bunny: disabled` |
|
124
|
+
| `disable_curb` | `instrumentation.curb` | `instrumentation.curb: disabled` |
|
125
|
+
| `disable_dj` | `instrumentation.delayed_job` | `instrumentation.delayed_job: disabled` |
|
126
|
+
| `disable_excon` | `instrumentation.excon` | `instrumentation.excon: disabled` |
|
127
|
+
| `disable_grape` | `instrumentation.grape` | `instrumentation.grape: disabled` |
|
128
|
+
| `disable_grape_instrumentation` | `instrumentation.grape` | `instrumentation.grape: disabled` |
|
129
|
+
| `disable_httpclient` | `instrumentation.httpclient` | `instrumentation.httpcient: disabled` |
|
130
|
+
| `disable_httprb` | `instrumentation.httprb` | `instrumentation.httprb: disabled` |
|
131
|
+
| `disable_dalli` | `instrumentation.memcache` | `instrumentation.memcache: disabled` |
|
132
|
+
| `disable_dalli_cas_client` | `instrumentation.memcache` | `instrumentation.memcache: disabled` |
|
133
|
+
| `disable_memcache_client` | `instrumentation.memcache-client` | `instrumentation.memcache-client: disabled` |
|
134
|
+
| `disable_memcache_instrumentation` | `instrumentation.memcache` | `instrumentation.memcache: disabled` |
|
135
|
+
| `disable_memcached` | `instrumentation.memcached` | `instrumentation.memcached: disabled` |
|
136
|
+
| `disable_mongo` | `instrumentation.mongo` | `instrumentation.mongo: disabled` |
|
137
|
+
| `disable_net_http` | `instrumentation.net_http` | `instrumentation.net_http: disabled` |
|
138
|
+
| `prepend_net_instrumentation` | `instrumentation.net_http` | `instrumentation.net_http: prepend` |
|
139
|
+
| `disable_puma_rack` | `instrumentation.puma_rack` | `instrumentation.puma_rack: disabled` |
|
140
|
+
| `disable_puma_rack_urlmap` | `instrumentation.puma_rack_urlmap` | `instrumentation.puma_rack_urlmap: disabled` |
|
141
|
+
| `disable_rack` | `instrumentation.rack` | `instrumentation.rack: disabled` |
|
142
|
+
| `disable_rack_urlmap` | `instrumentation.rack_urlmap` | `instrumentation.rack_urlmap: disabled` |
|
143
|
+
| `disable_redis` | `instrumentation.redis` | `instrumentation.redis: disabled` |
|
144
|
+
| `disable_redis_instrumentation` | `instrumentation.redis` | `instrumentation.redis: disabled` |
|
145
|
+
| `disable_resque` | `instrumentation.resque` | `instrumentation.resque: disabled` |
|
146
|
+
| `disable_sinatra` | `instrumentation.sinatra` | `instrumentation.sinatra: disabled` |
|
147
|
+
| `disable_rake` | `instrumentation.rake` | `instrumentation.rake: disabled` |
|
148
|
+
| `disable_rake_instrumentation` | `instrumentation.rake` | `instrumentation.rake: disabled` |
|
149
|
+
| `disable_typhoeus` | `instrumentation.typhoeus` | `instrumentation.typhoeus: disabled` |
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
- **Enable Thread instrumentation by default**
|
155
|
+
|
156
|
+
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.
|
157
|
+
|
158
|
+
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)
|
159
|
+
|
160
|
+
- **Add Fiber instrumentation**
|
161
|
+
|
162
|
+
`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)
|
163
|
+
|
164
|
+
|
165
|
+
- **Removed support for Ruby 2.2 and 2.3**
|
166
|
+
|
167
|
+
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)
|
168
|
+
|
169
|
+
- **Removed deprecated instrumentation**
|
170
|
+
|
171
|
+
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)
|
172
|
+
- Acts As Solr
|
173
|
+
- Authlogic
|
174
|
+
- DataMapper
|
175
|
+
- Rainbows
|
176
|
+
- Sunspot
|
177
|
+
|
178
|
+
Versions of the following technologies had been previously deprecated and are no longer supported.
|
179
|
+
|
180
|
+
- Passenger: 2.2.x - 4.0.x
|
181
|
+
- Puma: 2.0.x
|
182
|
+
- Grape: 0.2.0
|
183
|
+
- Padrino: 0.14.x
|
184
|
+
- Rails: 3.2.x
|
185
|
+
- Sinatra: 1.4.x, 1.5.x
|
186
|
+
- Mongo: 1.8.x - 2.3.x
|
187
|
+
- Sequel: 3.37.x, 4.0.x
|
188
|
+
- Delayed_Job: 2.0.x - 4.0.x
|
189
|
+
- Sidekiq: 4.2.x
|
190
|
+
- Excon: below 0.55.0
|
191
|
+
- HttpClient: 2.2.0 - 2.8.0
|
192
|
+
- HttpRb: 0.9.9 - 2.2.1
|
193
|
+
- Typhoeus: 0.5.3 - 1.2.x
|
194
|
+
- Bunny: 2.0.x - 2.6.x
|
195
|
+
- ActiveMerchant: 1.25.0 - 1.64.x
|
196
|
+
|
197
|
+
|
198
|
+
- **Updated API method `set_transaction_name`**
|
199
|
+
|
200
|
+
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.
|
201
|
+
|
202
|
+
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)
|
203
|
+
|
204
|
+
- **Removed API method: `NewRelic::Agent.disable_transaction_tracing`**
|
205
|
+
|
206
|
+
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)
|
207
|
+
|
208
|
+
- **Renamed ActiveJob metrics**
|
209
|
+
|
210
|
+
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)
|
211
|
+
|
212
|
+
- **Code cleanup**
|
213
|
+
|
214
|
+
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)
|
215
|
+
|
216
|
+
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!
|
217
|
+
|
218
|
+
|
219
|
+
- **Bugfix: Allow rails initialization to be deferred by environment variable**
|
220
|
+
|
221
|
+
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).
|
222
|
+
|
223
|
+
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)
|
224
|
+
|
225
|
+
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)
|
226
|
+
|
227
|
+
|
3
228
|
## 8.16.0
|
4
229
|
|
5
230
|
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/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
require './test/multiverse/lib/multiverse/bundler_patch'
|
3
4
|
|
4
|
-
test_folders = Dir.glob(
|
5
|
-
test_folders += Dir.glob(
|
5
|
+
test_folders = Dir.glob('test/new_relic/*').select { |f| File.directory?(f) }
|
6
|
+
test_folders += Dir.glob('test/new_relic/**/*').select { |f| File.directory?(f) }
|
6
7
|
|
7
|
-
rake_lib_path = Bundler.with_unbundled_env { `bundle exec gem which rake`.chomp.gsub(
|
8
|
+
rake_lib_path = Bundler.with_unbundled_env { `bundle exec gem which rake`.chomp.gsub('lib/rake.rb', 'lib') }
|
8
9
|
ruby_options = %(-w -I"#{rake_lib_path}" "#{rake_lib_path}/rake/rake_test_loader.rb")
|
9
10
|
|
10
11
|
guard_options = {
|
@@ -17,10 +18,10 @@ guard_options = {
|
|
17
18
|
guard :minitest, guard_options do
|
18
19
|
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
19
20
|
watch(%r{^test/.+_test\.rb$})
|
20
|
-
watch(%r{^test/rum/.*}) {
|
21
|
+
watch(%r{^test/rum/.*}) { 'test/new_relic/rack/browser_monitoring_test.rb' }
|
21
22
|
watch(%r{^test/fixtures/cross_agent_tests/distributed_tracing/(.+).json}) { |m| "test/new_relic/agent/distributed_tracing/#{m[1]}_cross_agent_test.rb" }
|
22
|
-
watch('test/test_helper.rb') {
|
23
|
-
watch('test/agent_helper.rb') {
|
24
|
-
watch('lib/new_relic/agent/configuration/default_source.rb') {
|
23
|
+
watch('test/test_helper.rb') { 'test/new_relic' }
|
24
|
+
watch('test/agent_helper.rb') { 'test/new_relic' }
|
25
|
+
watch('lib/new_relic/agent/configuration/default_source.rb') { 'test/new_relic/agent/configuration/orphan_configuration_test.rb' }
|
25
26
|
watch(%r{^lib/new_relic/agent/transaction/(.+).rb}) { |m| "test/new_relic/agent/distributed_tracing/#{m[1]}_cross_agent_test.rb" }
|
26
27
|
end
|
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
<a href="https://opensource.newrelic.com/oss-category/#community-plus"><picture><source media="(prefers-color-scheme: dark)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png"><source media="(prefers-color-scheme: light)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"><img alt="New Relic Open Source community plus project banner." src="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"></picture></a>
|
3
2
|
|
4
3
|
# New Relic Ruby Agent
|
5
4
|
|
@@ -12,6 +11,8 @@ to help you improve the customer experience and make data-driven business decisi
|
|
12
11
|
The New Relic Ruby agent is dual-purposed as either a Gem or a Rails plugin,
|
13
12
|
hosted on [github](https://github.com/newrelic/newrelic-ruby-agent).
|
14
13
|
|
14
|
+
This code is actively maintained by New Relic engineering teams and delivered here in GitHub. See below for troubleshooting and defect reporting instructions.
|
15
|
+
|
15
16
|
[![Gem Version](https://badge.fury.io/rb/newrelic_rpm.svg)](https://badge.fury.io/rb/newrelic_rpm)
|
16
17
|
|
17
18
|
## Supported Environments
|