newrelic_rpm 6.6.0.358 → 6.11.0.365

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +3 -0
  3. data/.travis.yml +81 -5
  4. data/CHANGELOG.md +262 -0
  5. data/Gemfile +6 -2
  6. data/Guardfile +18 -1
  7. data/LICENSE +1 -1
  8. data/Rakefile +2 -0
  9. data/lib/new_relic/agent.rb +89 -7
  10. data/lib/new_relic/agent/agent.rb +115 -58
  11. data/lib/new_relic/agent/agent_logger.rb +4 -0
  12. data/lib/new_relic/agent/attribute_filter.rb +7 -7
  13. data/lib/new_relic/agent/attributes.rb +150 -0
  14. data/lib/new_relic/agent/autostart.rb +19 -14
  15. data/lib/new_relic/agent/configuration/default_source.rb +154 -9
  16. data/lib/new_relic/agent/configuration/event_harvest_config.rb +11 -5
  17. data/lib/new_relic/agent/configuration/manager.rb +0 -8
  18. data/lib/new_relic/agent/configuration/server_source.rb +3 -2
  19. data/lib/new_relic/agent/configuration/yaml_source.rb +11 -6
  20. data/lib/new_relic/agent/connect/request_builder.rb +5 -13
  21. data/lib/new_relic/agent/database.rb +1 -2
  22. data/lib/new_relic/agent/database/obfuscation_helpers.rb +1 -1
  23. data/lib/new_relic/agent/datastores/mongo.rb +1 -1
  24. data/lib/new_relic/agent/datastores/mongo/event_formatter.rb +2 -2
  25. data/lib/new_relic/agent/datastores/mongo/obfuscator.rb +8 -8
  26. data/lib/new_relic/agent/distributed_tracing.rb +155 -6
  27. data/lib/new_relic/agent/{cross_app_payload.rb → distributed_tracing/cross_app_payload.rb} +2 -1
  28. data/lib/new_relic/agent/{cross_app_tracing.rb → distributed_tracing/cross_app_tracing.rb} +60 -45
  29. data/lib/new_relic/agent/distributed_tracing/distributed_trace_intrinsics.rb +80 -0
  30. data/lib/new_relic/agent/distributed_tracing/distributed_trace_metrics.rb +75 -0
  31. data/lib/new_relic/agent/{distributed_trace_payload.rb → distributed_tracing/distributed_trace_payload.rb} +24 -101
  32. data/lib/new_relic/agent/distributed_tracing/distributed_trace_transport_type.rb +39 -0
  33. data/lib/new_relic/agent/distributed_tracing/trace_context.rb +246 -0
  34. data/lib/new_relic/agent/distributed_tracing/trace_context_payload.rb +126 -0
  35. data/lib/new_relic/agent/error_collector.rb +33 -16
  36. data/lib/new_relic/agent/error_event_aggregator.rb +7 -5
  37. data/lib/new_relic/agent/external.rb +7 -7
  38. data/lib/new_relic/agent/guid_generator.rb +28 -0
  39. data/lib/new_relic/agent/hostname.rb +7 -1
  40. data/lib/new_relic/agent/http_clients/abstract.rb +82 -0
  41. data/lib/new_relic/agent/http_clients/curb_wrappers.rb +24 -19
  42. data/lib/new_relic/agent/http_clients/excon_wrappers.rb +28 -13
  43. data/lib/new_relic/agent/http_clients/http_rb_wrappers.rb +17 -21
  44. data/lib/new_relic/agent/http_clients/httpclient_wrappers.rb +10 -11
  45. data/lib/new_relic/agent/http_clients/net_http_wrappers.rb +16 -4
  46. data/lib/new_relic/agent/http_clients/typhoeus_wrappers.rb +4 -6
  47. data/lib/new_relic/agent/http_clients/uri_util.rb +3 -2
  48. data/lib/new_relic/agent/instrumentation/action_cable_subscriber.rb +5 -7
  49. data/lib/new_relic/agent/instrumentation/action_controller_subscriber.rb +4 -0
  50. data/lib/new_relic/agent/instrumentation/action_view_subscriber.rb +11 -2
  51. data/lib/new_relic/agent/instrumentation/active_record.rb +4 -2
  52. data/lib/new_relic/agent/instrumentation/active_record_subscriber.rb +7 -2
  53. data/lib/new_relic/agent/instrumentation/active_storage_subscriber.rb +8 -4
  54. data/lib/new_relic/agent/instrumentation/bunny.rb +45 -28
  55. data/lib/new_relic/agent/instrumentation/curb.rb +59 -18
  56. data/lib/new_relic/agent/instrumentation/data_mapper.rb +3 -1
  57. data/lib/new_relic/agent/instrumentation/excon.rb +1 -1
  58. data/lib/new_relic/agent/instrumentation/excon/connection.rb +6 -3
  59. data/lib/new_relic/agent/instrumentation/excon/middleware.rb +2 -1
  60. data/lib/new_relic/agent/instrumentation/grape.rb +5 -10
  61. data/lib/new_relic/agent/instrumentation/http.rb +6 -3
  62. data/lib/new_relic/agent/instrumentation/httpclient.rb +5 -3
  63. data/lib/new_relic/agent/instrumentation/memcache.rb +3 -1
  64. data/lib/new_relic/agent/instrumentation/memcache/dalli.rb +6 -2
  65. data/lib/new_relic/agent/instrumentation/mongo.rb +9 -3
  66. data/lib/new_relic/agent/instrumentation/mongodb_command_subscriber.rb +13 -0
  67. data/lib/new_relic/agent/instrumentation/net.rb +6 -3
  68. data/lib/new_relic/agent/instrumentation/notifications_subscriber.rb +25 -1
  69. data/lib/new_relic/agent/instrumentation/redis.rb +9 -3
  70. data/lib/new_relic/agent/instrumentation/resque.rb +3 -0
  71. data/lib/new_relic/agent/instrumentation/sidekiq.rb +47 -23
  72. data/lib/new_relic/agent/instrumentation/typhoeus.rb +23 -6
  73. data/lib/new_relic/agent/logging.rb +139 -0
  74. data/lib/new_relic/agent/messaging.rb +5 -73
  75. data/lib/new_relic/agent/method_tracer.rb +18 -6
  76. data/lib/new_relic/agent/method_tracer_helpers.rb +2 -2
  77. data/lib/new_relic/agent/monitors.rb +27 -0
  78. data/lib/new_relic/agent/monitors/cross_app_monitor.rb +110 -0
  79. data/lib/new_relic/agent/monitors/distributed_tracing_monitor.rb +27 -0
  80. data/lib/new_relic/agent/{inbound_request_monitor.rb → monitors/inbound_request_monitor.rb} +1 -1
  81. data/lib/new_relic/agent/{synthetics_monitor.rb → monitors/synthetics_monitor.rb} +2 -4
  82. data/lib/new_relic/agent/new_relic_service.rb +7 -6
  83. data/lib/new_relic/agent/noticible_error.rb +22 -0
  84. data/lib/new_relic/agent/span_event_aggregator.rb +1 -0
  85. data/lib/new_relic/agent/span_event_primitive.rb +86 -53
  86. data/lib/new_relic/agent/sql_sampler.rb +3 -3
  87. data/lib/new_relic/agent/supported_versions.rb +2 -2
  88. data/lib/new_relic/agent/system_info.rb +12 -3
  89. data/lib/new_relic/agent/tracer.rb +65 -18
  90. data/lib/new_relic/agent/transaction.rb +84 -79
  91. data/lib/new_relic/agent/transaction/abstract_segment.rb +28 -2
  92. data/lib/new_relic/agent/transaction/distributed_tracer.rb +171 -0
  93. data/lib/new_relic/agent/transaction/distributed_tracing.rb +57 -146
  94. data/lib/new_relic/agent/transaction/external_request_segment.rb +29 -36
  95. data/lib/new_relic/agent/transaction/message_broker_segment.rb +3 -11
  96. data/lib/new_relic/agent/transaction/segment.rb +7 -1
  97. data/lib/new_relic/agent/transaction/trace.rb +2 -4
  98. data/lib/new_relic/agent/transaction/trace_context.rb +168 -0
  99. data/lib/new_relic/agent/transaction/trace_node.rb +10 -8
  100. data/lib/new_relic/agent/transaction_error_primitive.rb +10 -15
  101. data/lib/new_relic/agent/transaction_event_primitive.rb +28 -39
  102. data/lib/new_relic/cli/commands/deployments.rb +1 -1
  103. data/lib/new_relic/cli/commands/install.rb +3 -2
  104. data/lib/new_relic/coerce.rb +31 -6
  105. data/lib/new_relic/constants.rb +38 -0
  106. data/lib/new_relic/control/instance_methods.rb +10 -1
  107. data/lib/new_relic/dependency_detection.rb +4 -4
  108. data/lib/new_relic/environment_report.rb +5 -1
  109. data/lib/new_relic/noticed_error.rb +38 -17
  110. data/lib/new_relic/rack/browser_monitoring.rb +5 -0
  111. data/lib/new_relic/supportability_helper.rb +14 -0
  112. data/lib/new_relic/version.rb +1 -1
  113. data/lib/tasks/multiverse.rb +25 -0
  114. data/lib/tasks/tests.rake +6 -1
  115. data/newrelic_rpm.gemspec +19 -8
  116. data/test/agent_helper.rb +323 -71
  117. metadata +100 -33
  118. data/lib/new_relic/agent/cross_app_monitor.rb +0 -110
  119. data/lib/new_relic/agent/distributed_trace_monitor.rb +0 -40
  120. data/lib/new_relic/agent/http_clients/abstract_request.rb +0 -31
  121. data/lib/new_relic/agent/transaction/attributes.rb +0 -154
  122. data/lib/tasks/versions.html.erb +0 -28
  123. data/lib/tasks/versions.postface.html +0 -8
  124. data/lib/tasks/versions.preface.html +0 -9
  125. data/lib/tasks/versions.rake +0 -65
  126. data/lib/tasks/versions.txt.erb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d39324de06656b928892edc72296e459eb2737929e20f054514c2ddc980bfb0
