newrelic_rpm 4.8.0.341 → 5.1.0.344

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +5 -5
  2. data/.travis.yml +27 -0
  3. data/CHANGELOG.md +93 -0
  4. data/README.md +0 -3
  5. data/config.dot +0 -3
  6. data/lib/new_relic/agent/{throughput_monitor.rb → adaptive_sampler.rb} +22 -13
  7. data/lib/new_relic/agent/agent.rb +3 -4
  8. data/lib/new_relic/agent/configuration/default_source.rb +41 -19
  9. data/lib/new_relic/agent/configuration/high_security_source.rb +0 -2
  10. data/lib/new_relic/agent/database/explain_plan_helpers.rb +11 -0
  11. data/lib/new_relic/agent/database.rb +5 -0
  12. data/lib/new_relic/agent/distributed_trace_monitor.rb +4 -2
  13. data/lib/new_relic/agent/distributed_trace_payload.rb +85 -119
  14. data/lib/new_relic/agent/error_collector.rb +17 -1
  15. data/lib/new_relic/agent/external.rb +14 -0
  16. data/lib/new_relic/agent/heap.rb +140 -0
  17. data/lib/new_relic/agent/instrumentation/active_record_5.rb +5 -0
  18. data/lib/new_relic/agent/instrumentation/active_record_prepend.rb +14 -1
  19. data/lib/new_relic/agent/instrumentation/bunny.rb +5 -1
  20. data/lib/new_relic/agent/instrumentation/grape.rb +33 -29
  21. data/lib/new_relic/agent/instrumentation/rails5/action_cable.rb +5 -1
  22. data/lib/new_relic/agent/instrumentation/resque.rb +17 -36
  23. data/lib/new_relic/agent/instrumentation/sequel.rb +0 -1
  24. data/lib/new_relic/agent/javascript_instrumentor.rb +2 -2
  25. data/lib/new_relic/agent/messaging.rb +10 -0
  26. data/lib/new_relic/agent/method_tracer.rb +23 -18
  27. data/lib/new_relic/agent/new_relic_service.rb +43 -23
  28. data/lib/new_relic/agent/priority_sampled_buffer.rb +68 -0
  29. data/lib/new_relic/agent/supported_versions.rb +1 -1
  30. data/lib/new_relic/agent/transaction/attributes.rb +1 -0
  31. data/lib/new_relic/agent/transaction/distributed_tracing.rb +173 -55
  32. data/lib/new_relic/agent/transaction/external_request_segment.rb +14 -64
  33. data/lib/new_relic/agent/transaction/message_broker_segment.rb +12 -4
  34. data/lib/new_relic/agent/transaction.rb +15 -8
  35. data/lib/new_relic/agent/transaction_error_primitive.rb +2 -8
  36. data/lib/new_relic/agent/transaction_event_aggregator.rb +16 -13
  37. data/lib/new_relic/agent/transaction_event_primitive.rb +5 -3
  38. data/lib/new_relic/agent/transaction_event_recorder.rb +3 -11
  39. data/lib/new_relic/agent.rb +27 -0
  40. data/lib/new_relic/build.rb +2 -2
  41. data/lib/new_relic/recipes/capistrano3.rb +5 -2
  42. data/lib/new_relic/version.rb +2 -2
  43. data/newrelic_rpm.gemspec +3 -2
  44. metadata +39 -9
  45. data/lib/new_relic/agent/distributed_trace_priority_sampled_buffer.rb +0 -72
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b51f94bfacea16c929d073a557db1c96c171da40
4
- data.tar.gz: 6b593714cfad1a3751dd07b410ba300fe46e4751
2
+ SHA256:
3
+ metadata.gz: 542ac1ce1a083c278c83f047f78ab8b3c8810a0916c87f83894a1f923d0a3fd2
4
+ data.tar.gz: 4e1eb213e1a4dac5877552f15e971bdf1b5005d2fb208a5364a8e1e59b9d25a0
5
5
  SHA512:
