Releases: DataDog/dd-trace-rb
0.40.0
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 theArtifacts
tab of that CI step, undercoverage/index.html
.
- Every commit now has a
Changed
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 singlesinatra.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 thesinatra.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 ofsinatra.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.
- BREAKING for nested modular Sinatra applications only:
-
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
- Run CI tests in parallel (#1156)
- Migrate minitest tests to RSpec (#1127, #1128, #1133, #1149, #1152, #1153)
- Improvements to test suite (#1134, #1148, #1163)
- Improvements to documentation (#1138)
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 onmaster
branch or when manually triggered internally.
- Allows for PRs pass all status checks once again. Before this change, a
Read the full changeset and the release milestone.
0.39.0
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
- HTTP::StateError on error responses for http.rb (#1116, #1122) (@evan-waters)
- Startup log error when using the test adapter (#1125, #1131) (@benhutton)
- Warning message for Faraday < 1.0 (#1129) (@fledman, @tjwp)
- Propagate Rails error message to Rack span (#1124)
Refactored
Read the full changeset and the release milestone.
0.38.0
Added
- http.rb integration (#529, #853)
- Kafka integration (#1070) (@tjwp)
- Span#set_tags (#1081) (@DocX)
- retry_count tag for Sidekiq jobs (#1089) (@elyalvarado)
- Startup environment log (#1104, #1109)
- DD_SITE and DD_API_KEY configuration (#1107)
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
Refactored
- Documentation improvements regarding Datadog Agent defaults (#1074) (@cswatt)
- Improvements to test suite (#1043, #1051, #1062, #1075, #1076, #1086)
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 (throughDatadog.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
andDeprecatedPin
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.
- The
Migration
- Remove
tracer
argument provided to integrations (e.g.c.use :rails, tracer: ...
). - Remove
tracer
argument provided toPin
orDeprecatedPin
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
Changed
- Prevent trace components from being re-initialized multiple times during setup (#1037)
Fixed
- Allow Rails patching if Railties are loaded (#993, #1054) (@mustela, @bheemreddy181, @vramaiah)
- Pin delegates to default tracer unless configured (#1041)
Refactored
Read the full changeset and the release milestone.
0.35.2
Fixed
- Internal tracer HTTP requests generating traces (#1030, #1033) (@gingerlime)
Datadog.configure
forcing all options to eager load (#1032, #1034) (@kelvin-acosta)
Read the full changeset and the release milestone.
0.35.1
0.35.0
Added
- Chunk large trace payloads before flushing (#818, #840) (@SpyMachine)
- Support for Sinatra modular apps (#486, #913, #1015) (@jpaulgs, @tomasv, @ZimbiX)
- active_job support for Resque (#991) (@stefanahman, @psycholein)
- JRuby 9.2 to CI test matrix (#995)
TraceWriter
andAsyncTraceWriter
workers (#986)- Runtime metrics worker (#988)
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
Changed
- Revert Rails applications setting default
env
if none are configured. (#1000) (@errriclee)
Read the full changeset and the release milestone.