4
- data.tar.gz: 3752b1d5dbcd79b38a808460c68141926ae627f0c50ec8cc6ded103285719844
3
+ metadata.gz: 5c57ffc3785e824375bddaddea5ff0a281b9b3e6bb1d9a8df8ec8ee4514b5f87
4
+ data.tar.gz: 72b4889613aca4855ebffc39a1c09419871560cbbe5d2311457ec53181d861ca
5
5
  SHA512:
6
- metadata.gz: 6f277cc9660dde4ef818de176ad156202ad1993594416882e678b31786386f547b200a96444be1a84bfa53e8385700f07b837d3c500a1e8529d2e4c5d9bbf3ab
7
- data.tar.gz: 258bd06b3feaf43c29e8007a6d97003d2d7879b719fc818ba1a374a2167f336f1b4b4352b31d938af24afb0c917751649e62eddaaab41a7955ef55e10f56e84d
6
+ metadata.gz: 39bbe0afde8eb032928ee3582b5ceb0d6870be12f63c45785d575e93a2d1516bbc15c306bd82681535cde1816aed074dd23795af036eb409f53dfc2d20f5c66f
7
+ data.tar.gz: 2a59cdff3bbfe3fb18b1b028a1d64f9b8a452783277313ca78b964c8cf9d8a2362b8872e2405549a3a594c5b2fa20c8439df05e4a76d608b5f3f79d880577a29
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  Gemfile.lock
2
+ Guard*
2
3
  .DS\_Store
