Skip to content

Releases: DataDog/dd-trace-rb

0.47.0

29 Mar 23:00
dfddf9b
Compare
Choose a tag to compare

Added

Changed

  • BREAKING Separate Resolver configuration and resolution steps (#1319)

    ActiveRecord describes configuration now supports partial matching

    Partial matching of connection fields (adapter, username, host, port, database) is now allowed. Previously, only an exact match of connections fields would be considered matching. This should help greatly simplify database configuration matching, as you will only need to provide enough fields to correctly separate your distinct database connections.

    If you have a c.use active_record, describe: statement in your application that is currently not matching any connections, you might start seeing them match after this release.

    c.use active_record, describe: statements that are currently matching a connection will continue to match that same connection.

    You can refer to the expanded ActiveSupport documentation for details on how to use the new partial matchers and configuration code examples.

    Datadog::Contrib::Configuration::Resolver interface changed

    The interface for Datadog::Contrib::Configuration::Resolver has changed: custom configuration resolvers that inherit from Datadog::Contrib::Configuration::Resolver will need be changed to fulfill the new interface. See code documentation for Datadog::Contrib::Configuration::Resolver for specific API requirements.

  • Remove type check from ThreadLocalContext#local. (#1399) (@orekyuu)

Fixed

  • Support for JRuby 9.2.0.0 (#1409)
  • Failed integration message (#1394) (@e1senh0rn)
  • Addressed "warning: instance variable @components not initialized" (#1419)
  • Close /proc/self/cgroup file after reading (#1414)
  • Improve internal "only once" behavior across the tracer (#1398)
  • Increase thread-safety during tracer initialization (#1418)

Refactored

Read the full changeset and the release milestone.

0.46.0

03 Mar 21:32
42ebdb9
Compare
Choose a tag to compare

Added

  • Add EventBridge to supported AWS services (#1368) (@tomgi)
  • Add time_now_provider configuration option (#1224)
    • This new option allows the span start_time and end_time to be configured in environments that change the default time provider, like with Timecop. More information in the official documentation.
  • Add name to background threads created by ddtrace (#1366)

Changed

  • Rework RSpec instrumentation as separate traces for each test (#1381)

Fixed

  • ArgumentError: wrong number of arguments (given 2, expected 0) due to concurrent require (#1306, #1354) (@EvNomad)
  • Fix Rails' deprecation warnings (#1352)
  • Fully populate Rake span fields on exceptions (#1377)
  • Fix a typo in httpclient integration (#1365) (@y-yagi)
  • Add missing license files for vendor'd code (#1346)

Refactored

Removed

  • Remove deprecated Datadog::Monkey (#1341)
  • Remove deprecated Datadog::DeprecatedPin (#1342)
  • Remove unused Shim/MethodWrapper/MethodWrapping (#1347)
  • Remove APP_ANALYTICS from tests instrumentation (#1378) (@AdrianLC)

Read the full changeset and the release milestone.

0.45.0

27 Jan 17:06
fe6152e
Compare
Choose a tag to compare

This release includes a new way to automatically instrument all available gems in an application: require: 'ddtrace/auto_instrument' (#1260). There's no need to require 'ddtrace' or invoke Datadog.configure when using auto_instrument.

For Rails application, all that is needed is an additional require option in your Gemfile:

gem 'ddtrace', require: 'ddtrace/auto_instrument'

For any other application, invoke require 'ddtrace/auto_instrument' after all gems that you would like instrumented have been required.

All defaults and custom settings can still be configured in a Datadog.configure block as usual. Make sure to call Datadog.configure after require 'ddtrace/auto_instrument' when using both features together.

Let us know if you have any feedback on this new feature in our GitHub page.

There are no changes for applications not invoking require 'ddtrace/auto_instrument'.

Added

Changed

  • Promote request_queuing out of experimental (#1320)
  • Safeguards around distributed HTTP propagator (#1304)
  • Improvements to test integrations (#1291, #1303, #1307)

Refactored

Read the full changeset and the release milestone.

0.44.0

06 Jan 20:42
e796c93
Compare
Choose a tag to compare

Added

Changed

  • Reduce Runtime Metrics frequency to every 10 seconds (#1269)
    We reduced the frequency from every 1 second to every 10 seconds. This greatly reduces the overhead of using Runtime Metrics: 10% (26MiB) memory usage reduction in a sample Rails 6 application) while not having measurable impact on the quality of data collected. It also aligns dd-trace-rb with other language tracers.

Fixed

  • Disambiguate resource names for Grape endpoints with shared paths (#1279) (@pzaich)
  • Remove invalid Jenkins URL from CI integration (#1283)

Refactored

Read the full changeset and the release milestone.

0.43.0

18 Nov 19:28
73437cb
Compare
Choose a tag to compare

Added

  • Background job custom error handlers (#1212) (@norbertnytko)
  • Add "multi" methods instrumentation for Rails cache (#1217) (@michaelkl)
  • Support custom error status codes for Grape (#1238)
  • Cucumber integration (#1216)
  • RSpec integration (#1234)
  • Validation to :on_error argument on Datadog::Tracer#trace (#1220)

Changed

  • Update TokenBucket#effective_rate calculation (#1236)

Fixed

  • Avoid writer reinitialization during shutdown (#1235, #1248)
  • Fix configuration multiplexing (#1204, #1227)
  • Fix misnamed B3 distributed headers (#1226, #1229)
  • Correct span type for AWS SDK (#1233)
  • Correct span type for internal Pin on HTTP clients (#1239)
  • Reset trace context after fork (#1225)

Refactored

Read the full changeset and the release milestone.

0.42.0

21 Oct 14:25
4937c97
Compare
Choose a tag to compare

Added

Changed

Fixed

  • Improve Rails log_injection option to support more Lograge formats (#1210) (@Supy)

  • Fix Changelog (#1199) (@y-yagi)

Refactored

  • Refactor Trace buffer into multiple components (#1195)

Read the full changeset and the release milestone.

0.41.0

30 Sep 15:30
a4018b6
Compare
Choose a tag to compare

Added

Changed

  • Add peer.service tag to external services and skip tagging external services with language tag for runtime metrics (#934, #935, #1180)
    • This helps support the way runtime metrics are associated with spans in the UI.
  • Faster TraceBuffer for CRuby (#1172)
  • Reduce memory usage during gem statup (#1090)
  • Reduce memory usage of the HTTP transport (#1165)

Fixed

  • Improved prepared statement support for Sequel integrations (#1186)
  • Fix Sequel instrumentation when executing literal strings (#1185) (@matchbookmac)
  • Remove explicit Logger class verification (#1181) (@bartekbsh)
    • This allows users to pass in a custom logger that does not inherit from Logger class.
  • Correct tracer buffer metric counting (#1182)
  • Fix Span#pretty_print for empty duration (#1183)

Refactored

Read the full changeset and the release milestone.

0.40.0

08 Sep 21:37
18096f4
Compare
Choose a tag to compare

This releases includes BREAKING changes for nested modular Sinatra applications (see "Fixed" section).

And Ruby 1.9 support reaches its End-Of-Life (see "Removed" section).

Added

  • Rails log_injection option to auto enable log correlation (#1157)
  • Que integration (#1141, #1146) (@hs-bguven)
  • Components#startup! hook (#1151)
  • Code coverage report (#1159)
    • Every commit now has a coverage CI step that contains the code coverage report. This report can be found in the Artifacts tab of that CI step, under coverage/index.html.

Changed

  • Use a single top level span for Racecar consumers (#1150) (@dasch)

Fixed

  • Sinatra nested modular applications possibly leaking spans (#1035, #1145)

    • BREAKING for nested modular Sinatra applications only:
      class Nested < Sinatra::Base
      end
      
      class TopLevel < Sinatra::Base
        use Nested # Nesting happens here
      end
    • Non-breaking for classic applications nor modular non-nested applications.

    Fixes issues introduced with #1015 (in 0.35.0), when we first introduced Sinatra support for modular applications.

    The main issue we had to solve for modular support is how to handle nested applications, as only one application is actually responsible for handling the route. A naive implementation would cause the creation of nested sinatra.request spans, even for applications that did not handle the request. This is technically correct, as Sinatra is traversing that middleware, accruing overhead, but that does not aligned with our existing behavior of having a single sinatra.request span.

    While trying to achieve backwards-compatibility, we had to resort to a solution that turned out brittle: sinatra.request spans had to start in one middleware level and finished it in another. This allowed us to only capture the sinatra.request for the matching route, and skip the non-matching one. This caused unexpected issues on some user setups, specially around Sinatra middleware that created spans in between the initialization and closure of sinatra.request spans.

    This change now address these implementation issues by creating multiple sinatra.request, one for each traversed Sinatra application, even non-matching ones. This instrumentation is more correct, but at the cost of being a breaking change for nested modular applications.

    Please see #1145 for more information, and example screenshots on how traces for affected applications will look like.

  • Rack/Rails span error propagation with rescue_from (#1155, #1162)

  • Prevent logger recursion during startup (#1158)

  • Race condition on new worker classes (#1154)

    • These classes represent future work, and not being used at the moment.

Refactored

Removed

  • Ruby 1.9 support ended, as it transitions from Maintenance to End-Of-Life after one year (#1137)
  • GitLab status check when not applicable (#1160)
    • Allows for PRs pass all status checks once again. Before this change, a dd-gitlab/copy_to_s3 check would never leave the "Pending" status. This check tracks the deployment of a commit to an internal testing platform, which currently only happens on master branch or when manually triggered internally.

Read the full changeset and the release milestone.

0.39.0

05 Aug 17:37
3efa786
Compare
Choose a tag to compare

Added

Changed

  • Consistent environment variables across languages (#1115)
  • Default logger level from WARN to INFO (#1120) (@gingerlime)
    • This change also reduces the startup environment log message to INFO level (#1104)

Fixed

Refactored

  • Improved ActiveRecord documentation (#1119)
  • Improvements to test suite (#1105, #1118)

Read the full changeset and the release milestone.

0.38.0

21 Jul 20:32
9c73f56
Compare
Choose a tag to compare

Added

Changed

  • Auto instrument Faraday default connection (#1057)
  • Sidekiq client middleware is now the same for client and server (#1099) (@drcapulet)
  • Single pass SpanFilter (#1071) (@tjwp)

Fixed

  • Ensure fatal exceptions are propagated (#1100)
  • Respect child_of: option in Tracer#trace (#1082) (@DocX)
  • Improve Writer thread safety (#1091) (@fledman)

Refactored

Read the full changeset and the release milestone.