6
- metadata.gz: 88aa0416e6c2a3f8e32b6b5536e1b4f58b5b423ce06085ba583830fca6c014c04ea318bad3b48bcc17f5f93506d27f1ac7fed3ce56fb157cfd43830650c74652
7
- data.tar.gz: afc0971db514b4b76e93725c6c7b299e26a281ba0a8cee2add9aba30a149f0c20a0dc74d7d08363f4977a54c5dc90f2e897edf64d2fa658cf286cc18358cc978
6
+ metadata.gz: eaf4583a69257f2e22aaae8a6148a5b38d130f83e9585fd69b70ddaf6696e18d7da0a814e7d0046fa6fc6d1afd23f591f961194b56c3da4d86c97cc9d975da4e
7
+ data.tar.gz: 49de5e3b35b731ef61835a2f3fed0a82fcf7ff9af97db695c829cd3936b19bd7ecf1087ff69c5a755a743f203a1efec8c070d4587737e0419e364116bd827121
data/.travis.yml CHANGED
@@ -16,6 +16,11 @@ before_install:
16
16
 
17
17
  install: bundle install
18
18
 
19
+ addons:
20
+ apt:
21
+ packages:
22
+ - haveged
23
+
19
24
  before_script: ./test/script/before_script/install_mongodb.sh
20
25
 
21
26
  script: ./test/script/ci.sh
@@ -171,3 +176,25 @@ matrix:
171
176
  env: TYPE=UNIT ENVIRONMENT=rails31
172
177
  - rvm: jruby-9.1.13.0
173
178
  env: TYPE=UNIT ENVIRONMENT=rails32
179
+
180
+ # Travis (and only Travis) has been throwing difficult-to-reproduce
181
+ # errors in various JRuby tests. These appeared after a build image
182
+ # update, and they seem to be unrelated to any agent code changes.
183
+ # So, we'll allow these specific test runs to fail while we track
184
+ # the issue (RUBY-1869).
185
+ #
186
+ allow_failures:
187
+ - rvm: jruby-9.1.13.0
188
+ env: TYPE=UNIT ENVIRONMENT=rails40
189
+ - rvm: jruby-9.1.13.0
190
+ env: TYPE=UNIT ENVIRONMENT=rails41
191
+ - rvm: jruby-9.1.13.0
192
+ env: TYPE=UNIT ENVIRONMENT=rails42
193
+ - rvm: jruby-9.1.13.0
194
+ env: TYPE=UNIT ENVIRONMENT=rails50
195
+ - rvm: jruby-9.1.13.0
196
+ env: TYPE=UNIT ENVIRONMENT=rails51
197
+ - rvm: jruby-9.1.13.0
198
+ env: TYPE=UNIT ENVIRONMENT=norails
199
+ - rvm: jruby-9.1.13.0
200
+ env: TYPE=FUNCTIONAL GROUP=background_2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,98 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
+ ## v5.1.0 ##
4
+
5
+ * Rails 5.2 support
6
+
7
+ The Ruby agent has been validated against the latest release of
8
+ Ruby on Rails!
9
+
10
+ * Support for newer libraries and frameworks
11
+
12
+ We have updated the multiverse suite to test the agent against
13
+ current versions of several frameworks.
14
+
15
+ * Add `custom_attributes.enabled` configuration option
16
+
17
+ This option is enabled by default. When it's disabled, custom
18
+ attributes will not be transmitted on transaction events or error
19
+ events.
20
+
21
+ * Fix Grape load order dependency
22
+
23
+ The agent will now choose the correct name for Grape transactions
24
+ even if the customer's app loads the agent before Grape. Thanks
25
+ to Daniel Doubrovkine for the contribution!
26
+
27
+ * Add `webpacker:compile` to blacklisted tasks
28
+
29
+ `webpacker:compile` is commonly used for compiling assets. It has
30
+ been added to `AUTOSTART_BLACKLISTED_RAKE_TASKS` in the default
31
+ configuration. Thanks to Claudio B. for the contribution!
32
+
33
+ * Make browser instrumentation W3C-compliant
34
+
35
+ `type="text/javascript"` is optional for the `<script>` tag under
36
+ W3C. The `type` attribute has now been removed from browser
37
+ instrumentation. Thanks to Spharian for the contribution!
38
+
39
+ * Deferred `add_method_tracer` calls
40
+
41
+ If a third-party library calls `add_method_tracer` before the
42
+ agent has finished starting, we now queue these calls and run them
43
+ when it's safe to do so (rather than skipping them and logging a
44
+ warning).
45
+
46
+ * Bugfix for Resque `around` / `before` hooks
47
+
48
+ In rare cases, the agent was not instrumenting Resque `around` and
49
+ `before` hooks. This version fixes the error.
50
+
51
+ * Truncation of long stack traces
52
+
53
+ Occasionally, long stack traces would cause complications sending
54
+ data to New Relic. This version truncates long traces to 50 frames
55
+ (split evenly between the top and bottom of the trace).
56
+
57
+ ## v5.0.0 ##
58
+
59
+ * SSL connections to New Relic are now mandatory
60
+
61
+ Prior to this version, using an SSL connection to New Relic was
62
+ the default behavior, but could be overridden. SSL connections are
63
+ now enforced (not overrideable).
64
+
65
+ * Additional security checking before trying to explain
66
+ multi-statement SQL queries
67
+
68
+ Customer applications might submit SQL queries containing multiple
69
+ statements (e.g., SELECT * FROM table; SELECT * FROM table). For
70
+ security reasons, we should not generate explain plans in this
71
+ situation.
72
+
73
+ Although the agent correctly skipped explain plans for these
74
+ queries during testing, we have added extra checks for this
75
+ scenario.
76
+
77
+ * Bugfix for RabbitMQ exchange names that are symbols
78
+
79
+ The agent no longer raises a TypeError when a RabbitMQ exchange
80
+ name is a Ruby symbol instead of a string.
81
+
82
+ * Bugfix for audit logging to stdout
83
+
84
+ Previous agents configured to log to stdout would correctly send
85
+ regular agent logs to stdout, but would incorrectly send audit
86
+ logs to a text file named "stdout". This release corrects the
87
+ error.
88
+
89
+ * Bugfix for Capistrano deployment notifications on v3.7 and beyond
90
+
91
+ Starting with version 3.7, Capistrano uses a different technique
92
+ to determine a project's version control system. The agent now
93
+ works correctly with this new behavior. Thanks to Jimmy Zhang for
94
+ the contribution.
95
+
3
96
  ## v4.8.0 ##