3
4
  .svn/
4
5
  *~
@@ -27,3 +28,5 @@ lib/new_relic/build.rb
27
28
  artifacts/
28
29
  test/performance/log/
29
30
  test/performance/script/log/
31
+ infinite_tracing/log/
32
+ infinite_tracing/test/new_relic/infinite_tracing/log
@@ -4,27 +4,35 @@ services:
4
4
  - memcached
5
5
  - rabbitmq
6
6
 
7
+ notifications:
8
+ slack:
9
+ secure: Ziq6vzXmc1S+SZnJF7DyjprRgzZKvVK5TXtnNJAoH4EFchziCqko+75hMxDZ/6Y2kShcijgbzZSkIIVSiuYyx0Jgxdsmwed7yrs91uv2WsUw2/l+taOTBIAMa/m9PZppsRqmkywxWeeTPL6cf65Vg3PYRuqzj83nczUFJo4UNrA=
10
+
7
11
  language: ruby
8
12
 
13
+ dist: precise
9
14
  sudo: required
15
+ jdk:
16
+ - oraclejdk8
10
17
 
11
18
  before_install:
12
19
  # RUBY-2072 Prevent Travis setup failure before our test even starts
13
20
  - jdk_switcher use oraclejdk8
14
21
  - sudo rm -f /etc/apt/sources.list.d/travis_ci_zeromq3.list
15
22
  - gem --version
16
- - ./test/script/before_install/update_rubygems.sh
17
- - rvm @global do gem uninstall bundler --all --executables || true
18
- - gem install bundler -v=1.17.3
23
+ - "echo 'gem: --no-rdoc --no-ri --no-document' > ~/.gemrc"
24
+ - ./test/script/before_install/conditionally_upgrade_rubygems.sh
19
25
  - ./test/script/before_install/gemstash_mirror.sh
26
+ - "echo GEMSTASH_MIRROR: $GEMSTASH_MIRROR"
20
27
  - bundle --version
21
28
 
22
- install: bundle install
29
+ install: bundle install --jobs 4
23
30
 
