newrelic_rpm 6.8.0.360 → 6.9.0.363
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +16 -16
- data/CHANGELOG.md +64 -0
- data/lib/new_relic/agent.rb +6 -5
- data/lib/new_relic/agent/agent.rb +43 -36
- data/lib/new_relic/agent/attributes.rb +2 -4
- data/lib/new_relic/agent/configuration/default_source.rb +23 -22
- data/lib/new_relic/agent/configuration/server_source.rb +1 -1
- data/lib/new_relic/agent/configuration/yaml_source.rb +1 -1
- data/lib/new_relic/agent/database.rb +1 -2
- data/lib/new_relic/agent/distributed_tracing.rb +155 -6
- data/lib/new_relic/agent/{cross_app_payload.rb → distributed_tracing/cross_app_payload.rb} +0 -0
- data/lib/new_relic/agent/{cross_app_tracing.rb → distributed_tracing/cross_app_tracing.rb} +60 -45
- data/lib/new_relic/agent/distributed_tracing/distributed_trace_intrinsics.rb +80 -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} +19 -28
- 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/{trace_context_payload.rb → distributed_tracing/trace_context_payload.rb} +3 -11
- data/lib/new_relic/agent/error_collector.rb +3 -5
- data/lib/new_relic/agent/error_event_aggregator.rb +3 -1
- data/lib/new_relic/agent/external.rb +7 -7
- data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +1 -2
- data/lib/new_relic/agent/instrumentation/bunny.rb +1 -1
- data/lib/new_relic/agent/instrumentation/curb.rb +1 -1
- data/lib/new_relic/agent/instrumentation/excon.rb +1 -1
- data/lib/new_relic/agent/instrumentation/grape.rb +5 -10
- data/lib/new_relic/agent/instrumentation/http.rb +1 -1
- data/lib/new_relic/agent/instrumentation/httpclient.rb +1 -1
- data/lib/new_relic/agent/instrumentation/net.rb +1 -1
- data/lib/new_relic/agent/instrumentation/resque.rb +3 -0
- data/lib/new_relic/agent/instrumentation/typhoeus.rb +1 -1
- data/lib/new_relic/agent/logging.rb +13 -3
- data/lib/new_relic/agent/messaging.rb +5 -73
- data/lib/new_relic/agent/method_tracer.rb +3 -2
- data/lib/new_relic/agent/method_tracer_helpers.rb +1 -1
- 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} +1 -1
- data/lib/new_relic/agent/{synthetics_monitor.rb → monitors/synthetics_monitor.rb} +2 -4
- data/lib/new_relic/agent/span_event_primitive.rb +25 -29
- data/lib/new_relic/agent/sql_sampler.rb +2 -2
- data/lib/new_relic/agent/supported_versions.rb +2 -2
- data/lib/new_relic/agent/tracer.rb +3 -3
- data/lib/new_relic/agent/transaction.rb +21 -28
- data/lib/new_relic/agent/transaction/distributed_tracer.rb +171 -0
- data/lib/new_relic/agent/transaction/distributed_tracing.rb +61 -69
- data/lib/new_relic/agent/transaction/external_request_segment.rb +8 -44
- data/lib/new_relic/agent/transaction/message_broker_segment.rb +3 -11
- data/lib/new_relic/agent/transaction/trace.rb +2 -4
- data/lib/new_relic/agent/transaction/trace_context.rb +88 -79
- data/lib/new_relic/agent/transaction/trace_node.rb +2 -5
- data/lib/new_relic/agent/transaction_error_primitive.rb +2 -2
- data/lib/new_relic/agent/transaction_event_primitive.rb +26 -29
- data/lib/new_relic/coerce.rb +5 -3
- data/lib/new_relic/constants.rb +34 -0
- data/lib/new_relic/noticed_error.rb +2 -4
- data/lib/new_relic/rack/browser_monitoring.rb +4 -0
- data/lib/new_relic/supportability_helper.rb +14 -0
- data/lib/new_relic/version.rb +1 -1
- data/lib/tasks/tests.rake +6 -1
- data/newrelic_rpm.gemspec +4 -2
- data/test/agent_helper.rb +21 -1
- metadata +49 -19
- data/lib/new_relic/agent/cross_app_monitor.rb +0 -110
- data/lib/new_relic/agent/distributed_trace_intrinsics.rb +0 -90
- data/lib/new_relic/agent/distributed_trace_metrics.rb +0 -74
- data/lib/new_relic/agent/distributed_trace_monitor.rb +0 -30
- data/lib/new_relic/agent/distributed_trace_transport_type.rb +0 -43
- data/lib/new_relic/agent/trace_context.rb +0 -244
- data/lib/new_relic/agent/trace_context_request_monitor.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eb269d5c36e6139c7b617d3083418a8c8acf85e94c4f1005b1241aafc9471dd
|
4
|
+
data.tar.gz: da6387b811e5402cd2a0da7b80acc5b88338768cf36e01b1c86d7576c2592f3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 077d136a9c8e3771f506ee67422983ae4782e23b9118e9cb070f35fdf3af7b8a9d9ed125725db34945d8195529c0c22bbde0a7ab313d1fae9488485e40f7398d
|
7
|
+
data.tar.gz: c577d7a04fac1e22f043156635d4d2eeb3674707a2f50f7b11756855f4b4ae7e3479a6783d45decdc1a4950ce2b69e8d1d691bad6ebe67b504b098838fa6c86f
|
data/.travis.yml
CHANGED
@@ -47,7 +47,7 @@ branches:
|
|
47
47
|
rvm:
|
48
48
|
# Run slowest builds first to try and optimize overall cycle time.
|
49
49
|
- jruby-9.2.6.0
|
50
|
-
- 2.7.0
|
50
|
+
- 2.7.0
|
51
51
|
- 2.6.1
|
52
52
|
- 2.5.3
|
53
53
|
- 2.4.2
|
@@ -100,37 +100,37 @@ matrix:
|
|
100
100
|
exclude:
|
101
101
|
# Unsupported Rails/Ruby combinations
|
102
102
|
# 2.7
|
103
|
-
- rvm: 2.7.0
|
103
|
+
- rvm: 2.7.0
|
104
104
|
env: TYPE=UNIT ENVIRONMENT=rails30
|
105
|
-
- rvm: 2.7.0
|
105
|
+
- rvm: 2.7.0
|
106
106
|
env: TYPE=UNIT ENVIRONMENT=rails31
|
107
|
-
- rvm: 2.7.0
|
107
|
+
- rvm: 2.7.0
|
108
108
|
env: TYPE=UNIT ENVIRONMENT=rails32
|
109
|
-
- rvm: 2.7.0
|
109
|
+
- rvm: 2.7.0
|
110
110
|
env: TYPE=UNIT ENVIRONMENT=rails40
|
111
|
-
- rvm: 2.7.0
|
111
|
+
- rvm: 2.7.0
|
112
112
|
env: TYPE=UNIT ENVIRONMENT=rails41
|
113
113
|
|
114
|
-
- rvm: 2.7.0
|
114
|
+
- rvm: 2.7.0
|
115
115
|
env: TYPE=UNIT ENVIRONMENT=rails42 # rails (= 4.2.11) depends on bundler (< 2.0, >= 1.3.0)
|
116
|
-
- rvm: 2.7.0
|
116
|
+
- rvm: 2.7.0
|
117
117
|
env: TYPE=UNIT ENVIRONMENT=rails50 # rails (= 5.0.0) depends on bundler (< 2.0, >= 1.3.0)
|
118
|
-
- rvm: 2.7.0
|
118
|
+
- rvm: 2.7.0
|
119
119
|
env: TYPE=UNIT ENVIRONMENT=rails51 # rails (= 5.1.0) depends on bundler (< 2.0, >= 1.3.0)
|
120
|
-
- rvm: 2.7.0
|
120
|
+
- rvm: 2.7.0
|
121
121
|
env: TYPE=FUNCTIONAL GROUP=api # blocked: https://github.com/solnic/coercible/issues/27
|
122
|
-
- rvm: 2.7.0
|
122
|
+
- rvm: 2.7.0
|
123
123
|
env: TYPE=FUNCTIONAL GROUP=sinatra # padrino (~> 0.14.0) depends on bundler (~> 1.0)
|
124
124
|
|
125
|
-
- rvm: 2.7.0
|
125
|
+
- rvm: 2.7.0
|
126
126
|
env: TYPE=UNIT ENVIRONMENT=rails42 # rails (= 4.2.11) depends on bundler (< 2.0, >= 1.3.0)
|
127
|
-
- rvm: 2.7.0
|
127
|
+
- rvm: 2.7.0
|
128
128
|
env: TYPE=UNIT ENVIRONMENT=rails50 # rails (= 5.0.0) depends on bundler (< 2.0, >= 1.3.0)
|
129
|
-
- rvm: 2.7.0
|
129
|
+
- rvm: 2.7.0
|
130
130
|
env: TYPE=UNIT ENVIRONMENT=rails51 # rails (= 5.1.0) depends on bundler (< 2.0, >= 1.3.0)
|
131
|
-
- rvm: 2.7.0
|
131
|
+
- rvm: 2.7.0
|
132
132
|
env: TYPE=FUNCTIONAL GROUP=api # blocked: https://github.com/solnic/coercible/issues/27
|
133
|
-
- rvm: 2.7.0
|
133
|
+
- rvm: 2.7.0
|
134
134
|
env: TYPE=FUNCTIONAL GROUP=sinatra # padrino (~> 0.14.0) depends on bundler (~> 1.0)
|
135
135
|
|
136
136
|
# 2.6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,69 @@
|
|
1
1
|
# New Relic Ruby Agent Release Notes #
|
2
2
|
|
3
|
+
## v6.9.0
|
4
|
+
|
5
|
+
* **Added support for W3C Trace Context, with easy upgrade from New Relic trace context**
|
6
|
+
|
7
|
+
* [Distributed Tracing now supports W3C Trace Context headers](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/get-started/introduction-distributed-tracing#w3c-support) for HTTP protocols when distributed tracing is enabled. Our implementation can accept and emit both
|
8
|
+
the W3C trace header format and the New Relic trace header format. This simplifies
|
9
|
+
agent upgrades, allowing trace context to be propagated between services with older
|
10
|
+
and newer releases of New Relic agents. W3C trace header format will always be
|
11
|
+
accepted and emitted. New Relic trace header format will be accepted, and you can
|
12
|
+
optionally disable emission of the New Relic trace header format.
|
13
|
+
|
14
|
+
* When distributed tracing is enabled by setting `distributed_tracing.enabled` to `true`,
|
15
|
+
the Ruby agent will now accept W3C's `traceparent` and `tracestate` headers when
|
16
|
+
calling `DistributedTracing.accept_distributed_trace_headers` or automatically via
|
17
|
+
`http` instrumentation. When calling `DistributedTracing.insert_distributed_trace_headers`,
|
18
|
+
or automatically via `http` instrumentation, the Ruby agent will include the W3C
|
19
|
+
headers along with the New Relic distributed tracing header, unless the New Relic
|
20
|
+
trace header format is disabled by setting `exclude_newrelic_header` setting to `true`.
|
21
|
+
|
22
|
+
* Added `DistributedTracing.accept_distributed_trace_headers` API for accepting both
|
23
|
+
New Relic and W3C TraceContext distributed traces.
|
24
|
+
|
25
|
+
* Deprecated `DistributedTracing.accept_distributed_trace_payload` which will be removed
|
26
|
+
in a future major release.
|
27
|
+
|
28
|
+
* Added `DistributedTracing.insert_distributed_trace_headers` API for adding outbound
|
29
|
+
distributed trace headers. Both W3C TraceContext and New Relic formats will be
|
30
|
+
included unless `distributed_tracing.exclude_newrelic_header: true`.
|
31
|
+
|
32
|
+
* Deprecated `DistributedTracing.create_distributed_trace_payload` which will be removed
|
33
|
+
in a future major release.
|
34
|
+
|
35
|
+
Known Issues and Workarounds
|
36
|
+
|
37
|
+
* If a .NET agent is initiating traces as the root service, do not upgrade your
|
38
|
+
downstream Ruby New Relic agents to this agent release.
|
39
|
+
|
40
|
+
* **Official Ruby 2.7 support**
|
41
|
+
|
42
|
+
The Ruby agent has been verified to run with Ruby 2.7.0.
|
43
|
+
|
44
|
+
* **Reduced allocations when tracing transactions using API calls**
|
45
|
+
|
46
|
+
Default empty hashes for `options` parameter were not frozen, leading to
|
47
|
+
excessive and unnecessary allocations when calling APIs for tracing transactions.
|
48
|
+
|
49
|
+
Thanks to Joel Turkel (jturkel) for the contribution!
|
50
|
+
|
51
|
+
* **Bugfix for Resque worker thread race conditions**
|
52
|
+
|
53
|
+
Recent changes in Rack surfaced issues marshalling data for resque, surfaced a potential race-condition with closing out the worker-threads before flushing the data pipe. This
|
54
|
+
is now fixed.
|
55
|
+
|
56
|
+
Thanks to Bertrand Paquet (bpaquet) for the contribution!
|
57
|
+
|
58
|
+
* **Bugfix for Content-Length when injecting Browser Monitoring JS**
|
59
|
+
|
60
|
+
The Content-Length HTTP header would be incorrect after injecting the Browser Monitoring
|
61
|
+
JS into the HEAD tag of the HTML source with Content-Length and lead to the HTML BODY content
|
62
|
+
being truncated in some cases. The Content-Length is now correctly updated after injecting the
|
63
|
+
Browser Monitoring JS script.
|
64
|
+
|
65
|
+
Thanks to Slava Kardakov (ojab) for the contribution!
|
66
|
+
|
3
67
|
## v6.8.0
|
4
68
|
|
5
69
|
* **Initial Ruby 2.7 support**
|
data/lib/new_relic/agent.rb
CHANGED
@@ -35,7 +35,6 @@ module NewRelic
|
|
35
35
|
require 'new_relic/agent/encoding_normalizer'
|
36
36
|
require 'new_relic/agent/stats'
|
37
37
|
require 'new_relic/agent/chained_call'
|
38
|
-
require 'new_relic/agent/cross_app_monitor'
|
39
38
|
require 'new_relic/agent/agent'
|
40
39
|
require 'new_relic/agent/method_tracer'
|
41
40
|
require 'new_relic/agent/worker_loop'
|
@@ -56,7 +55,8 @@ module NewRelic
|
|
56
55
|
require 'new_relic/agent/external'
|
57
56
|
require 'new_relic/agent/deprecator'
|
58
57
|
require 'new_relic/agent/logging'
|
59
|
-
|
58
|
+
require 'new_relic/agent/distributed_tracing'
|
59
|
+
|
60
60
|
require 'new_relic/agent/instrumentation/controller_instrumentation'
|
61
61
|
|
62
62
|
require 'new_relic/agent/samplers/cpu_sampler'
|
@@ -351,10 +351,9 @@ module NewRelic
|
|
351
351
|
# @api public
|
352
352
|
#
|
353
353
|
def manual_start(options={})
|
354
|
-
record_api_supportability_metric(:manual_start)
|
355
|
-
|
356
354
|
raise "Options must be a hash" unless Hash === options
|
357
355
|
NewRelic::Control.instance.init_plugin({ :agent_enabled => true, :sync_startup => true }.merge(options))
|
356
|
+
record_api_supportability_metric(:manual_start)
|
358
357
|
end
|
359
358
|
|
360
359
|
# Register this method as a callback for processes that fork
|
@@ -620,7 +619,9 @@ module NewRelic
|
|
620
619
|
# apply a reasonable default based on framework routing, but in
|
621
620
|
# cases where this is insufficient, this can be used to manually
|
622
621
|
# control the name of the transaction.
|
623
|
-
#
|
622
|
+
#
|
623
|
+
# The category of transaction can be specified via the +:category+ option.
|
624
|
+
# The following are the only valid categories:
|
624
625
|
#
|
625
626
|
# * <tt>:category => :controller</tt> indicates that this is a
|
626
627
|
# controller action and will appear with all the other actions.
|
@@ -8,6 +8,8 @@ require 'net/http'
|
|
8
8
|
require 'logger'
|
9
9
|
require 'zlib'
|
10
10
|
require 'stringio'
|
11
|
+
require 'new_relic/constants'
|
12
|
+
require 'new_relic/coerce'
|
11
13
|
require 'new_relic/agent/autostart'
|
12
14
|
require 'new_relic/agent/harvester'
|
13
15
|
require 'new_relic/agent/hostname'
|
@@ -17,10 +19,8 @@ require 'new_relic/agent/configuration/manager'
|
|
17
19
|
require 'new_relic/agent/database'
|
18
20
|
require 'new_relic/agent/commands/agent_command_router'
|
19
21
|
require 'new_relic/agent/event_listener'
|
20
|
-
require 'new_relic/agent/
|
21
|
-
require 'new_relic/agent/
|
22
|
-
require 'new_relic/agent/trace_context_request_monitor'
|
23
|
-
require 'new_relic/agent/synthetics_monitor'
|
22
|
+
require 'new_relic/agent/distributed_tracing'
|
23
|
+
require 'new_relic/agent/monitors'
|
24
24
|
require 'new_relic/agent/transaction_event_recorder'
|
25
25
|
require 'new_relic/agent/custom_event_aggregator'
|
26
26
|
require 'new_relic/agent/span_event_aggregator'
|
@@ -49,32 +49,30 @@ module NewRelic
|
|
49
49
|
def initialize
|
50
50
|
@started = false
|
51
51
|
@event_loop = nil
|
52
|
+
@worker_thread = nil
|
52
53
|
|
53
54
|
@service = NewRelicService.new
|
54
55
|
|
55
|
-
@events =
|
56
|
-
@stats_engine =
|
57
|
-
@transaction_sampler =
|
58
|
-
@sql_sampler =
|
59
|
-
@agent_command_router =
|
60
|
-
@
|
61
|
-
@
|
62
|
-
@
|
63
|
-
@
|
64
|
-
@
|
65
|
-
@
|
66
|
-
@
|
67
|
-
|
68
|
-
|
69
|
-
@
|
70
|
-
self.class.config[:sampling_target_period_in_seconds])
|
71
|
-
|
72
|
-
@harvester = NewRelic::Agent::Harvester.new(@events)
|
56
|
+
@events = EventListener.new
|
57
|
+
@stats_engine = StatsEngine.new
|
58
|
+
@transaction_sampler = TransactionSampler.new
|
59
|
+
@sql_sampler = SqlSampler.new
|
60
|
+
@agent_command_router = Commands::AgentCommandRouter.new @events
|
61
|
+
@monitors = Monitors.new @events
|
62
|
+
@error_collector = ErrorCollector.new @events
|
63
|
+
@transaction_rules = RulesEngine.new
|
64
|
+
@harvest_samplers = SamplerCollection.new @events
|
65
|
+
@monotonic_gc_profiler = VM::MonotonicGCProfiler.new
|
66
|
+
@javascript_instrumentor = JavascriptInstrumentor.new @events
|
67
|
+
@adaptive_sampler = AdaptiveSampler.new(Agent.config[:sampling_target],
|
68
|
+
Agent.config[:sampling_target_period_in_seconds])
|
69
|
+
|
70
|
+
@harvester = Harvester.new @events
|
73
71
|
@after_fork_lock = Mutex.new
|
74
72
|
|
75
|
-
@transaction_event_recorder =
|
76
|
-
@custom_event_aggregator =
|
77
|
-
@span_event_aggregator =
|
73
|
+
@transaction_event_recorder = TransactionEventRecorder.new @events
|
74
|
+
@custom_event_aggregator = CustomEventAggregator.new @events
|
75
|
+
@span_event_aggregator = SpanEventAggregator.new @events
|
78
76
|
|
79
77
|
@connect_state = :pending
|
80
78
|
@connect_attempts = 0
|
@@ -96,7 +94,7 @@ module NewRelic
|
|
96
94
|
end
|
97
95
|
|
98
96
|
def refresh_attribute_filter
|
99
|
-
@attribute_filter =
|
97
|
+
@attribute_filter = AttributeFilter.new(Agent.config)
|
100
98
|
end
|
101
99
|
|
102
100
|
# contains all the class-level methods for NewRelic::Agent::Agent
|
@@ -129,13 +127,16 @@ module NewRelic
|
|
129
127
|
# cross application tracing ids and encoding
|
130
128
|
attr_reader :cross_process_id
|
131
129
|
attr_reader :cross_app_encoding_bytes
|
132
|
-
attr_reader :cross_app_monitor
|
133
130
|
# service for communicating with collector
|
134
131
|
attr_accessor :service
|
135
132
|
# Global events dispatcher. This will provides our primary mechanism
|
136
133
|
# for agent-wide events, such as finishing configuration, error notification
|
137
134
|
# and request before/after from Rack.
|
138
135
|
attr_reader :events
|
136
|
+
|
137
|
+
# listens and responds to events that need to process headers
|
138
|
+
# for synthetics and distributed tracing
|
139
|
+
attr_reader :monitors
|
139
140
|
# Transaction and metric renaming rules as provided by the
|
140
141
|
# collector on connect. The former are applied during txns,
|
141
142
|
# the latter during harvest.
|
@@ -208,7 +209,7 @@ module NewRelic
|
|
208
209
|
end
|
209
210
|
|
210
211
|
def install_pipe_service(channel_id)
|
211
|
-
@service =
|
212
|
+
@service = PipeService.new(channel_id)
|
212
213
|
if connected?
|
213
214
|
@connected_pid = Process.pid
|
214
215
|
else
|
@@ -239,12 +240,18 @@ module NewRelic
|
|
239
240
|
end
|
240
241
|
|
241
242
|
def revert_to_default_configuration
|
242
|
-
|
243
|
-
|
243
|
+
Agent.config.remove_config_type(:manual)
|
244
|
+
Agent.config.remove_config_type(:server)
|
244
245
|
end
|
245
246
|
|
246
247
|
def stop_event_loop
|
247
248
|
@event_loop.stop if @event_loop
|
249
|
+
# Wait the end of the event loop thread.
|
250
|
+
if @worker_thread
|
251
|
+
unless @worker_thread.join(3)
|
252
|
+
::NewRelic::Agent.logger.error "Event loop thread did not stop within 3 seconds"
|
253
|
+
end
|
254
|
+
end
|
248
255
|
end
|
249
256
|
|
250
257
|
def trap_signals_for_litespeed
|
@@ -459,11 +466,11 @@ module NewRelic
|
|
459
466
|
def defer_for_resque?
|
460
467
|
NewRelic::Agent.config[:dispatcher] == :resque &&
|
461
468
|
NewRelic::LanguageSupport.can_fork? &&
|
462
|
-
!
|
469
|
+
!PipeChannelManager.listener.started?
|
463
470
|
end
|
464
471
|
|
465
472
|
def in_resque_child_process?
|
466
|
-
defined?(@service) && @service.is_a?(
|
473
|
+
defined?(@service) && @service.is_a?(PipeService)
|
467
474
|
end
|
468
475
|
|
469
476
|
# Sanity-check the agent configuration and start the agent,
|
@@ -559,11 +566,11 @@ module NewRelic
|
|
559
566
|
# This is necessary for cases where we're in a forked child and Ruby
|
560
567
|
# might be holding locks for background thread that aren't there anymore.
|
561
568
|
def reset_objects_with_locks
|
562
|
-
@stats_engine =
|
569
|
+
@stats_engine = StatsEngine.new
|
563
570
|
end
|
564
571
|
|
565
572
|
def flush_pipe_data
|
566
|
-
if connected? && @service.is_a?(
|
573
|
+
if connected? && @service.is_a?(PipeService)
|
567
574
|
transmit_data
|
568
575
|
transmit_analytic_event_data
|
569
576
|
transmit_custom_event_data
|
@@ -707,7 +714,7 @@ module NewRelic
|
|
707
714
|
end
|
708
715
|
|
709
716
|
::NewRelic::Agent.logger.debug "Creating Ruby Agent worker thread."
|
710
|
-
@worker_thread =
|
717
|
+
@worker_thread = Threading::AgentThread.create('Worker Loop') do
|
711
718
|
deferred_work!(connection_options)
|
712
719
|
end
|
713
720
|
end
|
@@ -1024,7 +1031,7 @@ module NewRelic
|
|
1024
1031
|
end
|
1025
1032
|
|
1026
1033
|
def harvest_and_send_timeslice_data
|
1027
|
-
|
1034
|
+
TransactionTimeAggregator.harvest!
|
1028
1035
|
harvest_and_send_from_container(@stats_engine, :metric_data)
|
1029
1036
|
end
|
1030
1037
|
|
@@ -11,8 +11,6 @@ module NewRelic
|
|
11
11
|
VALUE_LIMIT = 255
|
12
12
|
COUNT_LIMIT = 64
|
13
13
|
|
14
|
-
EMPTY_HASH = {}.freeze
|
15
|
-
|
16
14
|
def initialize(filter)
|
17
15
|
@filter = filter
|
18
16
|
|
@@ -76,7 +74,7 @@ module NewRelic
|
|
76
74
|
destination == NewRelic::Agent::AttributeFilter::DST_ERROR_COLLECTOR
|
77
75
|
@intrinsic_attributes
|
78
76
|
else
|
79
|
-
EMPTY_HASH
|
77
|
+
NewRelic::EMPTY_HASH
|
80
78
|
end
|
81
79
|
end
|
82
80
|
|
@@ -120,7 +118,7 @@ module NewRelic
|
|
120
118
|
|
121
119
|
def for_destination(attributes, calculated_destinations, destination)
|
122
120
|
# Avoid allocating anything if there are no attrs at all
|
123
|
-
return EMPTY_HASH if attributes.empty?
|
121
|
+
return NewRelic::EMPTY_HASH if attributes.empty?
|
124
122
|
|
125
123
|
attributes.inject({}) do |memo, (key, value)|
|
126
124
|
if @filter.allows?(calculated_destinations[key], destination)
|
@@ -395,7 +395,21 @@ module NewRelic
|
|
395
395
|
:public => true,
|
396
396
|
:type => Boolean,
|
397
397
|
:allowed_from_server => false,
|
398
|
-
:description => 'When <code>true</code>, the agent captures HTTP request parameters
|
398
|
+
:description => 'When <code>true</code>, the agent captures HTTP request parameters ' \
|
399
|
+
'and attaches them to transaction traces, traced errors, and ' \
|
400
|
+
'<a href="https://docs.newrelic.com/attribute-dictionary?attribute_name=&events_tids%5B%5D=8241">'\
|
401
|
+
'<code>TransactionError</code> events.' \
|
402
|
+
"\n" \
|
403
|
+
'<div class="callout-warning">' \
|
404
|
+
"\n" \
|
405
|
+
'<p>When using the <code>capture_params</code> setting, the Ruby agent will not attempt ' \
|
406
|
+
'to filter secret information. <b>Recommendation:</b> To filter secret information from ' \
|
407
|
+
'request parameters, use the <a href="/docs/agents/ruby-agent/attributes/enable-disable-attributes-ruby">' \
|
408
|
+
'<code>attributes.include</code> setting</a> instead. For more information, see the ' \
|
409
|
+
'<a href="/docs/agents/ruby-agent/attributes/ruby-attribute-examples#ex_req_params">' \
|
410
|
+
'Ruby attribute examples</a>.' \
|
411
|
+
"</p>\n" \
|
412
|
+
'</div>'
|
399
413
|
},
|
400
414
|
:config_path => {
|
401
415
|
:default => DefaultSource.config_path,
|
@@ -532,7 +546,7 @@ module NewRelic
|
|
532
546
|
:transform => DefaultSource.method(:convert_to_constant_list),
|
533
547
|
:description => 'Deprecated. ' \
|
534
548
|
'For agent versions 6.8.0 or higher, ' \
|
535
|
-
'use <a href="#strip_exception_messages
|
549
|
+
'use <a href="#strip_exception_messages.allowed_classes"><code>' \
|
536
550
|
'strip_exception_messages.allowed_classes' \
|
537
551
|
'</code></a> instead.'
|
538
552
|
},
|
@@ -540,7 +554,6 @@ module NewRelic
|
|
540
554
|
:default => '',
|
541
555
|
:public => true,
|
542
556
|
:type => String,
|
543
|
-
:deprecated => true,
|
544
557
|
:allowed_from_server => false,
|
545
558
|
:transform => DefaultSource.method(:convert_to_constant_list),
|
546
559
|
:description => 'Specify a list of exceptions you do not want the agent to strip when <a href="#strip_exception_messages-enabled">strip_exception_messages</a> is <code>true</code>. Separate exceptions with a comma. For example, <code>"ImportantException,PreserveMessageException"</code>.'
|
@@ -675,15 +688,6 @@ module NewRelic
|
|
675
688
|
:allowed_from_server => true,
|
676
689
|
:description => 'Number of seconds betwixt connections to the New Relic span event collection services.'
|
677
690
|
},
|
678
|
-
:'data_report_periods.analytic_event_data' => {
|
679
|
-
:default => 60,
|
680
|
-
:public => false,
|
681
|
-
:type => Integer,
|
682
|
-
:deprecated => true,
|
683
|
-
:dynamic_name => true,
|
684
|
-
:allowed_from_server => true,
|
685
|
-
:description => 'Number of seconds between connections to the New Relic data collection service for sending transaction event data.'
|
686
|
-
},
|
687
691
|
:keep_retrying => {
|
688
692
|
:default => true,
|
689
693
|
:public => false,
|
@@ -1888,16 +1892,6 @@ module NewRelic
|
|
1888
1892
|
:allowed_from_server => false,
|
1889
1893
|
:description => 'Distributed tracing lets you see the path that a request takes through your distributed system. Enabling distributed tracing changes the behavior of some New Relic features, so carefully consult the <a href="https://docs.newrelic.com/docs/transition-guide-distributed-tracing">transition guide</a> before you enable this feature.'
|
1890
1894
|
},
|
1891
|
-
:'distributed_tracing.format' => {
|
1892
|
-
:default => 'newrelic',
|
1893
|
-
:public => false,
|
1894
|
-
:type => String,
|
1895
|
-
:transform => DefaultSource.enforce_fallback(
|
1896
|
-
allowed_values: ['w3c', 'newrelic'],
|
1897
|
-
fallback: 'newrelic'),
|
1898
|
-
:allowed_from_server => false,
|
1899
|
-
:description => 'The format to use for distributed tracing if it is enabled. Options are w3c for W3C Trace Context or newrelic for New Relic Distriburted Tracing. Defaults to New Relic Distributed Tracing.'
|
1900
|
-
},
|
1901
1895
|
:trusted_account_key => {
|
1902
1896
|
:default => nil,
|
1903
1897
|
:allow_nil => true,
|
@@ -1933,6 +1927,13 @@ module NewRelic
|
|
1933
1927
|
:type => Integer,
|
1934
1928
|
:allowed_from_server => true,
|
1935
1929
|
:description => 'Defines the maximum number of span events reported from a single harvest.'
|
1930
|
+
},
|
1931
|
+
:'exclude_newrelic_header' => {
|
1932
|
+
:default => false,
|
1933
|
+
:public => true,
|
1934
|
+
:type => Boolean,
|
1935
|
+
:allowed_from_server => true,
|
1936
|
+
:description => "Allows newrelic distributed tracing headers to be suppressed on outbound requests."
|
1936
1937
|
}
|
1937
1938
|
}.freeze
|
1938
1939
|
end
|