newrelic_rpm 6.7.0.359 → 6.12.0.367
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -0
- data/.travis.yml +72 -7
- data/CHANGELOG.md +306 -4
- data/CODE_OF_CONDUCT.md +46 -0
- data/CONTRIBUTING.md +56 -12
- data/Gemfile +6 -2
- data/Guardfile +18 -1
- data/LICENSE +208 -38
- data/README.md +61 -89
- data/Rakefile +2 -0
- data/THIRD_PARTY_NOTICES.md +213 -0
- data/bin/nrdebug +1 -1
- data/init.rb +1 -1
- data/install.rb +1 -1
- data/lib/new_relic/agent.rb +49 -7
- data/lib/new_relic/agent/adaptive_sampler.rb +1 -1
- data/lib/new_relic/agent/agent.rb +57 -40
- data/lib/new_relic/agent/agent_logger.rb +5 -1
- data/lib/new_relic/agent/attribute_filter.rb +8 -8
- data/lib/new_relic/agent/attribute_processing.rb +1 -1
- data/lib/new_relic/agent/attributes.rb +152 -0
- data/lib/new_relic/agent/audit_logger.rb +1 -1
- data/lib/new_relic/agent/autostart.rb +20 -15
- data/lib/new_relic/agent/chained_call.rb +1 -1
- data/lib/new_relic/agent/commands/agent_command.rb +1 -1
- data/lib/new_relic/agent/commands/agent_command_router.rb +1 -1
- data/lib/new_relic/agent/commands/thread_profiler_session.rb +1 -1
- data/lib/new_relic/agent/configuration.rb +1 -1
- data/lib/new_relic/agent/configuration/default_source.rb +111 -16
- data/lib/new_relic/agent/configuration/dotted_hash.rb +1 -1
- data/lib/new_relic/agent/configuration/environment_source.rb +1 -1
- data/lib/new_relic/agent/configuration/event_harvest_config.rb +1 -1
- data/lib/new_relic/agent/configuration/high_security_source.rb +1 -1
- data/lib/new_relic/agent/configuration/manager.rb +1 -1
- data/lib/new_relic/agent/configuration/manual_source.rb +1 -1
- data/lib/new_relic/agent/configuration/mask_defaults.rb +1 -1
- data/lib/new_relic/agent/configuration/security_policy_source.rb +1 -1
- data/lib/new_relic/agent/configuration/server_source.rb +2 -2
- data/lib/new_relic/agent/configuration/yaml_source.rb +12 -7
- data/lib/new_relic/agent/connect/request_builder.rb +4 -12
- data/lib/new_relic/agent/connect/response_handler.rb +1 -1
- data/lib/new_relic/agent/custom_event_aggregator.rb +1 -1
- data/lib/new_relic/agent/database.rb +2 -3
- 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 +1 -1
- data/lib/new_relic/agent/database/postgres_explain_obfuscator.rb +1 -1
- data/lib/new_relic/agent/datastores.rb +1 -1
- data/lib/new_relic/agent/datastores/metric_helper.rb +1 -1
- data/lib/new_relic/agent/datastores/mongo.rb +2 -2
- data/lib/new_relic/agent/datastores/mongo/event_formatter.rb +3 -3
- data/lib/new_relic/agent/datastores/mongo/metric_translator.rb +1 -1
- data/lib/new_relic/agent/datastores/mongo/obfuscator.rb +9 -9
- data/lib/new_relic/agent/datastores/mongo/statement_formatter.rb +1 -1
- data/lib/new_relic/agent/datastores/redis.rb +1 -1
- data/lib/new_relic/agent/deprecator.rb +1 -1
- data/lib/new_relic/agent/distributed_tracing.rb +156 -7
- data/lib/new_relic/agent/{cross_app_payload.rb → distributed_tracing/cross_app_payload.rb} +3 -2
- data/lib/new_relic/agent/{cross_app_tracing.rb → distributed_tracing/cross_app_tracing.rb} +61 -46
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb +84 -0
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +75 -0
- data/lib/new_relic/agent/{distributed_trace_payload.rb → distributed_tracing/distributed_trace_payload.rb} +25 -102
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb +39 -0
- data/lib/new_relic/agent/distributed_tracing/trace_context.rb +246 -0
- data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +126 -0
- data/lib/new_relic/agent/encoding_normalizer.rb +1 -1
- data/lib/new_relic/agent/error_collector.rb +34 -17
- data/lib/new_relic/agent/error_event_aggregator.rb +8 -6
- data/lib/new_relic/agent/error_trace_aggregator.rb +1 -1
- data/lib/new_relic/agent/event_aggregator.rb +1 -1
- data/lib/new_relic/agent/event_buffer.rb +1 -1
- data/lib/new_relic/agent/event_listener.rb +1 -1
- data/lib/new_relic/agent/event_loop.rb +1 -1
- data/lib/new_relic/agent/external.rb +8 -8
- data/lib/new_relic/agent/guid_generator.rb +28 -0
- data/lib/new_relic/agent/harvester.rb +1 -1
- data/lib/new_relic/agent/heap.rb +1 -1
- data/lib/new_relic/agent/hostname.rb +8 -2
- data/lib/new_relic/agent/http_clients/abstract.rb +82 -0
- data/lib/new_relic/agent/http_clients/curb_wrappers.rb +25 -20
- data/lib/new_relic/agent/http_clients/excon_wrappers.rb +29 -14
- data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +18 -22
- data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +11 -12
- data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +17 -5
- data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +5 -7
- data/lib/new_relic/agent/http_clients/uri_util.rb +4 -3
- data/lib/new_relic/agent/instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +6 -8
- data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +5 -1
- data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +12 -3
- data/lib/new_relic/agent/instrumentation/active_job.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_merchant.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_record.rb +85 -38
- data/lib/new_relic/agent/instrumentation/active_record_helper.rb +82 -24
- data/lib/new_relic/agent/instrumentation/active_record_notifications.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +92 -34
- data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +8 -3
- data/lib/new_relic/agent/instrumentation/active_storage.rb +1 -1
- data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +9 -5
- data/lib/new_relic/agent/instrumentation/acts_as_solr.rb +24 -8
- data/lib/new_relic/agent/instrumentation/authlogic.rb +1 -1
- data/lib/new_relic/agent/instrumentation/bunny.rb +115 -52
- data/lib/new_relic/agent/instrumentation/controller_instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/curb.rb +93 -28
- data/lib/new_relic/agent/instrumentation/data_mapper.rb +4 -2
- data/lib/new_relic/agent/instrumentation/delayed_job_instrumentation.rb +61 -25
- data/lib/new_relic/agent/instrumentation/excon.rb +2 -2
- data/lib/new_relic/agent/instrumentation/excon/connection.rb +7 -4
- data/lib/new_relic/agent/instrumentation/excon/middleware.rb +3 -2
- data/lib/new_relic/agent/instrumentation/grape.rb +6 -11
- data/lib/new_relic/agent/instrumentation/http.rb +7 -4
- data/lib/new_relic/agent/instrumentation/httpclient.rb +6 -4
- data/lib/new_relic/agent/instrumentation/ignore_actions.rb +1 -1
- data/lib/new_relic/agent/instrumentation/memcache.rb +4 -2
- data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +7 -3
- data/lib/new_relic/agent/instrumentation/merb/controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/merb/errors.rb +1 -1
- data/lib/new_relic/agent/instrumentation/middleware_proxy.rb +12 -4
- data/lib/new_relic/agent/instrumentation/middleware_tracing.rb +9 -7
- data/lib/new_relic/agent/instrumentation/mongo.rb +10 -4
- data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +36 -3
- data/lib/new_relic/agent/instrumentation/net.rb +60 -23
- data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +26 -2
- data/lib/new_relic/agent/instrumentation/padrino.rb +40 -16
- data/lib/new_relic/agent/instrumentation/passenger_instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/queue_time.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rack.rb +36 -13
- data/lib/new_relic/agent/instrumentation/rails/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails/action_web_service.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails3/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails_middleware.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails_notifications/action_cable.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails_notifications/action_controller.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rails_notifications/action_view.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rainbows_instrumentation.rb +1 -1
- data/lib/new_relic/agent/instrumentation/rake.rb +54 -20
- data/lib/new_relic/agent/instrumentation/redis.rb +141 -56
- data/lib/new_relic/agent/instrumentation/resque.rb +4 -1
- data/lib/new_relic/agent/instrumentation/sequel.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sequel_helper.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sidekiq.rb +48 -24
- data/lib/new_relic/agent/instrumentation/sinatra.rb +62 -23
- data/lib/new_relic/agent/instrumentation/sinatra/ignorer.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sinatra/transaction_namer.rb +1 -1
- data/lib/new_relic/agent/instrumentation/sunspot.rb +1 -1
- data/lib/new_relic/agent/instrumentation/typhoeus.rb +24 -7
- data/lib/new_relic/agent/internal_agent_error.rb +1 -1
- data/lib/new_relic/agent/javascript_instrumentor.rb +1 -1
- data/lib/new_relic/agent/log_once.rb +1 -1
- data/lib/new_relic/agent/logging.rb +19 -5
- data/lib/new_relic/agent/memory_logger.rb +1 -1
- data/lib/new_relic/agent/messaging.rb +6 -74
- data/lib/new_relic/agent/method_tracer.rb +19 -7
- data/lib/new_relic/agent/method_tracer_helpers.rb +3 -3
- data/lib/new_relic/agent/monitors.rb +27 -0
- data/lib/new_relic/agent/monitors/cross_app_monitor.rb +110 -0
- data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +27 -0
- data/lib/new_relic/agent/{inbound_request_monitor.rb → monitors/inbound_request_monitor.rb} +2 -2
- data/lib/new_relic/agent/{synthetics_monitor.rb → monitors/synthetics_monitor.rb} +3 -5
- data/lib/new_relic/agent/new_relic_service.rb +8 -7
- data/lib/new_relic/agent/new_relic_service/encoders.rb +1 -1
- data/lib/new_relic/agent/new_relic_service/json_marshaller.rb +1 -1
- data/lib/new_relic/agent/new_relic_service/marshaller.rb +1 -1
- data/lib/new_relic/agent/new_relic_service/security_policy_settings.rb +1 -1
- data/lib/new_relic/agent/noticible_error.rb +22 -0
- data/lib/new_relic/agent/null_logger.rb +1 -1
- data/lib/new_relic/agent/obfuscator.rb +1 -1
- data/lib/new_relic/agent/parameter_filtering.rb +1 -1
- data/lib/new_relic/agent/payload_metric_mapping.rb +1 -1
- data/lib/new_relic/agent/pipe_channel_manager.rb +1 -1
- data/lib/new_relic/agent/pipe_service.rb +1 -1
- data/lib/new_relic/agent/prepend_supportability.rb +1 -1
- data/lib/new_relic/agent/priority_sampled_buffer.rb +8 -5
- data/lib/new_relic/agent/range_extensions.rb +1 -1
- data/lib/new_relic/agent/rules_engine.rb +1 -1
- data/lib/new_relic/agent/rules_engine/replacement_rule.rb +1 -1
- data/lib/new_relic/agent/rules_engine/segment_terms_rule.rb +1 -1
- data/lib/new_relic/agent/sampler.rb +1 -1
- data/lib/new_relic/agent/sampler_collection.rb +1 -1
- data/lib/new_relic/agent/samplers/cpu_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/delayed_job_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/memory_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/object_sampler.rb +1 -1
- data/lib/new_relic/agent/samplers/vm_sampler.rb +1 -1
- data/lib/new_relic/agent/span_event_aggregator.rb +2 -1
- data/lib/new_relic/agent/span_event_primitive.rb +106 -54
- data/lib/new_relic/agent/sql_sampler.rb +6 -6
- data/lib/new_relic/agent/stats.rb +1 -1
- data/lib/new_relic/agent/stats_engine.rb +1 -1
- data/lib/new_relic/agent/stats_engine/gc_profiler.rb +1 -1
- data/lib/new_relic/agent/stats_engine/stats_hash.rb +1 -1
- data/lib/new_relic/agent/supported_versions.rb +3 -3
- data/lib/new_relic/agent/synthetics_event_aggregator.rb +1 -1
- data/lib/new_relic/agent/system_info.rb +13 -4
- data/lib/new_relic/agent/threading/agent_thread.rb +1 -1
- data/lib/new_relic/agent/threading/backtrace_node.rb +1 -1
- data/lib/new_relic/agent/threading/backtrace_service.rb +1 -1
- data/lib/new_relic/agent/threading/thread_profile.rb +1 -1
- data/lib/new_relic/agent/timestamp_sampled_buffer.rb +1 -1
- data/lib/new_relic/agent/tracer.rb +34 -19
- data/lib/new_relic/agent/transaction.rb +104 -82
- data/lib/new_relic/agent/transaction/abstract_segment.rb +31 -4
- data/lib/new_relic/agent/transaction/datastore_segment.rb +1 -1
- data/lib/new_relic/agent/transaction/distributed_tracer.rb +171 -0
- data/lib/new_relic/agent/transaction/distributed_tracing.rb +58 -147
- data/lib/new_relic/agent/transaction/external_request_segment.rb +30 -37
- data/lib/new_relic/agent/transaction/message_broker_segment.rb +4 -12
- data/lib/new_relic/agent/transaction/request_attributes.rb +1 -1
- data/lib/new_relic/agent/transaction/segment.rb +24 -2
- data/lib/new_relic/agent/transaction/slowest_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction/synthetics_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction/trace.rb +3 -5
- data/lib/new_relic/agent/transaction/trace_builder.rb +1 -1
- data/lib/new_relic/agent/transaction/trace_context.rb +168 -0
- data/lib/new_relic/agent/transaction/trace_node.rb +11 -9
- data/lib/new_relic/agent/transaction/tracing.rb +1 -1
- data/lib/new_relic/agent/transaction/transaction_sample_buffer.rb +1 -1
- data/lib/new_relic/agent/transaction_error_primitive.rb +11 -16
- data/lib/new_relic/agent/transaction_event_aggregator.rb +1 -1
- data/lib/new_relic/agent/transaction_event_primitive.rb +29 -40
- data/lib/new_relic/agent/transaction_event_recorder.rb +1 -1
- data/lib/new_relic/agent/transaction_metrics.rb +1 -1
- data/lib/new_relic/agent/transaction_sampler.rb +1 -1
- data/lib/new_relic/agent/transaction_time_aggregator.rb +1 -1
- data/lib/new_relic/agent/utilization/aws.rb +1 -1
- data/lib/new_relic/agent/utilization/azure.rb +1 -1
- data/lib/new_relic/agent/utilization/gcp.rb +1 -1
- 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/utilization_data.rb +1 -1
- data/lib/new_relic/agent/vm.rb +1 -1
- data/lib/new_relic/agent/vm/jruby_vm.rb +1 -1
- data/lib/new_relic/agent/vm/monotonic_gc_profiler.rb +1 -1
- data/lib/new_relic/agent/vm/mri_vm.rb +1 -1
- data/lib/new_relic/agent/vm/snapshot.rb +1 -1
- data/lib/new_relic/agent/worker_loop.rb +1 -1
- data/lib/new_relic/cli/command.rb +1 -1
- data/lib/new_relic/cli/commands/deployments.rb +1 -1
- data/lib/new_relic/cli/commands/install.rb +4 -3
- data/lib/new_relic/coerce.rb +32 -7
- data/lib/new_relic/collection_helper.rb +1 -1
- data/lib/new_relic/constants.rb +38 -0
- data/lib/new_relic/control.rb +1 -1
- data/lib/new_relic/control/class_methods.rb +1 -1
- data/lib/new_relic/control/frameworks.rb +1 -1
- data/lib/new_relic/control/frameworks/external.rb +1 -1
- data/lib/new_relic/control/frameworks/merb.rb +1 -1
- data/lib/new_relic/control/frameworks/rails.rb +1 -1
- data/lib/new_relic/control/frameworks/rails3.rb +1 -1
- data/lib/new_relic/control/frameworks/rails4.rb +1 -1
- data/lib/new_relic/control/frameworks/rails_notifications.rb +1 -1
- data/lib/new_relic/control/frameworks/ruby.rb +1 -1
- data/lib/new_relic/control/frameworks/sinatra.rb +1 -1
- data/lib/new_relic/control/instance_methods.rb +11 -2
- data/lib/new_relic/control/instrumentation.rb +1 -1
- data/lib/new_relic/control/server_methods.rb +1 -1
- data/lib/new_relic/delayed_job_injection.rb +1 -1
- data/lib/new_relic/dependency_detection.rb +5 -5
- data/lib/new_relic/environment_report.rb +6 -2
- data/lib/new_relic/helper.rb +1 -1
- data/lib/new_relic/language_support.rb +1 -1
- data/lib/new_relic/latest_changes.rb +2 -2
- data/lib/new_relic/local_environment.rb +1 -1
- data/lib/new_relic/metric_data.rb +1 -1
- data/lib/new_relic/metric_spec.rb +1 -1
- data/lib/new_relic/metrics.rb +1 -1
- data/lib/new_relic/noticed_error.rb +39 -18
- data/lib/new_relic/rack.rb +1 -1
- data/lib/new_relic/rack/agent_hooks.rb +1 -1
- data/lib/new_relic/rack/agent_middleware.rb +1 -1
- data/lib/new_relic/rack/browser_monitoring.rb +6 -1
- data/lib/new_relic/recipes.rb +1 -1
- data/lib/new_relic/recipes/capistrano3.rb +1 -1
- data/lib/new_relic/recipes/capistrano_legacy.rb +1 -1
- data/lib/new_relic/supportability_helper.rb +15 -1
- data/lib/new_relic/version.rb +2 -2
- data/lib/newrelic_rpm.rb +1 -1
- data/lib/sequel/extensions/newrelic_instrumentation.rb +1 -1
- data/lib/sequel/plugins/newrelic_instrumentation.rb +1 -1
- data/lib/tasks/all.rb +1 -1
- data/lib/tasks/multiverse.rb +26 -1
- data/lib/tasks/newrelic.rb +1 -1
- data/lib/tasks/tests.rake +6 -1
- data/newrelic_rpm.gemspec +19 -13
- data/recipes/newrelic.rb +1 -1
- data/test/agent_helper.rb +332 -72
- metadata +103 -38
- data/lib/new_relic/agent/cross_app_monitor.rb +0 -110
- data/lib/new_relic/agent/distributed_trace_monitor.rb +0 -40
- data/lib/new_relic/agent/http_clients/abstract_request.rb +0 -31
- data/lib/new_relic/agent/transaction/attributes.rb +0 -154
- data/lib/tasks/versions.html.erb +0 -28
- data/lib/tasks/versions.postface.html +0 -8
- data/lib/tasks/versions.preface.html +0 -9
- data/lib/tasks/versions.rake +0 -65
- data/lib/tasks/versions.txt.erb +0 -14
metadata
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: newrelic_rpm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.
|
4
|
+
version: 6.12.0.367
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
- Matthew Wear
|
8
|
-
- Chris Pine
|
9
7
|
- Rachel Klein
|
10
|
-
-
|
8
|
+
- Tanna McClure
|
9
|
+
- Michael Lang
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date:
|
13
|
+
date: 2020-07-14 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rake
|
@@ -19,26 +18,54 @@ dependencies:
|
|
19
18
|
requirements:
|
20
19
|
- - '='
|
21
20
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
21
|
+
version: 12.3.3
|
23
22
|
type: :development
|
24
23
|
prerelease: false
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
26
25
|
requirements:
|
27
26
|
- - '='
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
28
|
+
version: 12.3.3
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rb-inotify
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: 0.9.10
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.9.10
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: listen
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - '='
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 3.0.8
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - '='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 3.0.8
|
30
57
|
- !ruby/object:Gem::Dependency
|
31
58
|
name: minitest
|
32
59
|
requirement: !ruby/object:Gem::Requirement
|
33
60
|
requirements:
|
34
|
-
- -
|
61
|
+
- - '='
|
35
62
|
- !ruby/object:Gem::Version
|
36
63
|
version: 4.7.5
|
37
64
|
type: :development
|
38
65
|
prerelease: false
|
39
66
|
version_requirements: !ruby/object:Gem::Requirement
|
40
67
|
requirements:
|
41
|
-
- -
|
68
|
+
- - '='
|
42
69
|
- !ruby/object:Gem::Version
|
43
70
|
version: 4.7.5
|
44
71
|
- !ruby/object:Gem::Dependency
|
@@ -47,14 +74,14 @@ dependencies:
|
|
47
74
|
requirements:
|
48
75
|
- - "~>"
|
49
76
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
77
|
+
version: 1.9.0
|
51
78
|
type: :development
|
52
79
|
prerelease: false
|
53
80
|
version_requirements: !ruby/object:Gem::Requirement
|
54
81
|
requirements:
|
55
82
|
- - "~>"
|
56
83
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
84
|
+
version: 1.9.0
|
58
85
|
- !ruby/object:Gem::Dependency
|
59
86
|
name: yard
|
60
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -75,14 +102,14 @@ dependencies:
|
|
75
102
|
requirements:
|
76
103
|
- - "~>"
|
77
104
|
- !ruby/object:Gem::Version
|
78
|
-
version: 0.
|
105
|
+
version: 0.3.0
|
79
106
|
type: :development
|
80
107
|
prerelease: false
|
81
108
|
version_requirements: !ruby/object:Gem::Requirement
|
82
109
|
requirements:
|
83
110
|
- - "~>"
|
84
111
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.
|
112
|
+
version: 0.3.0
|
86
113
|
- !ruby/object:Gem::Dependency
|
87
114
|
name: pry-stack_explorer
|
88
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -97,6 +124,34 @@ dependencies:
|
|
97
124
|
- - "~>"
|
98
125
|
- !ruby/object:Gem::Version
|
99
126
|
version: 0.4.9
|
127
|
+
- !ruby/object:Gem::Dependency
|
128
|
+
name: guard
|
129
|
+
requirement: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - "~>"
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 2.16.0
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
requirements:
|
138
|
+
- - "~>"
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
version: 2.16.0
|
141
|
+
- !ruby/object:Gem::Dependency
|
142
|
+
name: guard-minitest
|
143
|
+
requirement: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 2.4.0
|
148
|
+
type: :development
|
149
|
+
prerelease: false
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - "~>"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 2.4.0
|
100
155
|
- !ruby/object:Gem::Dependency
|
101
156
|
name: hometown
|
102
157
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,23 +170,23 @@ dependencies:
|
|
115
170
|
name: bundler
|
116
171
|
requirement: !ruby/object:Gem::Requirement
|
117
172
|
requirements:
|
118
|
-
- - "
|
173
|
+
- - ">="
|
119
174
|
- !ruby/object:Gem::Version
|
120
|
-
version: '
|
175
|
+
version: '0'
|
121
176
|
type: :development
|
122
177
|
prerelease: false
|
123
178
|
version_requirements: !ruby/object:Gem::Requirement
|
124
179
|
requirements:
|
125
|
-
- - "
|
180
|
+
- - ">="
|
126
181
|
- !ruby/object:Gem::Version
|
127
|
-
version: '
|
182
|
+
version: '0'
|
128
183
|
description: |
|
129
184
|
New Relic is a performance management system, developed by New Relic,
|
130
185
|
Inc (http://www.newrelic.com). New Relic provides you with deep
|
131
186
|
information about the performance of your web application as it runs
|
132
|
-
in production. The New Relic Ruby
|
187
|
+
in production. The New Relic Ruby agent is dual-purposed as a either a
|
133
188
|
Gem or plugin, hosted on
|
134
|
-
https://github.com/newrelic/
|
189
|
+
https://github.com/newrelic/newrelic-ruby-agent/
|
135
190
|
email: support@newrelic.com
|
136
191
|
executables:
|
137
192
|
- mongrel_rpm
|
@@ -144,6 +199,7 @@ extra_rdoc_files:
|
|
144
199
|
- LICENSE
|
145
200
|
- README.md
|
146
201
|
- CONTRIBUTING.md
|
202
|
+
- CODE_OF_CONDUCT.md
|
147
203
|
- newrelic.yml
|
148
204
|
files:
|
149
205
|
- ".gitignore"
|
@@ -151,12 +207,14 @@ files:
|
|
151
207
|
- ".travis.yml"
|
152
208
|
- ".yardopts"
|
153
209
|
- CHANGELOG.md
|
210
|
+
- CODE_OF_CONDUCT.md
|
154
211
|
- CONTRIBUTING.md
|
155
212
|
- Gemfile
|
156
213
|
- Guardfile
|
157
214
|
- LICENSE
|
158
215
|
- README.md
|
159
216
|
- Rakefile
|
217
|
+
- THIRD_PARTY_NOTICES.md
|
160
218
|
- bin/mongrel_rpm
|
161
219
|
- bin/newrelic
|
162
220
|
- bin/newrelic_cmd
|
@@ -172,6 +230,7 @@ files:
|
|
172
230
|
- lib/new_relic/agent/agent_logger.rb
|
173
231
|
- lib/new_relic/agent/attribute_filter.rb
|
174
232
|
- lib/new_relic/agent/attribute_processing.rb
|
233
|
+
- lib/new_relic/agent/attributes.rb
|
175
234
|
- lib/new_relic/agent/audit_logger.rb
|
176
235
|
- lib/new_relic/agent/autostart.rb
|
177
236
|
- lib/new_relic/agent/chained_call.rb
|
@@ -192,9 +251,6 @@ files:
|
|
192
251
|
- lib/new_relic/agent/configuration/yaml_source.rb
|
193
252
|
- lib/new_relic/agent/connect/request_builder.rb
|
194
253
|
- lib/new_relic/agent/connect/response_handler.rb
|
195
|
-
- lib/new_relic/agent/cross_app_monitor.rb
|
196
|
-
- lib/new_relic/agent/cross_app_payload.rb
|
197
|
-
- lib/new_relic/agent/cross_app_tracing.rb
|
198
254
|
- lib/new_relic/agent/custom_event_aggregator.rb
|
199
255
|
- lib/new_relic/agent/database.rb
|
200
256
|
- lib/new_relic/agent/database/explain_plan_helpers.rb
|
@@ -210,9 +266,15 @@ files:
|
|
210
266
|
- lib/new_relic/agent/datastores/mongo/statement_formatter.rb
|
211
267
|
- lib/new_relic/agent/datastores/redis.rb
|
212
268
|
- lib/new_relic/agent/deprecator.rb
|
213
|
-
- lib/new_relic/agent/distributed_trace_monitor.rb
|
214
|
-
- lib/new_relic/agent/distributed_trace_payload.rb
|
215
269
|
- lib/new_relic/agent/distributed_tracing.rb
|
270
|
+
- lib/new_relic/agent/distributed_tracing/cross_app_payload.rb
|
271
|
+
- lib/new_relic/agent/distributed_tracing/cross_app_tracing.rb
|
272
|
+
- lib/new_relic/agent/distributed_tracing/distributed_trace_attributes.rb
|
273
|
+
- lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb
|
274
|
+
- lib/new_relic/agent/distributed_tracing/distributed_trace_payload.rb
|
275
|
+
- lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb
|
276
|
+
- lib/new_relic/agent/distributed_tracing/trace_context.rb
|
277
|
+
- lib/new_relic/agent/distributed_tracing/trace_context_payload.rb
|
216
278
|
- lib/new_relic/agent/encoding_normalizer.rb
|
217
279
|
- lib/new_relic/agent/error_collector.rb
|
218
280
|
- lib/new_relic/agent/error_event_aggregator.rb
|
@@ -222,10 +284,11 @@ files:
|
|
222
284
|
- lib/new_relic/agent/event_listener.rb
|
223
285
|
- lib/new_relic/agent/event_loop.rb
|
224
286
|
- lib/new_relic/agent/external.rb
|
287
|
+
- lib/new_relic/agent/guid_generator.rb
|
225
288
|
- lib/new_relic/agent/harvester.rb
|
226
289
|
- lib/new_relic/agent/heap.rb
|
227
290
|
- lib/new_relic/agent/hostname.rb
|
228
|
-
- lib/new_relic/agent/http_clients/
|
291
|
+
- lib/new_relic/agent/http_clients/abstract.rb
|
229
292
|
- lib/new_relic/agent/http_clients/curb_wrappers.rb
|
230
293
|
- lib/new_relic/agent/http_clients/excon_wrappers.rb
|
231
294
|
- lib/new_relic/agent/http_clients/http_rb_wrappers.rb
|
@@ -233,7 +296,6 @@ files:
|
|
233
296
|
- lib/new_relic/agent/http_clients/net_http_wrappers.rb
|
234
297
|
- lib/new_relic/agent/http_clients/typhoeus_wrappers.rb
|
235
298
|
- lib/new_relic/agent/http_clients/uri_util.rb
|
236
|
-
- lib/new_relic/agent/inbound_request_monitor.rb
|
237
299
|
- lib/new_relic/agent/instrumentation.rb
|
238
300
|
- lib/new_relic/agent/instrumentation/action_cable_subscriber.rb
|
239
301
|
- lib/new_relic/agent/instrumentation/action_controller_subscriber.rb
|
@@ -302,11 +364,17 @@ files:
|
|
302
364
|
- lib/new_relic/agent/messaging.rb
|
303
365
|
- lib/new_relic/agent/method_tracer.rb
|
304
366
|
- lib/new_relic/agent/method_tracer_helpers.rb
|
367
|
+
- lib/new_relic/agent/monitors.rb
|
368
|
+
- lib/new_relic/agent/monitors/cross_app_monitor.rb
|
369
|
+
- lib/new_relic/agent/monitors/distributed_tracing_monitor.rb
|
370
|
+
- lib/new_relic/agent/monitors/inbound_request_monitor.rb
|
371
|
+
- lib/new_relic/agent/monitors/synthetics_monitor.rb
|
305
372
|
- lib/new_relic/agent/new_relic_service.rb
|
306
373
|
- lib/new_relic/agent/new_relic_service/encoders.rb
|
307
374
|
- lib/new_relic/agent/new_relic_service/json_marshaller.rb
|
308
375
|
- lib/new_relic/agent/new_relic_service/marshaller.rb
|
309
376
|
- lib/new_relic/agent/new_relic_service/security_policy_settings.rb
|
377
|
+
- lib/new_relic/agent/noticible_error.rb
|
310
378
|
- lib/new_relic/agent/null_logger.rb
|
311
379
|
- lib/new_relic/agent/obfuscator.rb
|
312
380
|
- lib/new_relic/agent/parameter_filtering.rb
|
@@ -335,7 +403,6 @@ files:
|
|
335
403
|
- lib/new_relic/agent/stats_engine/stats_hash.rb
|
336
404
|
- lib/new_relic/agent/supported_versions.rb
|
337
405
|
- lib/new_relic/agent/synthetics_event_aggregator.rb
|
338
|
-
- lib/new_relic/agent/synthetics_monitor.rb
|
339
406
|
- lib/new_relic/agent/system_info.rb
|
340
407
|
- lib/new_relic/agent/threading/agent_thread.rb
|
341
408
|
- lib/new_relic/agent/threading/backtrace_node.rb
|
@@ -345,8 +412,8 @@ files:
|
|
345
412
|
- lib/new_relic/agent/tracer.rb
|
346
413
|
- lib/new_relic/agent/transaction.rb
|
347
414
|
- lib/new_relic/agent/transaction/abstract_segment.rb
|
348
|
-
- lib/new_relic/agent/transaction/attributes.rb
|
349
415
|
- lib/new_relic/agent/transaction/datastore_segment.rb
|
416
|
+
- lib/new_relic/agent/transaction/distributed_tracer.rb
|
350
417
|
- lib/new_relic/agent/transaction/distributed_tracing.rb
|
351
418
|
- lib/new_relic/agent/transaction/external_request_segment.rb
|
352
419
|
- lib/new_relic/agent/transaction/message_broker_segment.rb
|
@@ -356,6 +423,7 @@ files:
|
|
356
423
|
- lib/new_relic/agent/transaction/synthetics_sample_buffer.rb
|
357
424
|
- lib/new_relic/agent/transaction/trace.rb
|
358
425
|
- lib/new_relic/agent/transaction/trace_builder.rb
|
426
|
+
- lib/new_relic/agent/transaction/trace_context.rb
|
359
427
|
- lib/new_relic/agent/transaction/trace_node.rb
|
360
428
|
- lib/new_relic/agent/transaction/tracing.rb
|
361
429
|
- lib/new_relic/agent/transaction/transaction_sample_buffer.rb
|
@@ -384,6 +452,7 @@ files:
|
|
384
452
|
- lib/new_relic/cli/commands/install.rb
|
385
453
|
- lib/new_relic/coerce.rb
|
386
454
|
- lib/new_relic/collection_helper.rb
|
455
|
+
- lib/new_relic/constants.rb
|
387
456
|
- lib/new_relic/control.rb
|
388
457
|
- lib/new_relic/control/class_methods.rb
|
389
458
|
- lib/new_relic/control/frameworks.rb
|
@@ -430,23 +499,19 @@ files:
|
|
430
499
|
- lib/tasks/multiverse.rb
|
431
500
|
- lib/tasks/newrelic.rb
|
432
501
|
- lib/tasks/tests.rake
|
433
|
-
- lib/tasks/versions.html.erb
|
434
|
-
- lib/tasks/versions.postface.html
|
435
|
-
- lib/tasks/versions.preface.html
|
436
|
-
- lib/tasks/versions.rake
|
437
|
-
- lib/tasks/versions.txt.erb
|
438
502
|
- newrelic.yml
|
439
503
|
- newrelic_rpm.gemspec
|
440
504
|
- recipes/newrelic.rb
|
441
505
|
- test/agent_helper.rb
|
442
506
|
homepage: https://github.com/newrelic/rpm
|
443
507
|
licenses:
|
444
|
-
-
|
508
|
+
- Apache-2.0
|
445
509
|
metadata:
|
446
|
-
bug_tracker_uri: https://
|
447
|
-
changelog_uri: https://github.com/newrelic/
|
510
|
+
bug_tracker_uri: https://github.com/newrelic/newrelic-ruby-agent/issues
|
511
|
+
changelog_uri: https://github.com/newrelic/newrelic-ruby-agent/blob/main/CHANGELOG.md
|
448
512
|
documentation_uri: https://docs.newrelic.com/docs/agents/ruby-agent
|
449
|
-
source_code_uri: https://github.com/newrelic/
|
513
|
+
source_code_uri: https://github.com/newrelic/newrelic-ruby-agent
|
514
|
+
homepage_uri: https://newrelic.com/ruby
|
450
515
|
post_install_message:
|
451
516
|
rdoc_options: []
|
452
517
|
require_paths:
|
@@ -462,7 +527,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
462
527
|
- !ruby/object:Gem::Version
|
463
528
|
version: 1.3.1
|
464
529
|
requirements: []
|
465
|
-
rubygems_version: 3.
|
530
|
+
rubygems_version: 3.1.3
|
466
531
|
signing_key:
|
467
532
|
specification_version: 4
|
468
533
|
summary: New Relic Ruby Agent
|
@@ -1,110 +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 'digest'
|
6
|
-
require 'json'
|
7
|
-
|
8
|
-
require 'new_relic/agent/inbound_request_monitor'
|
9
|
-
require 'new_relic/agent/tracer'
|
10
|
-
require 'new_relic/agent/threading/agent_thread'
|
11
|
-
require 'new_relic/agent/cross_app_payload'
|
12
|
-
|
13
|
-
module NewRelic
|
14
|
-
module Agent
|
15
|
-
class CrossAppMonitor < InboundRequestMonitor
|
16
|
-
|
17
|
-
NEWRELIC_ID_HEADER = 'X-NewRelic-ID'.freeze
|
18
|
-
NEWRELIC_TXN_HEADER = 'X-NewRelic-Transaction'.freeze
|
19
|
-
NEWRELIC_APPDATA_HEADER = 'X-NewRelic-App-Data'.freeze
|
20
|
-
|
21
|
-
NEWRELIC_ID_HEADER_KEY = 'HTTP_X_NEWRELIC_ID'.freeze
|
22
|
-
NEWRELIC_TXN_HEADER_KEY = 'HTTP_X_NEWRELIC_TRANSACTION'.freeze
|
23
|
-
CONTENT_LENGTH_HEADER_KEY = 'HTTP_CONTENT_LENGTH'.freeze
|
24
|
-
|
25
|
-
def on_finished_configuring(events)
|
26
|
-
register_event_listeners(events)
|
27
|
-
end
|
28
|
-
|
29
|
-
def path_hash(txn_name, seed)
|
30
|
-
rotated = ((seed << 1) | (seed >> 31)) & 0xffffffff
|
31
|
-
app_name = NewRelic::Agent.config[:app_name].first
|
32
|
-
identifier = "#{app_name};#{txn_name}"
|
33
|
-
sprintf("%08x", rotated ^ hash_transaction_name(identifier))
|
34
|
-
end
|
35
|
-
|
36
|
-
private
|
37
|
-
|
38
|
-
# Expected sequence of events:
|
39
|
-
# :before_call will save our cross application request id to the thread
|
40
|
-
# :after_call will write our response headers/metrics and clean up the thread
|
41
|
-
def register_event_listeners(events)
|
42
|
-
NewRelic::Agent.logger.
|
43
|
-
debug("Wiring up Cross Application Tracing to events after finished configuring")
|
44
|
-
|
45
|
-
events.subscribe(:before_call) do |env| #THREAD_LOCAL_ACCESS
|
46
|
-
if id = decoded_id(env) and should_process_request?(id)
|
47
|
-
state = NewRelic::Agent::Tracer.state
|
48
|
-
|
49
|
-
if (transaction = state.current_transaction)
|
50
|
-
transaction_info = referring_transaction_info(state, env)
|
51
|
-
|
52
|
-
payload = CrossAppPayload.new(id, transaction, transaction_info)
|
53
|
-
transaction.cross_app_payload = payload
|
54
|
-
end
|
55
|
-
|
56
|
-
CrossAppTracing.assign_intrinsic_transaction_attributes state
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
events.subscribe(:after_call) do |env, (_status_code, headers, _body)| #THREAD_LOCAL_ACCESS
|
61
|
-
state = NewRelic::Agent::Tracer.state
|
62
|
-
|
63
|
-
insert_response_header(state, env, headers)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
|
-
def referring_transaction_info(state, request_headers)
|
68
|
-
txn_header = request_headers[NEWRELIC_TXN_HEADER_KEY] or return
|
69
|
-
deserialize_header(txn_header, NEWRELIC_TXN_HEADER)
|
70
|
-
end
|
71
|
-
|
72
|
-
def insert_response_header(state, request_headers, response_headers)
|
73
|
-
txn = state.current_transaction
|
74
|
-
unless txn.nil? || txn.cross_app_payload.nil?
|
75
|
-
txn.freeze_name_and_execute_if_not_ignored do
|
76
|
-
content_length = content_length_from_request(request_headers)
|
77
|
-
set_response_headers(txn, response_headers, content_length)
|
78
|
-
end
|
79
|
-
end
|
80
|
-
end
|
81
|
-
|
82
|
-
def should_process_request? id
|
83
|
-
CrossAppTracing.cross_app_enabled? && CrossAppTracing.trusts?(id)
|
84
|
-
end
|
85
|
-
|
86
|
-
def set_response_headers(transaction, response_headers, content_length)
|
87
|
-
payload = obfuscator.obfuscate(
|
88
|
-
::JSON.dump(
|
89
|
-
transaction.cross_app_payload.as_json_array(content_length)))
|
90
|
-
|
91
|
-
response_headers[NEWRELIC_APPDATA_HEADER] = payload
|
92
|
-
end
|
93
|
-
|
94
|
-
def decoded_id(request)
|
95
|
-
encoded_id = request[NEWRELIC_ID_HEADER_KEY]
|
96
|
-
return "" if encoded_id.nil? || encoded_id.empty?
|
97
|
-
|
98
|
-
obfuscator.deobfuscate(encoded_id)
|
99
|
-
end
|
100
|
-
|
101
|
-
def content_length_from_request(request)
|
102
|
-
request[CONTENT_LENGTH_HEADER_KEY] || -1
|
103
|
-
end
|
104
|
-
|
105
|
-
def hash_transaction_name(identifier)
|
106
|
-
Digest::MD5.digest(identifier).unpack("@12N").first & 0xffffffff
|
107
|
-
end
|
108
|
-
end
|
109
|
-
end
|
110
|
-
end
|