24
31
  addons:
25
32
  apt:
26
33
  update: true
27
34
  packages:
35
+ - libgmp3-dev
28
36
  - openssl
29
37
  - libssl-dev
30
38
  - build-essential
@@ -39,10 +47,12 @@ branches:
39
47
  - master
40
48
  - dev
41
49
  - release
50
+ - RUBY-2227_w3c_trace_context_poc
42
51
 
43
52
  rvm:
44
53
  # Run slowest builds first to try and optimize overall cycle time.
45
54
  - jruby-9.2.6.0
55
+ - 2.7.0
46
56
  - 2.6.1
47
57
  - 2.5.3
48
58
  - 2.4.2
@@ -51,11 +61,14 @@ rvm:
51
61
  - 2.1.10
52
62
  - 2.0.0-p648
53
63
 
64
+ jdk:
65
+ - oraclejdk8
66
+
54
67
  env:
55
68
  global:
56
69
  - BUNDLE_PATH=/home/travis/bundle
57
70
  - MONGODB=2.6.11
58
- - JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmx640m"
71
+ - JAVA_OPTS="-XX:+TieredCompilation -XX:TieredStopAtLevel=1 -Xmx1024m -XX:CICompilerCount=1 -Xshare:auto"
59
72
  - JRUBY_OPTS="-Xcompile.invokedynamic=false -J-Djruby.compile.mode=OFF"
60
73
  - RBXOPT="-Xcompiler.no_rbc -Xint"
61
74
  - SERIALIZE=1
@@ -70,6 +83,7 @@ env:
70
83
  - TYPE=UNIT ENVIRONMENT=rails42
71
84
  - TYPE=UNIT ENVIRONMENT=rails50
72
85
  - TYPE=UNIT ENVIRONMENT=rails51
86
+ - TYPE=UNIT ENVIRONMENT=rails52
73
87
  - TYPE=UNIT ENVIRONMENT=rails60
74
88
  - TYPE=UNIT ENVIRONMENT=norails
75
89
  - TYPE=FUNCTIONAL GROUP=agent
@@ -82,12 +96,54 @@ env:
82
96
  - TYPE=FUNCTIONAL GROUP=sinatra
83
97
  - TYPE=FUNCTIONAL GROUP=rest
84
98
  - TYPE=FUNCTIONAL GROUP=background_2
99
+ - TYPE=FUNCTIONAL GROUP=infinite_tracing
85
100
  - TYPE=NULLVERSE
86
101
 
87
102
  matrix:
103
+ allow_failures:
104
+ - rvm: jruby-9.2.6.0
105
+ env: TYPE=FUNCTIONAL GROUP=agent
88
106
  fast_finish: true
89
107
  exclude:
90
108
  # Unsupported Rails/Ruby combinations
109
+ # 2.7
110
+ - rvm: 2.7.0
111
+ env: TYPE=UNIT ENVIRONMENT=rails30
112
+ - rvm: 2.7.0
113
+ env: TYPE=UNIT ENVIRONMENT=rails31
114
+ - rvm: 2.7.0
115
+ env: TYPE=UNIT ENVIRONMENT=rails32
116
+ - rvm: 2.7.0
117
+ env: TYPE=UNIT ENVIRONMENT=rails40
118
+ - rvm: 2.7.0
119
+ env: TYPE=UNIT ENVIRONMENT=rails41
120
+
121
+ - rvm: 2.7.0
122
+ env: TYPE=UNIT ENVIRONMENT=rails42 # rails (= 4.2.11) depends on bundler (< 2.0, >= 1.3.0)
123
+ - rvm: 2.7.0
124
+ env: TYPE=UNIT ENVIRONMENT=rails50 # rails (= 5.0.0) depends on bundler (< 2.0, >= 1.3.0)
125
+ - rvm: 2.7.0
126
+ env: TYPE=UNIT ENVIRONMENT=rails51 # rails (= 5.1.0) depends on bundler (< 2.0, >= 1.3.0)
127
+ - rvm: 2.7.0
128
+ env: TYPE=UNIT ENVIRONMENT=rails52 # rails (= 5.2.0) depends on bundler (< 2.0, >= 1.3.0)
129
+ - rvm: 2.7.0
130
+ env: TYPE=FUNCTIONAL GROUP=api # blocked: https://github.com/solnic/coercible/issues/27
131
+ - rvm: 2.7.0
132
+ env: TYPE=FUNCTIONAL GROUP=sinatra # padrino (~> 0.14.0) depends on bundler (~> 1.0)
133
+
134
+ - rvm: 2.7.0
135
+ env: TYPE=UNIT ENVIRONMENT=rails42 # rails (= 4.2.11) depends on bundler (< 2.0, >= 1.3.0)
136
+ - rvm: 2.7.0
137
+ env: TYPE=UNIT ENVIRONMENT=rails50 # rails (= 5.0.0) depends on bundler (< 2.0, >= 1.3.0)
138
+ - rvm: 2.7.0
139
+ env: TYPE=UNIT ENVIRONMENT=rails51 # rails (= 5.1.0) depends on bundler (< 2.0, >= 1.3.0)
140
+ - rvm: 2.7.0
141
+ env: TYPE=UNIT ENVIRONMENT=rails52 # rails (= 5.2.0) depends on bundler (< 2.0, >= 1.3.0)
142
+ - rvm: 2.7.0
143
+ env: TYPE=FUNCTIONAL GROUP=api # blocked: https://github.com/solnic/coercible/issues/27
144
+ - rvm: 2.7.0
145
+ env: TYPE=FUNCTIONAL GROUP=sinatra # padrino (~> 0.14.0) depends on bundler (~> 1.0)
146
+
91
147
  # 2.6