4
97
 
5
98
  * Initialize New Relic Agent before config initializers
data/README.md CHANGED
@@ -130,9 +130,6 @@ If you can't find what you're looking for there, reach out to us on our [support
130
130
  site](http://support.newrelic.com/) or our [community forum](http://forum.newrelic.com)
131
131
  and we'll be happy to help you.
132
132
 
133
- Also available is community support on IRC: we generally use #newrelic
134
- on irc.freenode.net
135
-
136
133
  Find a bug? Contact us via [support.newrelic.com](http://support.newrelic.com/),
137
134
  or email support@newrelic.com.
138
135
 
data/config.dot CHANGED
@@ -21,7 +21,6 @@ digraph AgentEnabled {
21
21
  "[error_collector.ignore_errors]"
22
22
  "[browser_monitoring.auto_instrument]"
23
23
  "[license_key]"
24
- "[ssl]"
25
24
  "[verify_certificate]"
26
25
  "[api_host]"
27
26
  "[api_port]"
@@ -164,14 +163,12 @@ digraph AgentEnabled {
164
163
  "Control#server_from_host" -> "[host]"
165
164
  "Control#server_from_host" -> "[port]"
166
165
  "Control#server_from_host" -> "Control#convert_to_ip_address"
167
- "Control#http_connection" -> "[ssl]"
168
166
  "Control#http_connection" -> "[verify_certificate]"
169
167
  "Control#http_connection" -> "Control#proxy_server"
170
168
  "Control#set_log_level!" -> "[log_level]"
171
169
  "Control#log_path" -> "[log_file_path]"
172
170
  "Control#log_path" -> "Control#log_to_stdout?"
173
171
  "Control#log_to_stdout?" -> "[log_file_path]"
174
- "Control#convert_to_ip_address" -> "[ssl]"
175
172
  "Control#convert_to_ip_address" -> "[verify_certificate]"
176
173
  "Control#server" -> "Control#server_from_host"
177
174
  "Control#setup_log" -> "Control#set_log_level!"
@@ -4,14 +4,16 @@
4
4
 
5
5
  module NewRelic
6
6
  module Agent
7
- class ThroughputMonitor
7
+ class AdaptiveSampler
8
8
 
9
- def initialize target_samples = 10
9
+ def initialize target_samples = 10, interval_duration = 60
10
10
  @target = target_samples
11
11
  @seen = 0
12
12
  @seen_last = 0
13
13
  @sampled_count = 0
14
- @first_cycle = true
14
+ @interval_duration = interval_duration
15
+ @first_interval = true
16
+ @interval_start = Time.now.to_f
15
17
  @lock = Mutex.new
16
18
  end
17
19
 
@@ -20,7 +22,8 @@ module NewRelic
20
22
  # sampled. This uses the adaptive sampling algorithm.
21
23
  def sampled?
22
24
  @lock.synchronize do
23
- sampled = if @first_cycle
25
+ reset_if_interval_expired!
26
+ sampled = if @first_interval
24
27
  @sampled_count < 10
25
28
  elsif @sampled_count < @target
26
29
  rand(@seen_last) < @target
@@ -35,15 +38,6 @@ module NewRelic
35
38
  end
36
39
  end
37
40
 
38
- def reset!
39
- @lock.synchronize do
40
- @first_cycle = false
41
- @seen_last = @seen
42
- @seen = 0
43
- @sampled_count = 0
44
- end
45
- end
46
-
47
41
  def stats
48
42
  @lock.synchronize do
49
43
  {
@@ -54,6 +48,21 @@ module NewRelic
54
48
  }
55
49
  end
56
50
  end
51
+
52
+ private
53
+
54
+ def reset_if_interval_expired!
55
+ now = Time.now.to_f
56
+ return unless @interval_start + @interval_duration <= now
57
+
58
+ elapsed_intervals = Integer((now - @interval_start) / @interval_duration)
59
+ @interval_start = @interval_start + elapsed_intervals * @interval_duration
60
+
61
+ @first_interval = false
62
+ @seen_last = elapsed_intervals > 1 ? 0 : @seen
63
+ @seen = 0
64
+ @sampled_count = 0
65
+ end
57
66
  end
58
67
  end
59
68
  end
@@ -30,7 +30,7 @@ require 'new_relic/agent/vm/monotonic_gc_profiler'
30
30
  require 'new_relic/agent/utilization_data'
31
31
  require 'new_relic/environment_report'
32
32
  require 'new_relic/agent/attribute_filter'
33
- require 'new_relic/agent/throughput_monitor'
33
+ require 'new_relic/agent/adaptive_sampler'
34
34
 
35
35
  module NewRelic
36
36
  module Agent
@@ -63,7 +63,7 @@ module NewRelic
63
63
  @harvest_samplers = NewRelic::Agent::SamplerCollection.new(@events)
64
64
  @monotonic_gc_profiler = NewRelic::Agent::VM::MonotonicGCProfiler.new
65
65
  @javascript_instrumentor = NewRelic::Agent::JavascriptInstrumentor.new(@events)
66
- @throughput_monitor = NewRelic::Agent::ThroughputMonitor.new
66
+ @adaptive_sampler = NewRelic::Agent::AdaptiveSampler.new
67
67
 
68
68
  @harvester = NewRelic::Agent::Harvester.new(@events)
69
69
  @after_fork_lock = Mutex.new
@@ -144,7 +144,7 @@ module NewRelic
144
144
  attr_reader :custom_event_aggregator
145
145
  attr_reader :transaction_event_recorder
146
146
  attr_reader :attribute_filter
147
- attr_reader :throughput_monitor
147
+ attr_reader :adaptive_sampler
148
148
 
149
149
  def transaction_event_aggregator
150
150
  @transaction_event_recorder.transaction_event_aggregator
@@ -1154,7 +1154,6 @@ module NewRelic
1154
1154
  harvest_and_send_for_agent_commands
1155
1155
  end
1156
1156
  ensure
1157
- throughput_monitor.reset!
1158
1157
  NewRelic::Agent::Database.close_connections
1159
1158
  duration = (Time.now - now).to_f
1160
1159
  NewRelic::Agent.record_metric('Supportability/Harvest', duration)
@@ -113,9 +113,15 @@ module NewRelic
113
113
  }
114
114
  end
115
115
 
116
+ DEFAULT_LOG_DIR = 'log/'.freeze
117
+
116
118
  def self.audit_log_path
117
119
  Proc.new {
118
- File.join(NewRelic::Agent.config[:log_file_path], 'newrelic_audit.log')
120
+ log_file_path = NewRelic::Agent.config[:log_file_path]
121
+ wants_stdout = (log_file_path.upcase == 'STDOUT')
122
+ audit_log_dir = wants_stdout ? DEFAULT_LOG_DIR : log_file_path
123
+
124
+ File.join(audit_log_dir, 'newrelic_audit.log')
119
125
  }
120
126
  end
121
127
 
@@ -142,10 +148,6 @@ module NewRelic
142
148
  Proc.new { NewRelic::Agent.config[:apdex_t] * 4 }
143
149
  end
144
150
 
145
- def self.port
146
- Proc.new { NewRelic::Agent.config[:ssl] ? 443 : 80 }
147
- end
148
-
149
151
  def self.profiling_available
150
152
  Proc.new {
151
153
  begin
@@ -157,6 +159,17 @@ module NewRelic
157
159
  }
158
160
  end
159
161
 
162
+ def self.host
163
+ Proc.new do
164
+ regex = /\A(?<identifier>.+?)x/
165
+ if matches = regex.match(String(NewRelic::Agent.config[:license_key]))
166
+ "collector.#{matches['identifier']}.nr-data.net"
167
+ else
168
+ 'collector.newrelic.com'
169
+ end
170
+ end
171
+ end
172
+
160
173
  def self.convert_to_regexp_list(raw_value)
161
174
  value_list = convert_to_list(raw_value)
162
175
  value_list.map do |value|
@@ -238,7 +251,8 @@ module NewRelic
238
251
  'test:uncommitted',
239
252
  'time:zones:all',
240
253
  'tmp:clear',
241
- 'tmp:create'
254
+ 'tmp:create',
255
+ 'webpacker:compile'
242
256
  ].join(',').freeze
243
257
 
244
258
  DEFAULTS = {
@@ -299,14 +313,6 @@ module NewRelic
299
313
  :allowed_from_server => false,
300
314
  :description => 'If <code>true</code>, enables <a href="https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security">high security mode</a>. Ensure you understand the implications of high security mode before enabling this setting.'
301
315
  },
302
- :ssl => {
303
- :default => true,
304
- :allow_nil => true,
305
- :public => true,
306
- :type => Boolean,
307
- :allowed_from_server => false,
308
- :description => 'If <code>true</code>, enables SSL for transmissions to the New Relic <a href="https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/glossary#collector">collector</a>.'
309
- },
310
316
  :proxy_host => {
311
317
  :default => nil,
312
318
  :allow_nil => true,
@@ -450,7 +456,7 @@ module NewRelic
450
456
  :description => 'Specify a whitelist 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>.'
451
457
  },
452
458
  :host => {
453
- :default => 'collector.newrelic.com',
459
+ :default => DefaultSource.host,
454
460
  :public => false,
455
461
  :type => String,
456
462
  :allowed_from_server => false,
@@ -464,7 +470,7 @@ module NewRelic
464
470
  :description => 'API host for New Relic.'
465
471
  },
466
472
  :port => {
467
- :default => DefaultSource.port,
473
+ :default => 443,
468
474
  :public => false,
469
475
  :type => Integer,
470
476
  :allowed_from_server => false,
@@ -578,7 +584,7 @@ module NewRelic
578
584
  :description => 'Defines a name for the log file.'
579
585
  },
580
586
  :log_file_path => {
581
- :default => 'log/',
587
+ :default => DefaultSource::DEFAULT_LOG_DIR,
582
588
  :public => true,
583
589
  :type => String,
584
590
  :allowed_from_server => false,
@@ -799,7 +805,16 @@ module NewRelic
799
805
  :public => true,
800
806
  :type => String,
801
807
  :allowed_from_server => true,
802
- :description => 'Obfuscation level for SQL queries reported in transaction trace nodes. Valid options are <code>obfuscated</code>, <code>raw</code>, or <code>none</code>.'
808
+ :description => 'Obfuscation level for SQL queries reported in transaction trace nodes.</p>
809
+
810
+ <p>By default, this is set to <code>obfuscated</code>, which strips out the numeric and string literals.</p>
811
+
812
+ <ul>
813
+ <li>If you do not want the agent to capture query information, set this to <code>none</code>.</li>
814
+ <li>If you want the agent to capture all query information in its original form, set this to <code>raw</code>.</li>
815
+ <li>When you enable <a href="/docs/agents/manage-apm-agents/configuration/high-security-mode">high security mode</a>, this is automatically set to <code>obfuscated</code>.</li>
816
+ </ul>
817
+ <p>' # Doc generator will wrap this in <p>...</p>
803
818
  },
804
819
  :'transaction_tracer.record_redis_arguments' => {
805
820
  :default => false,
@@ -1082,7 +1097,7 @@ module NewRelic
1082
1097
  :description => 'List of trusted New Relic account IDs for the purposes of cross-application tracing. Inbound requests from applications including cross-application headers that do not come from an account in this list will be ignored.'
1083
1098
  },
1084
1099
  :"cross_application_tracer.enabled" => {
1085
- :default => true,
1100
+ :default => Proc.new { !NewRelic::Agent.config[:'distributed_tracing.enabled'] },
1086
1101
  :public => true,
1087
1102
  :type => Boolean,
1088
1103
  :allowed_from_server => true,
@@ -1563,6 +1578,13 @@ module NewRelic
1563
1578
  :transform => DefaultSource.method(:convert_to_list),
1564
1579
  :description => 'Prefix of attributes to include in browser monitoring. Allows <code>*</code> as wildcard at end.'
1565
1580
  },
1581
+ :'custom_attributes.enabled' => {
1582
+ :default => true,
1583
+ :public => true,
1584
+ :type => Boolean,
1585
+ :allowed_from_server => false,
1586
+ :description => 'If <code>false</code>, custom attributes will not be sent on Insights events.'
1587
+ },
1566
1588
  :'utilization.detect_aws' => {
1567
1589
  :default => true,
1568
1590
  :public => true,
@@ -10,8 +10,6 @@ module NewRelic
10
10
  class HighSecuritySource < DottedHash
11
11
  def initialize(local_settings)
12
12
  super({
13
- :ssl => true,
14
-
15
13
  :capture_params => false,
16
14
  :'resque.capture_params' => false,
17
15
  :'sidekiq.capture_params' => false,
@@ -21,6 +21,17 @@ module NewRelic
21
21
  Obfuscator.instance.obfuscate_single_quote_literals(sql) =~ /\$\d+/
22
22
  end
23
23
 
24
+ # SQL containing a semicolon in the middle (with something
25
+ # other than whitespace after it) may contain two or more
26
+ # queries. It's not safe to EXPLAIN this kind of expression,
27
+ # since it could lead to executing unwanted SQL.
28
+ #
29
+ MULTIPLE_QUERIES = Regexp.new(';\s*\S+')
30
+
31
+ def multiple_queries?(sql)
32
+ sql =~ MULTIPLE_QUERIES
33
+ end
34
+
24
35
  def handle_exception_in_explain
25
36
  yield
26
37
  rescue => e
@@ -271,6 +271,11 @@ module NewRelic
271
271
  return false
272
272
  end
273
273
 
274
+ if multiple_queries?(@sql)
275
+ NewRelic::Agent.logger.debug('Unable to collect explain plan for multiple queries.')
276
+ return false
277
+ end
278
+
274
279
  true
275
280
  end
276
281
  end
@@ -17,12 +17,14 @@ module NewRelic
17
17
  end
18
18
 
19
19
  def on_before_call(request)
20
- return unless CrossAppTracing.cross_app_enabled?
20
+ return unless NewRelic::Agent.config[:'distributed_tracing.enabled']
21
21
  return unless payload = request[NEWRELIC_TRACE_KEY]
22
22
 
23
23
  state = NewRelic::Agent::TransactionState.tl_get
24
24
  txn = state.current_transaction
25
- txn.accept_distributed_trace_payload HTTP_TRANSPORT_TYPE, payload
25
+ if txn.accept_distributed_trace_payload payload
26
+ txn.distributed_trace_payload.caller_transport_type = HTTP_TRANSPORT_TYPE
27
+ end
26
28
  end
27
29
  end
28
30
  end