Skip to content

Releases: DataDog/dd-trace-rb

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.

0.37.0

24 Jun 20:39
f5733c8
Compare
Choose a tag to compare

Refactored

Removed

  • DEPRECATION: Deprecate Contrib::Configuration::Settings#tracer= (#1072, #1079)

    • The tracer: option is no longer supported for integration configuration. A deprecation warning will be issued when this option is used.

    • Tracer instances are dynamically created when ddtrace is reconfigured (through Datadog.configure{} calls).

      A reference to a tracer instance cannot be stored as it will be replaced by a new instance during reconfiguration.

      Retrieving the global tracer instance, by invoking Datadog.tracer, is the only safe mechanism to acquire the active tracer instance.

      Allowing an integration to set its tracer instance is effectively preventing that integration from dynamically retrieving the current active tracer in the future, thus causing it to record spans in a stale tracer instance. Spans recorded in a stale tracer instance will look disconnected from their parent context.

  • BREAKING: Remove Pin#tracer= and DeprecatedPin#tracer= (#1073)

    • The Pin and DeprecatedPin are internal tools used to provide more granular configuration for integrations.
    • The APIs being removed are not public nor have been externally documented. The DeprecatedPin specifically has been considered deprecated since 0.20.0.
    • This removal is a continuation of #1079 above, thus carrying the same rationale.

Migration

  • Remove tracer argument provided to integrations (e.g. c.use :rails, tracer: ...).
  • Remove tracer argument provided to Pin or DeprecatedPin initializers (e.g. Pin.new(service, tracer: ...)).
  • If you require a custom tracer instance, use a global instance configuration:
    Datadog.configure do |c|
      c.tracer.instance = custom_tracer
    end

Read the full changeset and the release milestone.

0.36.0

27 May 20:14
644a442
Compare
Choose a tag to compare

Changed

  • Prevent trace components from being re-initialized multiple times during setup (#1037)

Fixed

Refactored

Read the full changeset and the release milestone.

0.35.2

11 May 18:27
0550f2b
Compare
Choose a tag to compare

Fixed

Read the full changeset and the release milestone.

0.35.1

05 May 20:22
dbcd667
Compare
Choose a tag to compare

Fixed

Read the full changeset and the release milestone.

0.35.0

04 May 19:03
8209ab5
Compare
Choose a tag to compare

Added

Changed

  • Populate env, service, and version from tags (#1008)
  • Extract components from configuration (#996)
  • Extract logger to components (#997)
  • Extract runtime metrics worker from Writer (#1004)
  • Improvements to Faraday documentation (#1005)

Fixed

  • Runtime metrics not starting after #write (#1010)

Refactored

Read the full changeset and the release milestone.

0.34.2

09 Apr 19:22
eec005c
Compare
Choose a tag to compare

Changed

  • Revert Rails applications setting default env if none are configured. (#1000) (@errriclee)

Read the full changeset and the release milestone.

0.34.1

02 Apr 17:27
Compare
Choose a tag to compare

Changed

  • Rails applications set default service and env if none are configured. (#990)

Fixed

Read the full changeset and the release milestone.