92
148
  - rvm: 2.6.1
93
149
  env: TYPE=UNIT ENVIRONMENT=rails30
@@ -139,6 +195,8 @@ matrix:
139
195
  env: TYPE=UNIT ENVIRONMENT=rails50
140
196
  - rvm: 2.1.10
141
197
  env: TYPE=UNIT ENVIRONMENT=rails51
198
+ - rvm: 2.1.10
199
+ env: TYPE=UNIT ENVIRONMENT=rails52
142
200
  - rvm: 2.1.10
143
201
  env: TYPE=UNIT ENVIRONMENT=rails60
144
202
 
@@ -147,6 +205,8 @@ matrix:
147
205
  env: TYPE=UNIT ENVIRONMENT=rails50
148
206
  - rvm: 2.0.0-p648
149
207
  env: TYPE=UNIT ENVIRONMENT=rails51
208
+ - rvm: 2.0.0-p648
209
+ env: TYPE=UNIT ENVIRONMENT=rails52
150
210
  - rvm: 2.0.0-p648
151
211
  env: TYPE=UNIT ENVIRONMENT=rails60
152
212
 
@@ -163,3 +223,19 @@ matrix:
163
223
  env: TYPE=UNIT ENVIRONMENT=rails41
164
224
  - rvm: jruby-9.2.6.0
165
225
  env: TYPE=UNIT ENVIRONMENT=rails60
226
+ - rvm: jruby-9.2.6.0
227
+ env: TYPE=UNIT ENVIRONMENT=rails52
228
+
229
+ # Excluding unsupported Rubies for grpc
230
+ - rvm: 2.0.0-p648
231
+ env: TYPE=FUNCTIONAL GROUP=infinite_tracing
232
+ - rvm: 2.1.10
233
+ env: TYPE=FUNCTIONAL GROUP=infinite_tracing
234
+ - rvm: 2.2.8
235
+ env: TYPE=FUNCTIONAL GROUP=infinite_tracing
236
+ - rvm: 2.3.5
237
+ env: TYPE=FUNCTIONAL GROUP=infinite_tracing
238
+ - rvm: 2.4.2
239
+ env: TYPE=FUNCTIONAL GROUP=infinite_tracing
240
+ - rvm: jruby-9.2.6.0
241
+ env: TYPE=FUNCTIONAL GROUP=infinite_tracing
@@ -1,5 +1,267 @@
1
1
  # New Relic Ruby Agent Release Notes #
2
2
 
