forked from newrelic/newrelic-ruby-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHANGELOG
2494 lines (1764 loc) · 101 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# New Relic Ruby Agent Release Notes #
## v3.14.1 ##
* Add support for setting a display name on hosts
You can now configure a display name for your hosts using process_host.display_name,
to more easily distinguish dynamically assigned hosts. For more info, see
https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/add-rename-remove-hosts#display_name
* Fixes automatic middleware instrumentation for Puma 2.12.x
Starting with version 2.12.x the Puma project inlines versions of Rack::Builder
and Rack::URLMap under the Puma namespace. This had the unfortunate side effect of
breaking automatic Rack middleware instrumentation. We now instrument Puma::Rack::Builder
and Puma::Rack::URLMap and once again have automatic Rack middleware instrumentation for
applications running on Puma.
* Do not use a DelayedJob's display_name for naming the transaction
A DelayedJob's name may be superceded by a display_name, which can
lead to a metric grouping issue if the display_name contains unique
identifiers. We no longer use job name methods that may lead to an
arbitrary display_name. Instead, we use the appropriate class and/or
method names, depending what makes sense for the job and how it's called.
* Improvements to Mongo 2.1.x instrumentation
Fixes issue where getMore operations in batched queries could create metric grouping issues.
Previously when multiple Mongo queries executed in the same scope only a single query was recorded
as part of a transaction trace. Now transaction trace nodes will be created for every query
executed during a transaction.
* Bugfix for NewRelic::Agent.notice_error
Fixes issue introduced in v3.14.0 where calling NewRelic::Agent.notice_error outside of an active
transaction results in a NoMethodError.
* Bugfix for Resque TransactionError events
Fixes error preventing Transaction Error events generated in Resque tasks from being sent to New Relic.
## v3.14.0 ##
* pruby marshaller removed
The deprecated pruby marshaller has now been removed; the `marshaller` config
option now only accepts `json`. Customers still running Ruby 1.8.7/REE must
add the `json` gem to their Gemfile, or (preferably) upgrade to Ruby 1.9.3 or
newer.
* Log dates in ISO 8601 format
The agent will now log dates in ISO 8601 (YYYY-mm-dd) format, instead of
mm/dd/yy.
* Additional attributes collected
The agent now collects the following information in web transactions:
Accept, Host, User-Agent, Content-Length HTTP request headers, HTTP request
method, and Content-Type HTTP response header.
* TransactionErrors reported for Advanced Analytics for APM Errors
With this release, the agent reports TransactionError events. These new events
power the beta feature Advanced Analytics for APM Errors. The error events are
also available today through New Relic Insights.
Advanced Analytics for APM Errors lets you see all of your errors, with
granular detail. Filter and group by any attribute to analyze them. Take
action to resolve issues through collaboration.
For more information, see https://docs.newrelic.com/docs/apm/applications-menu/events/view-apm-errors-error-traces
## v3.13.2 ##
* Don't fail to send data when using 'mathn' library
Version 3.12.1 introduced a bug with applications using the 'mathn' library
that would prevent the agent from sending data to New Relic. This has been
fixed.
## v3.13.1 ##
* Don't use a pager when running `git log` command
This would cause Capistrano deploys to hang when a large number of commits were being deployed.
Thanks to John Naegle for reporting and fixing this issue!
* Official support for JRuby 9.0.0.0
The Ruby agent is now officially fully tested and supported on JRuby 9.0.0.0.
* Instrumentation for MongoDB 2.1.x
Visibility in your MongoDB queries returns when using version 2.1.0 of
the Mongo driver or newer. Thanks to Durran Jordan of MongoDB for contributing
the Mongo Monitoring instrumentation!
* Fix for ArgumentError "invalid byte sequence in UTF-8"
This would come up when trying to parse out the operation from a database query
containing characters that would trigger a invalid byte sequence in UTF-8 error.
Thanks to Mario Izquierdo for reporting this issue!
* Improved database metric names for ActiveRecord::Calculations queries
Aggregate metrics recorded for queries made via the ActiveRecord::Calculations
module (#count, #sum, #max, etc.) will now be associated with the correct
model name, rather than being counted as generic 'select' operations.
* Allow at_exit handlers to be installed for Rubinius
Rubinius can support the at_exit block used by install_exit_handler.
Thanks to Aidan Coyle for reporting and fixing this issue!
## v3.13.0 ##
* Bugfix for uninitialized constant NewRelic::Agent::ParameterFiltering
Users in some environments encountered a NameError: uninitialized constant
NewRelic::Agent::ParameterFiltering from the Rails instrumentation while
running v3.12.x of the Ruby agent. This issue has been fixed.
* Rake task instrumentation
The Ruby agent now provides opt-in tracing for Rake tasks. If you run
long jobs via Rake, you can get all the visibility and goodness of New Relic
that your other background jobs have. To enable this, see
https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/rake
* Redis instrumentation
Redis operations will now show up on the Databases tab and in transaction
traces. By default, only command names will be captured; to capture command
arguments, set `transaction_tracer.record_redis_arguments` to `true` in
your configuration.
* Fix for over-obfuscated SQL Traces and PostgreSQL
An issue with the agent obfuscating column and table names from Slow SQL
Traces when using PostgreSQL has been resolved.
* Rubinius 2.5.8 VM metric renaming support
Rubinius 2.5.8 changed some VM metric names and eliminated support for
total allocated object counters. The agent has been updated accordingly.
* Fix agent attributes with a value of false not being stored
An issue introduced in v3.12.1 prevented attributes (like those added with
`add_custom_attributes`) from being stored if their value was false. This has
been fixed.
## v3.12.1 ##
* More granular Database metrics for ActiveRecord 3 and 4
Database metrics recorded for non-SELECT operations (UPDATE, INSERT, DELETE,
etc.) on ActiveRecord 3 and 4 now include the model name that the query was
being executed against, allowing you to view these queries broken down by
model on the Datastores page. Thanks to Bill Kayser for reporting this issue!
* Support for Multiverse testing third party gems
The Ruby agent has rich support for testing multiple gem versions, but
previously that wasn't accessible to third party gems. Now you can now
simply `require 'task/multiverse'` in your Rakefile to access the same
test:multiverse task that New Relic uses itself. For more details, see:
https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/third-party-instrumentation#testing-your-extension
* Use Sidekiq 3.x's error handler
Sidekiq 3.x+ provides an error handler for internal and middleware related
failures. Failures at these points were previously unseen by the Ruby agent,
but now they are properly traced.
* Better error messages for common configuration problems with Capistrano
Templating errors in newrelic.yml would result in obscure error messages
during Capistrano deployments. These messages now more properly reflect the
root cause of the errors.
* newrelic_ignore methods allow strings
The newrelic_ignore methods previously only supported passing symbols, and
would quietly ignore any strings passed. Now strings can be passed as well
to get the intuitive ignoring behavior you'd expect.
* Replace DNS resolver for Resque jobs with Resolv
In some circumstances customers with a very high number of short-lived Resque
jobs were experiencing deadlocks during DNS resolution. Resolv is an all Ruby
DNS resolver that replaces the libc implementation to prevent these deadlocks.
## v3.12.0 ##
* Flexible capturing of attributes
The Ruby agent now allows you more control over exactly which request
parameters and job arguments are attached to transaction traces, traced
errors, and Insights events. For details, see:
https://docs.newrelic.com/docs/agents/ruby-agent/ruby-agent-attributes
* Fixed missing URIs in traces for retried Excon requests
If Excon's idempotent option retried a request, the transaction trace node
for the call would miss having the URI assigned. This has been fixed.
* Capturing request parameters from rescued exceptions in Grape
If an exception was handled via a rescue_from in Grape, request parameters
were not properly set on the error trace. This has been fixed. Thanks to
Ankit Shah for helping us spot the bug.
## v3.11.2 ##
* Better naming for Rack::URLMap
If a Rack app made direct use of Rack::URLMap, instrumentation would miss
out on using the clearest naming based on the app class. This has been
fixed.
* Avoid performance regression in makara database adapter
Delegation in the makara database adapter caused performance issues when the
agent looked up a connection in the pool. The agent now uses a faster
lookup to work around this problem in makara, and allocates less as well.
Thanks Mike Nelson for the help in resolving this!
* Allow audit logging to STDOUT
Previously audit logs of the agent's communication with New Relic could only
write to a file. This prevented using the feature on cloud providers like
Heroku. Now STDOUT is an allowed destination for `audit_log.path`. Logging
can also be restricted to certain endpoints via `audit_log.endpoints`.
For more information see https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration#audit_log
* Fix for crash during startup when Rails required but not used
If an application requires Rails but wasn't actually running it, the Ruby
agent would fail during startup. This has been fixed.
* Use IO.select explicitly in the event loop
If an application adds their own select method to Object/Kernel or mixes in a
module that overrides the select method (as with ActionView::Helpers) we would
previously have used their implementation instead of the intended IO.select,
leading to all sorts of unusual errors. We now explicitly reference IO.select
in the event loop to avoid these issues.
* Fix for background thread hangs on old Linux kernels
When running under Ruby 1.8.7 on Linux kernel versions 2.6.11 and earlier,
the background thread used by the agent to report data would hang, leading
to no data being reported. This has been be fixed.
## v3.11.1 ##
If an application adds their own select method to Object/Kernel or mixes in a
module that overrides the select method (as with ActionView::Helpers) we would
previously have used their implementation instead of the intended IO.select,
leading to all sorts of unusual errors. We now explicitly reference IO.select
in the event loop to avoid these issues.
* Fix for background thread hangs on old Linux kernels
When running under Ruby 1.8.7 on Linux kernel versions 2.6.11 and earlier,
the background thread used by the agent to report data would hang, leading
to no data being reported. This has been be fixed.
## v3.11.1 ##
The Ruby agent incorrectly rescued exceptions at a point which caused
sequel_pg 1.6.11 to segfault. This has been fixed. Thanks to Oldrich
Vetesnik for the report!
## v3.11.0 ##
* Unified view for SQL database and NoSQL datastore products.
The response time charts in the application overview page will now include
NoSQL datastores, such as MongoDB, and also the product name of existing SQL
databases such as MySQL, Postgres, etc.
The Databases page will now enable the filtering of metrics and operations
by product, and includes a table listing all operations.
For existing SQL databases, in addition to the existing breakdown of SQL
statements and operations, the queries are now also associated with the
database product being used.
For NoSQL datastores, such as MongoDB, we have now added information about
operations performed against those products, similar to what is being done
for SQL databases.
Because this introduces a notable change to how SQL database metrics are
collected, it is important that you upgrade the agent version on all hosts.
If you are unable to transition to the latest agent version on all hosts at
the same time, you can still access old and new metric data for SQL
databases, but the information will be split across two separate views.
For more information see https://docs.newrelic.com/docs/apm/applications-menu/monitoring/databases-slow-queries-dashboard
* Track background transactions as Key Transactions
In prior versions of the Ruby agent, only web transactions could be tracked
as Key Transactions. This functionality is now available to all
transactions, including custom Apdex values and X-Ray sessions.
For more information see https://docs.newrelic.com/docs/apm/selected-transactions/key-transactions/key-transactions-tracking-important-transactions-or-events
* More support and documentation for third-party extensions
It's always been possible to write extension gems for the Ruby agent, but
now there's one location with best practices and recommendations to guide
you in writing extensions. Check out
https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/third-party-instrumentation
We've also added simpler APIs for tracing datastores and testing your
extensions. It's our way of giving back to everyone who's helped build on
the agent over the years. <3
* Fix for anonymous class middleware naming
Metric names based off anonymous middlewares lacked a class name in the UI.
The Ruby agent will now look for a superclass, or default to AnonymousClass
in those cases.
* Improved exit behavior in the presence of Sinatra
The agent uses an `at_exit` hook to ensure data from the last < 60s before a
process exits is sent to New Relic. Previously, this hook was skipped if
Sinatra::Application was defined. This unfortunately missed data for
short-lived background processes that required, but didn't run, Sinatra. Now
the agent only skips its `at_exit` hook if Sinatra actually runs from
`at_exit`.
## v3.10.0 ##
* Support for the Grape framework
We now instrument the Grape REST API framework! To avoid conflicts with the
third-party newrelic-grape gem, our instrumentation will not be installed if
newrelic-grape is present in the Gemfile.
For more details, see https://docs.newrelic.com/docs/agents/ruby-agent/frameworks/grape-instrumentation
* Automatic Cross Application Tracing support for all Rack applications
Previously Rack apps not using Rails or Sinatra needed to include the
AgentHooks middleware to get Cross Application Tracing support. With
these changes, this is no longer necessary. Any explicit references to
AgentHooks can be removed unless the `disable_middleware_instrumentation`
setting is set to `true`.
* Metrics no longer reported from Puma master processes
When using Puma's cluster mode with the preload_app! configuration directive,
the agent will no longer start its reporting thread in the Puma master
process. This should result in more accurate instance counts, and more
accurate stats on the Ruby VMs page (since the master process will be
excluded).
* Better support for Sinatra apps used with Rack::Cascade
Previously, using a Sinatra application as part of a Rack::Cascade chain would
cause all transactions to be named after the Sinatra application, rather than
allowing downstream applications to set the transaction name when the Sinatra
application returned a 404 response. This has been fixed.
* Updated support for Rubinius 2.3+ metrics
Rubinius 2.3 introduced a new system for gathering metrics from the
underlying VM. Data capture for the Ruby VM's page has been updated to take
advantage of these. Thanks Yorick Peterse for the contribution!
* Fix for missing ActiveJob traced errors
ActiveJobs processed by backends where the Ruby agent lacked existing
instrumentation missed reporting traced errors. This did not impact
ActiveJobs used with Sidekiq or Resque, and has been fixed.
* Fix possible crash in middleware tracing
In rare circumstances, a failure in the agent early during tracing of a web
request could lead to a cascading error when trying to capture the HTTP status
code of the request. This has been fixed. Thanks to Michal Cichra for the fix!
## v3.9.9 ##
* Support for Ruby 2.2
A new version of Ruby is available, and the Ruby agent is ready to run on
it. We've been testing things out since the early previews so you can
upgrade to the latest and greatest and use New Relic right away to see how
the new Ruby's performing for you.
* Support for Rails 4.2 and ActiveJob
Not only is a new Ruby available, but a new Rails is out too! The Ruby agent
provides all the usual support for Rails that you'd expect, and we
instrument the newly released ActiveJob framework that's part of 4.2.
* Security fix for handling of error responses from New Relic servers
This release fixes a potential security issue wherein an attacker who was able
to impersonate New Relic's servers could have triggered arbitrary code
execution in agent's host processes by sending a specially-crafted error
response to a data submission request.
This issue is mitigated by the fact that the agent uses SSL certificate
checking in order to verify the identity of the New Relic servers to which it
connects. SSL is enabled by default by the agent, and can be enforced
account-wide by enabling High Security Mode for your account:
https://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security
* Fix for transactions with invalid URIs
If an application used the agent's `ignore_url_regexes` config setting to
ignore certain transactions, but received an invalid URI, the agent would
fail to record the transaction. This has been fixed.
* Fixed incompatibility with newrelic-grape
The 3.9.8 release of the Ruby agent included disabled prototyped
instrumentation for the Grape API framework. This introduced an
incompatibility with the existing third party extension newrelic-grape. This
has been fixed. Newrelic-grape continues to be the right solution until
full agent support for Grape is available.
## v3.9.8 ##
* Custom Insights events API
In addition to attaching custom parameters to the events that the Ruby agent
generates automatically for each transaction, you can now record custom event
types into Insights with the new NewRelic::Agent.record_custom_event API.
For details, see https://docs.newrelic.com/docs/insights/new-relic-insights/adding-querying-data/inserting-custom-events-new-relic-agents
* Reduced memory usage for idling applications
Idling applications using the agent could previously appear to leak memory
because of native allocations during creation of new SSL connections to our
servers. These native allocations didn't factor into triggering Ruby's
garbage collector.
The agent will now re-use a single TCP connection to our servers for as long
as possible, resulting in improved memory usage for applications that are
idling and not having GC triggered for other reasons.
* Don't write to stderr during CPU sampling
The Ruby agent's code for gathering CPU information would write error
messages to stderr on some FreeBSD systems. This has been fixed.
* LocalJumpError on Rails 2.x
Under certain conditions, Rails 2.x controller instrumentation could fail
with a LocalJumpError when an action was not being traced. This has been
fixed.
* Fixed config lookup in warbler packaged apps
When running a Ruby application from a standalone warbler .jar file on
JRuby, the packaged config/newrelic.yml was not properly found. This has
been fixed, and thanks to Bob Beaty for the help getting it fixed!
* Hash iteration failure in middleware
If a background thread iterated over the keys in the Rack env hash, it could
cause failures in New Relic's AgentHooks middleware. This has been fixed.
## v3.9.7 ##
* Support for New Relic Synthetics
The Ruby agent now gives you additional information for requests from New
Relic Synthetics. More transaction traces and events give you a clearer look
into how your application is performing around the world.
For more details, see https://docs.newrelic.com/docs/synthetics/new-relic-synthetics/getting-started/new-relic-synthetics
* Support for multiple job per fork gems with Resque
The resque-jobs-per-fork and resque-multi-job-forks gems alter Resque to
fork every N jobs instead of every job. This previously caused issues for
the Ruby agent, but those have been resolved. These gems are fully supported.
Running Resque with the FORK_PER_JOB=false environment variable setting is
also supported now.
For more details on our Resque support, see https://docs.newrelic.com/docs/agents/ruby-agent/background-jobs/resque-instrumentation
* Support agent when starting Resque Pool from Rake task
When running resque-pool with its provided rake tasks, the agent would not
start up properly. Thanks Tiago Sousa for the fix!
* Fix for DelayedJob + Rails 4.x queue depth metrics
The Ruby agent periodically records DelayedJob queuedepth as a metric, but
this didn't work properly in Rails 4.x applications. This has been fixed.
Thanks Jonathan del Strother for his help with the issue!
* Fix for failure in background transactions with rules.ignore_url_regexes
The recently added feature for ignoring transactions via URL regexes caused
errors for non-web transactions. This has been fixed.
* Rename the TransactionNamer.name method to TransactionNamer.name_for
The internal TransactionNamer class had a class method called 'name', with a
different signature than the existing Class#name method and could cause
problems when trying to introspect instances of the class.
Thanks to Dennis Taylor for contributing this fix!
## v3.9.6 ##
* Rails 4.2 ActiveJob support
A new version of Rails is coming! One of the highlight features is
ActiveJob, a framework for interacting with background job processors. This
release of the Ruby agent adds instrumentation to give you insight into
ActiveJob, whether you're just testing it out or running it for real.
Metrics are recorded around enqueuing ActiveJobs, and background transactions
are started for any ActiveJob performed where the agent didn't already
provide specific instrumentation (such as DelayedJob, Resque and Sidekiq).
Since Rails 4.2 is still in beta we'd love to hear any feedback on this
instrumentation so it'll be rock solid for the general release!
* Ruby 2.2.0-preview1 updates
Ruby 2.2.0 is on its way later in the year, and the Ruby agent is ready for
it. Updates to the GC stats and various other small changes have already been
applied, and our automated tests are running against 2.2.0 so the agent will
be ready on release day.
* Ignoring transactions by URL
While you could always ignore transactions by controller and action, the
Ruby agent previously lacked a way to ignore by specific URLs or patterns
without code changes. This release adds the config setting,
`rules.ignore_url_regexes` to ignore specific transactions based on the
request URL as well. For more information, see the documentation at:
https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ignoring-specific-transactions#config-ignoring
* Better dependency detection in non-Rack applications
The Ruby agent runs dependency detection at key points in the Rack and Rails
lifecycle, but non-Rails apps could occasionally miss out instrumenting late
loaded libraries. The agent now runs an additional dependency detection
during manual_start to more seamlessly install instrumentation in any app.
* Excluding /newrelic routes from developer mode
Recent changes to track time in middleware resulted in New Relic's developer
mode capturing its own page views in the list. This has been fixed. Thanks
to Ignatius Reza Lesmana for the report!
* Spikes in external time
Timeouts during certain external HTTP requests could result in incorrect
large spikes in the time recorded by the agent. This has been fixed.
* Recognize browser_monitoring.auto_instrument setting in non-Rails apps
The `browser_monitoring.auto_instrument` config setting disables
auto-injection of JavaScript into your pages, but was not properly obeyed in
Sinatra and other non-Rails contexts. This has been fixed.
* Failures to gather CPU thread time on JRuby
JRuby running on certain JVM's and operating systems (FreeBSD in particular)
did not always support the method being used to gather CPU burn metrics.
This would result in a failure during those transactions. This has been
fixed.
* Fix for rare race condition in Resque instrumentation
A race condition in the agent's Resque instrumentation that could cause rare
Resque job failures in high-throughput Resque setups has been fixed. This bug
would manifest as an exception with the following error message:
"RuntimeError: can't add a new key into hash during iteration" and a backtrace
leading through the PipeChannelManager class in the agent.
## v3.9.5 ##
* Per-dyno data on Heroku
When running on Heroku, data from the agent can now be broken out by dyno
name, allowing you to more easily see what's happening on a per-dyno level.
Dynos on Heroku are now treated in the same way that distinct hosts on other
platforms work.
By default, 'scheduler' and 'run' dyno names will be aggregated into
'scheduler.*' and 'run.*' to avoid unbounded growth in the number of reported
hostnames.
Read more about this feature on our Heroku docs page:
https://docs.newrelic.com/docs/agents/ruby-agent/miscellaneous/ruby-agent-heroku
* HTTP response codes in Insights events
The Ruby agent will now capture HTTP response codes from Rack applications
(including Rails and Sinatra apps) and include them under the httpResponseCode
attribute on events sent to Insights.
* Stricter limits on memory usage of SQL traces
The agent now imposes stricter limits on the number of distinct SQL traces
that it will buffer in memory at any point in time, leading to more
predictable memory consumption even in exceptional circumstances.
* Improved reliability of thread profiling
Several issues that would previously have prevented the successful completion
and transmission of thread profiles to New Relic's servers have been fixed.
These issues were related to the use of recursion in processing thread
profiles, and have been addressed by both limiting the maximum depth of the
backtraces recorded in thread profiles, and eliminating the agent's use of
recursion in processing profile data.
* Allow tracing Rails view helpers with add_method_tracer
Previously, attempting to trace a Rails view helper method using
add_method_tracer on the view helper module would lead to a NoMethodError
when the traced method was called (undefined method `trace_execution_scoped').
This has been fixed.
This issue was an instance of the Ruby 'dynamic module inclusion' or 'double
inclusion' problem. Usage of add_method_tracer now no longer relies upon the
target class having actually picked up the trace_execution_scoped method from
the NewRelic::Agent::MethodTracer module.
* Improved performance of queue time parsing
The number of objects allocated while parsing the front-end timestamps on
incoming HTTP requests has been significantly reduced.
Thanks to Aleksei Magusev for the contribution!
## v3.9.4 ##
* Allow agent to use alternate certificate stores
When connecting via SSL to New Relic services, the Ruby agent verifies its
connection via a certificate bundle shipped with the agent. This had problems
with certain proxy configurations, so the `ca_bundle_path` setting in
newrelic.yml can now override where the agent locates the cert bundle to use.
For more information see the documentation at:
https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ssl-settings-ruby-agent
* Rails 4.2 beta in tests
Although still in beta, a new version of Rails is on its way! We're
already running our automated test suites against the beta to ensure New
Relic is ready the day the next Rails is released.
* ActiveRecord 4 cached queries fix
Queries that were hitting in the ActiveRecord 4.x query cache were
incorrectly being counted as database time by the agent.
* Fix for error in newrelic.yml loading
If your application ran with a RAILS_ENV that was not listed in newrelic.yml
recent agent versions would give a NameError rather than a helpful message.
This has been fixed. Thanks Oleksiy Kovyrin for the patch!
## v3.9.3 ##
* Fix to prevent proxy credentials transmission
This update prevents proxy credentials set in the agent config file from
being transmitted to New Relic.
## v3.9.2 ##
* Added API for ignoring transactions
This release adds three new API calls for ignoring transactions:
- `NewRelic::Agent.ignore_transaction`
- `NewRelic::Agent.ignore_apdex`
- `NewRelic::Agent.ignore_enduser`
The first of these ignores a transaction completely: nothing about it will be
reported to New Relic. The second ignores only the Apdex metric for a single
transaction. The third disables javascript injection for browser monitoring
for the current transaction.
These methods differ from the existing newrelic_ignore_* method in that they
may be called *during* a transaction based on some dynamic runtime criteria,
as opposed to at the class level on startup.
See the docs for more details on how to use these methods:
https://docs.newrelic.com/docs/agents/ruby-agent/installation-and-configuration/ignoring-specific-transactions
* Improved SQL obfuscation
SQL queries containing string literals ending in backslash ('\') characters
would previously not have been obfuscated correctly by the Ruby agent prior to
transmission to New Relic. In addition, SQL comments were left un-obfuscated.
This has been fixed, and the test coverage for SQL obfuscation has been
improved.
* newrelic_ignore* methods now work when called in a superclass
The newrelic_ignore* family of methods previously did not apply to subclasses
of the class from which it was called, meaning that Rails controllers
inheriting from a single base class where newrelic_ignore had been called
would not be ignored. This has been fixed.
* Fix for rare crashes in Rack::Request#params on Sinatra apps
Certain kinds of malformed HTTP requests could previously have caused
unhandled exceptions in the Ruby agent's Sinatra instrumentation, in the
Rack::Request#params method. This has been fixed.
* Improved handling for rare errors caused by timeouts in Excon requests
In some rare cases, the agent would emit a warning message in its log file and
abort instrumentation of a transaction if a timeout occurred during an
Excon request initiated from within that transaction. This has been fixed.
* Improved behavior when the agent is misconfigured
When the agent is misconfigured by attempting to shut it down without
it ever having been started, or by attempting to disable instrumentation after
instrumentation has already been installed, the agent will no longer raise an
exception, but will instead log an error to its log file.
* Fix for ignore_error_filter not working in some configurations
The ignore_error_filter method allows you to specify a block to be evaluated
in order to determine whether a given error should be ignored by the agent.
If the agent was initially disabled, and then later enabled with a call to
manual_start, the ignore_error_filter would not work. This has been fixed.
* Fix for Capistrano 3 ignoring newrelic_revision
New Relic's Capistrano recipes support passing parameters to control the
values recorded with deployments, but user provided :newrelic_revision was
incorrectly overwritten. This has been fixed.
* Agent errors logged with ruby-prof in production
If the ruby-prof gem was available in an environment without New Relic's
developer mode enabled, the agent would generate errors to its log. This has
been fixed.
* Tighter requirements on naming for configuration environment variables
The agent would previously assume any environment variable containing
'NEWRELIC' was a configuration setting. It now looks for this string as a
prefix only.
Thanks to Chad Woolley for the contribution!
## v3.9.1 ##
* Ruby 1.8.7 users: upgrade or add JSON gem now
Ruby 1.8.7 is end-of-lifed, and not receiving security updates, so we strongly
encourage all users with apps on 1.8.7 to upgrade.
If you're not able to upgrade yet, be aware that a coming release of the Ruby
agent will require users of Ruby 1.8.7 to have the 'json' gem available within
their applications in order to continue sending data to New Relic.
For more details, see:
https://docs.newrelic.com/docs/ruby/ruby-1.8.7-support
* Support for new Cross Application Trace view
This release enhances cross application tracing with a visualization of
the cross application calls that a specific Transaction Trace is involved
in. The new visualization helps you spot bottlenecks in external services
within Transaction Traces and gives you an end-to-end understanding
of how the transaction trace is used by other applications and services.
This leads to faster problem diagnosis and better collaboration across
teams. All agents involved in the cross application communication must
be upgraded to see the complete graph. You can view cross application
traces from in the Transaction Trace drill-down.
* High security mode V2
The Ruby agent now supports V2 of New Relic's high security mode. To enable
it, you must add 'high_security: true' to your newrelic.yml file, *and* enable
high security mode through the New Relic web interface. The local agent
setting must be in agreement with the server-side setting, or the agent will
shut down and no data will be collected.
Customers who already had the server-side high security mode setting enabled
must add 'high_security: true' to their agent configuration files when
upgrading to this release.
For details on high security mode, see:
http://docs.newrelic.com/docs/accounts-partnerships/accounts/security/high-security
* Improved memcached instrumentation
More accurate instrumentation for the 'cas' command when using version 1.8.0
or later of the memcached gem. Previous versions of the agent would count all
time spent in the block given to 'cas' as memcache time, but 1.8.0 and later
allows us to more accurately measure just the time spent talking to memcache.
Many thanks to Francis Bogsanyi for contributing this change!
* Improved support for Rails apps launched from outside the app root directory
The Ruby agent attempts to resolve the location of its configuration file at
runtime relative to the directory that the host process is started from.
In cases where the host process was started from outside of the application's
root directory (for example, if the process is started from from '/'), it will
now also attempt to locate its configuration file based on the value of
Rails.root for Rails applications.
* Better compatibility with ActionController::Live
Browser Application Monitoring auto-injection can cause request failures under
certain circumstances when used with ActionController::Live, so the agent will
now automatically detect usage of ActionController::Live, and not attempt
auto-injection for those requests (even if auto-instrumentation is otherwise
enabled).
Many thanks to Rodrigo Rosenfeld Rosas for help diagnosing this issue!
* Fix for occasional spikes in external services time
Certain kinds of failures during HTTP requests made by an application could
have previously resulted in the Ruby agent reporting erroneously large amounts
of time spent in outgoing HTTP requests. This issue manifested most obviously
in spikes on the 'Web external' band on the main overview graph. This issue
has now been fixed.
* Fix 'rake newrelic:install' for Rails 4 applications
The newrelic:install rake task was previously not working for Rails 4
applications and has been fixed.
Thanks to Murahashi Sanemat Kenichi for contributing this fix!
## v3.9.0 ##
* Rack middleware instrumentation
The Ruby agent now automatically instruments Rack middlewares!
This means that the agent can now give you a more complete picture of your
application's response time, including time spent in middleware. It also means
that requests which previously weren't captured by the agent because they
never made it to the bottom of your middleware stack (usually a Rails or
Sinatra application) will now be captured.
After installing this version of the Ruby agent, you'll see a new 'Middleware'
band on your application's overview graph, and individual middlewares will
appear in transaction breakdown charts and transaction traces.
The agent can instrument middlewares that are added from a config.ru file via
Rack::Builder, or via Rails' middleware stack in Rails 3.0+.
This instrumentation may be disabled with the
disable_middlware_instrumentation configuration setting.
For more details, see the documentation for this feature:
- http://docs.newrelic.com/docs/ruby/rack-middlewares
- http://docs.newrelic.com/docs/ruby/middleware-upgrade-changes
* Capistrano 3.x support
Recording application deployments using Capistrano 3.x is now supported.
Many thanks to Jennifer Page for the contribution!
* Better support for Sidekiq's Delayed extensions
Sidekiq jobs executed via the Delayed extensions (e.g. the #delay method) will
now be named after the actual class that #delay was invoked against, and will
have their job arguments correctly captured if the sidekiq.capture_params
configuration setting is enabled.
Many thanks to printercu for the contribution!
* Improved Apdex calculation with ignored error classes
Previously, a transaction resulting in an exception that bubbled up to the top
level would always be counted as failing for the purposes of Apdex
calculations (unless the transaction name was ignored entirely). Now,
exceptions whose classes have been ignored by the
error_collector.ignore_errors configuration setting will not cause a
transaction to be automatically counted as failing.
* Allow URIs that are not parseable by stdlib's URI if addressable is present
There are some URIs that are valid by RFC 3986, but not parseable by Ruby's
stdlib URI class. The Ruby agent will now attempt to use the addressable gem
to parse URIs if it is present, allowing requests against these problematic
URIs to be instrumented.
Many thanks to Craig R Webster and Amir Yalon for their help with this issue!
* More robust error collection from Resque processes
Previously, traced errors where the exception class was defined in the Resque
worker but not in the Resque master process would not be correctly handled by
the agent. This has been fixed.
* Allow Sinatra apps to set the New Relic environment without setting RACK_ENV
The NEW_RELIC_ENV environment variable may now be used to specify the
environment the agent should use from its configuration file, independently of
RACK_ENV.
Many thanks to Mario Izquierdo for the contribution!
* Better error handling in Browser Application Monitoring injection
The agent middleware that injects the JavaScript code necessary for Browser
Application Monitoring now does a better job of catching errors that might
occur during the injection process.
* Allow disabling of Net::HTTP instrumentation
Most instrumentation in the Ruby agent can be disabled easily via a
configuration setting. Our Net::HTTP instrumentation was previously an
exception, but now it can also be disabled with the disable_net_http
configuration setting.
* Make Rails constant presence check more defensive
The Ruby agent now guards against the (rare) case where an application has a
Rails constant defined, but no Rails::VERSION constant (because Rails is not
actually present).
Many thanks to Vladimir Kiselev for the contribution!
## v3.8.1 ##
* Better handling for Rack applications implemented as middlewares
When using a Sinatra application as a middleware around another app (for
example, a Rails app), or manually instrumenting a Rack middleware wrapped
around another application, the agent would previously generate two separate
transaction names in the New Relic UI (one for the middleware, and one for
the inner application).
As of this release, the agent will instead unify these two parts into a single
transaction in the UI. The unified name will be the name assigned to the
inner-most traced transaction by default. Calls to
NewRelic::Agent.set_transaction_name will continue to override the default
names assigned by the agent's instrumentation code.
This change also makes it possible to run X-Ray sessions against transactions
of the 'inner' application in cases where one instrumented app is wrapped in
another that's implemented as a middleware.
* Support for mongo-1.10.0
The Ruby agent now instruments version 1.10.0 of the mongo gem (versions 1.8.x
and 1.9.x were already supported, and continue to be).
* Allow setting configuration file path via an option to manual_start
Previously, passing the :config_path option to NewRelic::Agent.manual_start
would not actually affect the location that the agent would use to look for
its configuration file. This has been fixed, and the log messages emitted when
a configuration file is not found should now be more helpful.
## v3.8.0 ##
* Better support for forking and daemonizing dispatchers (e.g. Puma, Unicorn)
The agent should now work out-of-the box with no special configuration on
servers that fork or daemonize themselves (such as Unicorn or Puma in some
configurations). The agent's background thread will be automatically restarted
after the first transaction processed within each child process.
This change means it's no longer necessary to set the
'restart_thread_in_children setting' in your agent configuration file if you
were doing so previously.
* Rails 4.1 support
Rails 4.1 has shipped, and the Ruby agent is ready for it! We've been running
our test suites against the release candidates with no significant issues, so
we're happy to announce full compatibility with this new release of Rails.