RUBY-1407 Revised Rack::URLMap instrumentation
This provides better naming by making sure that the top-level elements passed into a Rack::URLMap instance get tracing applied. When used directly it was common for those Rack apps to miss instrumentation, yielding poor naming for transactions within them.
…onfig RUBY-1417 Allow for failure in init_config
…on-force-restart RUBY-1424 Close connections on ForceRestartException
RUBY-1450 Allow passing symbol for env
RUBY-1453 Support audit logging to STDOUT
RUBY-1454 Modify connection lookup for makara
…-fix RUBY-1437 Fix for passing wrong scoped metric
RUBY-1456 Scoped metric bug for Sequel
CHANGELOG for third-party API and doc updates
Make test for SQL trace less flaky
Similar problem to what we had in ActiveRecord instrumentation, trace_execution_scoped was modifying the array that we were subsequently using. Because these API's are new, and we only really needed the scoped metric, I just changed them to take that single metric instead of the full list which avoids unnecessary allocation.
…ed-metrics RUBY-1456 Associate SQL traces with proper metric
Calls to trace_execution_scoped actually mutate the metrics array that is passed in. Our SQL sampler was relying on metrics.first, which was then mis-attributed to the second metric in the list, not the scoped metric.
Based on taskrabbit/makara#59, there were perf issues in looking up the connection from the pool when on ActiveRecord 4.x using the makara adapter. While this was a problem with makara itself, @mnelson suggested alternate lookup code which works with makara and actually allocates less, so we're updating to use that.
If a shared connection was being held when a ForceRestartException was received, this wouldn't close the connection. While not directly a problem since the connection is likely to die and be re-established next time around, it's best if we clean things up when we're restarting.
RUBY-1437 Datastore Performance Tuning
This reduces by 2 allocations per query which is worth the slightly more verbose code
Avoid using String#sub to generate product-specific rollup metrics.