3
+ ## v6.11.0
4
+
5
+ * **Infinite Tracing**
6
+
7
+ This release adds support for [Infinite Tracing](https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/enable-configure/enable-distributed-tracing). Infinite Tracing observes 100% of your distributed traces and provides visualizations for the most actionable data. With Infinite Tracing, you get examples of errors and long-running traces so you can better diagnose and troubleshoot your systems.
8
+
9
+ Configure your agent to send traces to a trace observer in New Relic Edge. View distributed traces through New Relic’s UI. There is no need to install a collector on your network.
10
+
11
+ Infinite Tracing is currently available on a sign-up basis. If you would like to participate, please contact your sales representative.
12
+
13
+ * **Bugfix: Cross Application Tracing (CAT) adds a missing field to response**
14
+
15
+ Previously, the Ruby agent's Cross Application Tracing header was missing a reserved field that would lead to an error
16
+ in the Go agent's processing of incoming headers from the Ruby agent. This fix adds that missing field to the headers, eliminating
17
+ the issue with traces involving the Ruby agent and the Go agent.
18
+
19
+ * **Bugfix: Environment Report now supports Rails >= 6.1**
20
+
21
+ Previously, users of Rails 6.1 would see the following deprecation warning appear when the Ruby agent attempted to
22
+ collect enviroment data: `DEPRECATION WARNING: [] is deprecated and will be removed from Rails 6.2`. These deprecation methods
23
+ no longer appear.
24
+
25
+ Thanks to Sébastien Dubois (sedubois) for reporting this issue and for the contribution!
26
+
27
+ * **Added distributed tracing to Sidekiq jobs**
28
+
29
+ Previously, Sidekiq jobs were not included in portions of <a href="https://docs.newrelic.com/docs/understand-dependencies/distributed-tracing/get-started/introduction-distributed-tracing">distributed traces</a> captured by the Ruby agent. Now you can view distributed
30
+ traces that include Sidekiq jobs instrumented by the Ruby agent.
31
+
32
+ Thanks to andreaseger for the contribution!
33
+
34
+ * **Bugfix: Eliminate warnings appearing when using `add_method_tracer` with Ruby 2.7**
35
+
36
+ Previously, using `add_method_tracer` with Ruby 2.7 to trace a method that included keyword arguments resulted in warning messages:
37
+ `warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call`. These messages no
38
+ longer appear.
39
+
40
+ Thanks to Harm de Wit and Atsuo Fukaya for reporting the issue!
41
+
42
+ ## v6.10.0
43
+
44
+ * **Error attributes now added to each span that exits with an error or exception**
45
+
46
+ Error attributes `error.class` and `error.message` are now included on the span event in which an error
47
+ or exception was noticed, and, in the case of unhandled exceptions, on any ancestor spans that also exit with an error.
48
+ The public API method `notice_error` now attaches these error attributes to the currently executing span.
49
+
50
+ <a href="https://docs.newrelic.com/docs/apm/distributed-tracing/ui-data/understand-use-distributed-tracing-data#rules-limits">Spans with error details are now highlighted red in the Distributed Tracing UI</a>, and error details will expose the associated
51
+ `error.class` and `error.message`. It is also now possible to see when an exception leaves the boundary of the span,
52
+ and if it is caught in an ancestor span without reaching the entry span. NOTE: This “bubbling up” of exceptions will impact
53
+ the error count when compared to prior behavior for the same trace. It is possible to have a trace that now has span errors
54
+ without the trace level showing an error.
55
+
56
+ If multiple errors occur on the same span, only the most recent error information is added to the attributes. Prior errors on the same span are overwritten.
57
+
58
+ These span event attributes conform to <a href="https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/manage-errors-apm-collect-ignore-or-mark-expected#ignore">ignored errors</a> and <a href="https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-data/manage-errors-apm-collect-ignore-or-mark-expected#expected">expected errors</a>.
59
+
60
+ * **Added tests for latest Grape / Rack combination**
61
+
62
+ For a short period of time, the latest versions of Grape and Rack had compatibility issues.
63
+ Generally, Rack 2.1.0 should be avoided in all cases due to breaking changes in many gems
64
+ reliant on Rack. We recommend using either Rack <= 2.0.9, or using latest Rack when using Grape
65
+ (2.2.2 at the time of this writing).
66
+
67
+ * **Bugfix: Calculate Content-Length in bytes**
68
+
69
+ Previously, the Content-Length HTTP header would be incorrect after injecting the Browser Monitoring
70
+ JS when the response contained Unicode characters because the value was not calculated in bytes.
71
+ The Content-Length is now correctly updated.
72
+
73
+ Thanks to thaim for the contribution!
74
+
75
+ * **Bugfix: Fix Content-Length calculation when response is nil**
76
+
77
+ Previously, calculating the Content-Length HTTP header would result in a `NoMethodError` in the case of
78
+ a nil response. These errors will no longer occur in such a case.
79
+
80
+ Thanks to Johan Van Ryseghem for the contribution!
81
+
82
+ * **Bugfix: DecoratingFormatter now logs timestamps as millisecond Integers**
83
+
84
+ Previously the agent sent timestamps as a Float with milliseconds as part of the
85
+ fractional value. Logs in Context was changed to only accept Integer values and this
86
+ release changes DecoratingFormatter to match.
87
+
88
+ * **Added --force option to `newrelic install` cli command to allow overwriting newrelic.yml**
89
+
90
+ * **Bugfix: The fully qualified hostname now works correctly for BSD and Solaris**
91
+
92
+ Previously, when running on systems such as BSD and Solaris, the agent was unable to determine the fully
93
+ qualified domain name, which is used to help link Ruby agent data with data from New Relic Infrastructure.
94
+ This information is now successfully collected on various BSD distros and Solaris.
95
+
96
+
97
+ ## v6.9.0
98
+
99
+ * **Added support for W3C Trace Context, with easy upgrade from New Relic trace context**
100
+
101
+ * [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
102
+ the W3C trace header format and the New Relic trace header format. This simplifies
103
+ agent upgrades, allowing trace context to be propagated between services with older
104
+ and newer releases of New Relic agents. W3C trace header format will always be
105
+ accepted and emitted. New Relic trace header format will be accepted, and you can
106
+ optionally disable emission of the New Relic trace header format.
107
+
108
+ * When distributed tracing is enabled by setting `distributed_tracing.enabled` to `true`,
109
+ the Ruby agent will now accept W3C's `traceparent` and `tracestate` headers when
110
+ calling `DistributedTracing.accept_distributed_trace_headers` or automatically via
111
+ `http` instrumentation. When calling `DistributedTracing.insert_distributed_trace_headers`,
112
+ or automatically via `http` instrumentation, the Ruby agent will include the W3C
113
+ headers along with the New Relic distributed tracing header, unless the New Relic
114
+ trace header format is disabled by setting `exclude_newrelic_header` setting to `true`.
115
+
116
+ * Added `DistributedTracing.accept_distributed_trace_headers` API for accepting both
117
+ New Relic and W3C TraceContext distributed traces.
118
+
119
+ * Deprecated `DistributedTracing.accept_distributed_trace_payload` which will be removed
120
+ in a future major release.
121
+
122
+ * Added `DistributedTracing.insert_distributed_trace_headers` API for adding outbound
123
+ distributed trace headers. Both W3C TraceContext and New Relic formats will be
124
+ included unless `distributed_tracing.exclude_newrelic_header: true`.
125
+
126
+ * Deprecated `DistributedTracing.create_distributed_trace_payload` which will be removed
127
+ in a future major release.
128
+
129
+ Known Issues and Workarounds
130
+
131
+ * If a .NET agent is initiating traces as the root service, do not upgrade your
132
+ downstream Ruby New Relic agents to this agent release.
133
+
134
+ * **Official Ruby 2.7 support**
135
+
136
+ The Ruby agent has been verified to run with Ruby 2.7.0.
137
+
138
+ * **Reduced allocations when tracing transactions using API calls**
139
+
140
+ Default empty hashes for `options` parameter were not frozen, leading to
141
+ excessive and unnecessary allocations when calling APIs for tracing transactions.
142
+
143
+ Thanks to Joel Turkel (jturkel) for the contribution!
144
+
145
+ * **Bugfix for Resque worker thread race conditions**
146
+
147
+ 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
148
+ is now fixed.
149
+
150
+ Thanks to Bertrand Paquet (bpaquet) for the contribution!
151
+
152
+ * **Bugfix for Content-Length when injecting Browser Monitoring JS**
153
+
154
+ The Content-Length HTTP header would be incorrect after injecting the Browser Monitoring
155
+ JS into the HEAD tag of the HTML source with Content-Length and lead to the HTML BODY content
156
+ being truncated in some cases. The Content-Length is now correctly updated after injecting the
157
+ Browser Monitoring JS script.
158
+
159
+ Thanks to Slava Kardakov (ojab) for the contribution!
160
+
161
+ ## v6.8.0
162
+
163
+ * **Initial Ruby 2.7 support**
164
+
165
+ The Ruby agent has been verified to run with Ruby 2.7.0-preview1.
166
+
167
+ * **New API method to add custom attributes to Spans**
168
+
169
+ New API method for adding custom attributes to spans. Previously, custom
170
+ attributes were only available at the Transaction level. Now, with Span
171
+ level custom attributes, more granular tagging of events is possible for
172
+ easier isolation and review of trace events. For more information:
173
+
174
+ * [`Agent#add_custom_span_attributes`](https://www.rubydoc.info/github/newrelic/rpm/NewRelic/Agent#add_custom_span_attributes)
175
+
176
+ * **Enables ability to migrate to Configurable Security Policies (CSP) on a per agent
177
+ basis for accounts already using High Security Mode (HSM).**
178
+
179
+ When both [HSM](https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/high-security-mode) and [CSP](https://docs.newrelic.com/docs/agents/manage-apm-agents/configuration/enable-configurable-security-policies) are enabled for an account, an agent (this version or later)
180
+ can successfully connect with either `high_security: true` or the appropriate
181
+ `security_policies_token` configured. `high_security` has been added as part of
182
+ the preconnect payload.
183
+
184
+ * **Bugfix for Logs in Context combined with act-fluent-logger-rails**
185
+
186
+ Previously, when using the Ruby agent's Logs in Context logger
187
+ to link logging data with trace and entity metadata for an
188
+ improved experience in the UI, customers who were also using
189
+ the `act-fluent-logger-rails` gem would see a `NoMethodError`
190
+ for `clear_tags!` that would interfere with the use of this
191
+ feature. This error no longer appears, allowing customers to
192
+ combine the use of Logs in Context with the use of this gem.
193
+
194
+ Please note that the Logs in Context logger does not support
195
+ tagged logging; if you are initializing your logger with a
196
+ `log_tags` argument, your custom tags may not appear on the
197
+ final version of your logs.
198
+
199
+ * **Bugfix for parsing invalid newrelic.yml**
200
+
201
+ Previously, if the newrelic.yml configuration file was invalid, and the agent
202
+ could not start as a result, the agent would not log any indication of
203
+ the problem.
204
+
205
+ This version of the agent will emit a FATAL message to STDOUT when this scenario
206
+ occurs so that customers can address issues with newrelic.yml that prevent startup.
207
+
208
+ * **Configuration options containing the terms "whitelist" and "blacklist" deprecated**
209
+
210
+ The following local configuration settings have been deprecated:
211
+
212
+ * `autostart.blacklisted_constants`: use `autostart.denylisted_constants` instead.
213
+ * `autostart.blacklisted_executables`: use `autostart.denylisted_executables` instead.
214
+ * `autostart.blacklisted_rake_tasks`: use `autostart.denylisted_rake_tasks` instead.
215
+ * `strip_exception_messages.whitelist`: use `strip_exception_messages.allowed_classes` instead.
216
+
217
+ * **Bugfix for module loading and constant resolution in Rails**
218
+
219
+ Starting in version 6.3, the Ruby agent has caused module loading and constant
220
+ resolution to sometimes fail, which caused errors in some Rails applications.
221
+ These errors were generally `NoMethodError` exceptions or I18n errors
222
+ `translation missing` or `invalid locale`. These errors would not appear if the agent
223
+ was removed from the application's Gemfile.
224
+ This version of the agent fixes these issues with module loading and constant
225
+ resolution, so these errors no longer occur.
226
+
227
+ * **Bugfix: failed to get urandom**
228
+
229
+ Previous versions of the agent would fail unexpectedly when the Ruby process used
230
+ every available file descriptor. The failures would include this message:
231
+ ```
232
+ ERROR : RuntimeError: failed to get urandom
233
+ ```
234
+ This version of the agent uses a different strategy for generating random IDs, and
235
+ will not fail in the same way when no file descriptors are available.
236
+
237
+ ## v6.7.0
238
+
239
+ * **Trace and Entity Metadata API**
240
+
241
+ Several new API methods have been added to the agent:
242
+ * [`Agent#linking_metadata`](https://www.rubydoc.info/github/newrelic/rpm/NewRelic/Agent#linking_metadata-instance_method)
243
+ * [`Tracer#trace_id`](https://www.rubydoc.info/github/newrelic/rpm/NewRelic/Agent/Tracer#trace_id-class_method)
244
+ * [`Tracer#span_id`](https://www.rubydoc.info/github/newrelic/rpm/NewRelic/Agent/Tracer#span_id-class_method)
245
+ * [`Tracer#sampled?`](https://www.rubydoc.info/github/newrelic/rpm/NewRelic/Agent/Tracer#sampled?-class_method)
246
+
247
+ These API methods allow you to access information that can be used to link data of your choosing to a trace or entity.
248
+
249
+ * **Logs in Context**
250
+
251
+ This version of the agent includes a logger, which can be used in place of `::Logger`
252
+ from the standard library, or `ActiveSupport::Logger` from Rails. This logger
253
+ leverages the new trace and entity metadata API to decorate log statements with entity
254
+ and trace metadata, so they can be correlated together in the New Relic UI.
255
+
256
+ For more information on how to use logs in context, see https://docs.newrelic.com/docs/enable-logs-context-ruby
257
+
258
+ * **Project metadata in Gemspec**
259
+
260
+ Project metadata has been added to the gemspec file. This means our Rubygems page will allow users to more easily
261
+ access the agent's source code, raise issues, and read the changelog.
262
+
263
+ Thanks to Orien Madgwick for the contribution!
264
+
3
265
  ## v6.6.0
4
266
 
5
267
  * **Bugfix for ActionCable Instrumentation**