Skip to content

Releases: DataDog/dd-trace-rb

1.23.0

09 May 15:03
cf264ae
Compare
Choose a tag to compare

Added

  • Profiling: Enable endpoint profiling for Sidekiq and similar background job processors (#3619)

Fixed

  • Fix no such file or directory issue when using single step instrumentation (#3623)
  • Fix error during telemetry debug logging attempt (#3618)

Read the full changeset and the release milestone.

2.0.0.beta2

18 Apr 09:37
28ca05d
Compare
Choose a tag to compare
2.0.0.beta2 Pre-release
Pre-release

Highlights

The gem has been renamed from ddtrace to datadog. Make sure to checkout https://github.com/DataDog/dd-trace-rb/blob/v2.0.0.beta2/docs/UpgradeGuide2.md for all upgrading details.

Added

  • Add Agent configuration option: timeout_seconds, uds_path, and use_ssl (#3350)
  • Tracing: Add lightweight log correlation generation (#3486)
  • Tracing: Add span links (#3546)
  • Tracing: Add span_remote field to TraceDigest (#3516)
  • Tracing: Add _dd.parent_id to tracestate (#3488)
  • Tracing: Allow RateSampler with zero sampling rate (#3295)
  • Grape: Add on_error settings (#3370)

Changed

  • Rename gem from ddtrace to datadog (#3490)
  • Require Ruby >= 2.5 (#3291)
  • Frozen string literals (#3392)
  • Startup logs emit when reconfigures (#3441)
  • Enhance validation for configuration (#3332, #3326)
  • Tracing: Propagation style configuration becomes case-insensitive (#3299)
  • Tracing: Return string for #trace_id and #span_id from Correlation::Identifier (#3322)
  • Elasticsearch: Replace instance configuration from client to transport instance (#3399)
  • Grape: Change error_statuses settings to error_status_codes (#3370)
  • GraphQL: Instrument with GraphQL::Tracing::DataDogTrace and more (#3409, #3417, #3388)
  • Rack: Change http proxy span pattern (#3369)
  • Sidekiq: Remove tag_args option and worker specific configuration (#3396, #3402)
  • Integrations: Rename error_handler settings to on_error (#3341)

Fixed

  • Tracing: Fix error_status_codes options (#3344)

Removed

  • Profiling: Remove bin/ddtracerb (#3506)
  • Ci-app: Remove datadog-ci gem dependency (#3288)
  • Tracing: Remove SpanOperation aliases (#3330)
  • Tracing: Remove b3 style from default propagation (#3293)
  • Tracing: Minimize sampling API (#3423)
  • Tracing: Remove client_ip disabled env (#3404)
  • Tracing: Remove use alias for instrument (#3403)
  • Tracing: OpenTracing, qless removed (#3398, #3443)
  • Net/Http: Remove Datadog::Tracing::Contrib::HTTP::Instrumentation.after_request (#3367)
  • Rails: Drop support for Rails 3 (#3324)
  • Rails: Remove exception_controller option (#3243)
  • Remove constants, methods and more (#3401, #3336, #3454, #3338, #3335, #3298, #3297, #3309, #3294, #3325, #3300)

Read the full changeset and the release milestone.

1.22.0

16 Apr 18:58
36e37fc
Compare
Choose a tag to compare

Added

  • Tracing: Add sampling rules by trace resouce and tags (#3587, #3585)
  • Appsec: Add WAF vendor header support (#3528)

Changed

  • Upgrade Telemetry to V2 (#3551)
  • Upgrade to libdatadog 7 (#3536)
  • Profiling: Enable Garbage Collection profiling by default (#3558)
  • Profiling: Skip heap samples with age 0 (#3573)
  • Profiling: Support falling back into extension directory when loading profiler (#3582)

Fixed

  • Appsec: Fix MIME-style newlines with strict base64 encoding (#3565)

Read the full changeset and the release milestone.

2.0.0.beta1

22 Mar 16:01
132a363
Compare
Choose a tag to compare
2.0.0.beta1 Pre-release
Pre-release

This gem has been renamed from ddtrace to datadog.

See https://github.com/DataDog/dd-trace-rb/blob/v2.0.0.beta1/docs/UpgradeGuide2.md for all upgrading details.

Read the full changeset and the release milestone.

1.21.1

20 Mar 19:19
210ed96
Compare
Choose a tag to compare

Added

  • Backports auto instrument shim with datadog/auto_instrument (#3535)

Fixed

  • Fix ActiveRecord resolving invalid string (#3523)
  • Revert http.route tagging to fix instrumentation failure for Rails 7.1 apps (#3539)
  • Fix wrong permissions on released gem files (#3531)

Read the full changeset and the release milestone.

1.21.0

14 Mar 16:03
9056b6c
Compare
Choose a tag to compare

Highlights

Beta support for Allocation Profiling

Allocation profiling is now in beta! You can use these to optimize your application to allocate and less memory.

You can enable this feature by using the DD_PROFILING_ALLOCATION_ENABLED=true environment variable.

Datadog.configure do |c|
  # ... existing configuration ...
  c.profiling.allocation_enabled = true
end

The settings above replace the configurations with "experimental" in their name that were introduced in past releases.

Profiler timeline feature is now on by default

The Profiler now gathers data for the new Timeline view by default.

The Timeline view allows you to look at time-based patterns and work distribution over the period of a single profile: you can look at what individual threads were doing, and when 🎉

You can use the timeline view both when looking at individual profiles, as well as when scoped to a given trace.

Changelog

Added

  • APM source code integration (#3463)
  • Core: Reduce startup logs verbosity (#3468)
  • Tracing: Add Concurrent::Async instrumentation (#3427)
  • Profiling: System info support (#3357)
  • Profiling: Add bin/ddprofrb (#3501)

Changed

  • Bump datadog-ci dependency to 0.8.1 (#3518)
  • Upgrade to libdatadog 6 (#3455)
  • Core: Allow suppressing error logs for Core::Remote::Negotiation (#3495)
  • Tracing: Add http.route tag to rack (#3345)
  • Tracing: Logs deprecation warning for use removal (#3438)
  • Profiling: Allocation sampling overhead improvements (#3434, #3440)
  • Profiling: Enable timeline by default (#3428)
  • Profiling: Rename Profiling files to reflect "datadog" instead of "ddtrace" (#3502)
  • Profiling: Replace profiling.advanced.experimental_allocation_enabled with profiling.allocation_enabled and remove experimental warning (#3520)

Fixed

  • Core: Fix rare remote configuration worker thread leak (#3519)
  • Tracing: Fix Datadog::Tracing.reject! with correct metrics (#3491)
  • Tracing: Guard PG result with nil check (#3511)
  • Profiling: Add workaround for Ruby VM bug causing crash in gc_finalize_deferred (#3473)
  • Profiling: Fix missing profiling code hotspots when using ddtrace+otel (#3466)
  • Profiling: Stop worker on clock failure (#3439)
  • Profiling: Upgrade libdatadog to fix incorrect platform detection for x86_64-linux-gnu/aarch64-linux-gnu (#3503)

Read the full changeset and the release milestone.

1.20.0

05 Feb 13:53
e631bda
Compare
Choose a tag to compare

Highlights

Dynamic sampling for Alpha Allocations and Heap Profiling

Allocation and heap profiling were introduced as experimental/alpha features in ddtrace 1.19.0 to help you optimize your application to allocate and use less memory, as well as to track down memory leaks.

In 1.20.0, we've introduced a new dynamic sampler that tunes sampling parameters to keep sampling overhead under control. Target overhead is governed by the overhead_target_percentage setting. This sampling mechanism replaces the one included in release 1.19.0 which relied on fixed sampling rates and thus required manual tuning to adapt to the specificities of your application.

As a reminder, you can enable these memory profiling features:

  • Using the environment variables DD_PROFILING_EXPERIMENTAL_ALLOCATION_ENABLED=true,
    DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED=true and DD_PROFILING_EXPERIMENTAL_HEAP_SIZE_ENABLED=true
  • Or via code by adding to your Datadog.configure block:
Datadog.configure do |c|
  # ... existing configuration ...
  c.profiling.advanced.experimental_allocation_enabled = true
  c.profiling.advanced.experimental_heap_enabled = true
  c.profiling.advanced.experimental_heap_size_enabled = true
end
Known issues and limitations:
  • This feature only works on Ruby 2.7 and above.
  • Ruby versions 3.2.0, 3.2.1 and 3.2.2 are not supported due to a Ruby VM bug. The bug has been fixed on Ruby 3.2.3, released on January 18.
  • This feature is currently incompatible with applications using Ractors due to a Ruby VM bug.
  • The three options above are not fully independent; experimental_heap_size_enabled requires experimental_heap_enabled,
    and in turn experimental_heap_enabled requires experimental_allocation_enabled.

We're very interested in feedback on how this feature works for you. Give it a try, let us know how it's working!

Test visibility

Test visibility in Ruby is feature complete and generally available now. This release includes:

  • Test sessions and suites are reported by default
  • Source code integration
  • CODEOWNERS support
  • Parametrized tests in Cucumber

See full release notes from datadog-ci-rb for more information.

Changelog

Added

  • Tracing: Add Trilogy instrumentation (#3274)
  • Rack: Add remote configuration boot tags (#3315)
  • Faraday: Add on_error option (#3431)
  • Profiling: Add dynamic allocation sampling (#3395)

Changed

  • Bump datadog-ci dependency to 0.7.0 (#3408)
  • Improve performance of gathering ClassCount metric (#3386)

Fixed

  • OpenTelemetry: Fix internal loading (#3400)
  • Core: Fix logger deadlock (#3426)
  • Rack: Fix missing active trace (#3420)
  • Redis: Fix instance configuration (#3278)

Read the full changeset and the release milestone.

1.19.0

10 Jan 21:14
ef61baf
Compare
Choose a tag to compare

Highlights

Alpha support for Memory Profiling (Allocations and Heap)

As of ddtrace 1.19.0, the Profiler supports three new profile types:

  • Allocations
  • Heap Live Objects
  • Heap Live Size

You can use these to optimize your application to allocate and use less memory, as well as to track down memory leaks.

We're still working on tuning the overhead impact and sampling frequency for these new profile types, and that's why this feature is marked as experimental.

You can enable these features:

  • Using the environment variables DD_PROFILING_EXPERIMENTAL_ALLOCATION_ENABLED=true,
    DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED=true and DD_PROFILING_EXPERIMENTAL_HEAP_SIZE_ENABLED=true
  • Or via code by adding to your Datadog.configure block:
Datadog.configure do |c|
  # ... existing configuration ...
  c.profiling.advanced.experimental_allocation_enabled = true
  c.profiling.advanced.experimental_heap_enabled = true
  c.profiling.advanced.experimental_heap_size_enabled = true
end

Known issues and limitations:

  • This feature only works on Ruby 2.7 and above.
  • Ruby versions 3.2.0, 3.2.1 and 3.2.2 are not supported due to a Ruby VM bug. The bug has been fixed upstream and the upcoming Ruby 3.2.3 will be supported.
  • This feature is currently incompatible with applications using Ractors due to a Ruby VM bug.
  • The three options above are not fully independent; experimental_heap_size_enabled requires experimental_heap_enabled,
    and in turn experimental_heap_enabled requires experimental_allocation_enabled.
  • We have added experimental tunables for lowering the overhead of these features. For more details, check the documentation for the experimental_allocation_sample_rate and experimental_heap_sample_rate settings.
  • The experimental_allocation_enabled feature replaces the allocation_counting_enabled setting, which is now deprecated.

We're very interested in feedback on how this feature works for you. Give it a try, let us know how it's working!

Performance improvements to Garbage Collection Profiling + Timeline view support

The off-by-default Garbage Collection profiling feature has been redesigned to lower its overhead, and to support showing time spent doing Garbage Collection in the Profiler Timeline view.

See #3313 for some nice screenshots of how it looks!

You can enable this feature using the DD_PROFILING_FORCE_ENABLE_GC=true environment variable, or using the
c.profiling.advanced.force_enable_gc_profiling = true setting via code.

Added

  • Tracing: Add on_error settings for mysql2 (#3316)
  • Core: Add install_signature to app-started telemetry event (#3349)
  • Profiling: Heap Profiling (#3281) (#3287) (#3328) (#3329) (#3333) (#3360)
  • Profiling: Redesign GC profiling to add timeline support and reduce overhead (#3313)
  • Core: Use Ruby 3.3 stable for CI testing (#3354)

Changed

  • Core: Bump datadog-ci dependency to 0.6.0 (#3361)
  • Core: Bump debase-ruby_core_source dependency to 3.3.1 (#3373)
  • Docs: Backport "List Ruby 3.3 as supported in the docs" to master branch (#3374)
  • Profiling: Import upstream rb_profile_frames fix (#3352)
  • Profiling: Allow the dynamic sampling rate overhead target to be set (#3310)
  • Profiling: Split profiling tests into ractor and non-ractor suites. (#3320)

Fixed

  • Docs: Fix pg doc markdown format (#3317)
  • Tracing: Fix recursive require in Railtie (#3365)
  • Profiling: Fix issues stemming from rb_gc_force_recycle (#3366)
  • Profiling: Fix Ruby 3.3 CI being broken in master due to profiler (#3356)
  • Profiling: Fix "no signals" workaround detection when mariadb is in use (#3362)

Read the full changeset and the release milestone.

1.18.0

07 Dec 11:09
22c0370
Compare
Choose a tag to compare

Added

  • Tracing: Support lib injection for ARM64 architecture (#3307)
  • Tracing: Add error_handler for pg instrumentation (#3303)
  • Appsec: Enable "Trusted IPs", a.k.a passlist with optional monitoring (#3229)

Changed

  • Mark ddtrace threads as fork-safe (#3279)
  • Bump datadog-ci dependency to 0.5.0 (#3308)
  • Bump debase-ruby_core_source dependency to 3.2.3 (#3284)
  • Profiling: Disable profiler on Ruby 3.3 when running with RUBY_MN_THREADS=1 (#3259)
  • Profiling: Run without "no signals" workaround on passenger 6.0.19+ (#3280)

Fixed

  • Tracing: Fix pg instrumentation enabled settings (#3271)
  • Profiling: Fix potential crash by importing upstream rb_profile_frames fix (#3289)
  • Appsec: Call devise RegistrationsController block (#3286)

Read the full changeset and the release milestone.

1.17.0

22 Nov 22:41
b4c9019
Compare
Choose a tag to compare

For W3C Trace Context, this release adds tracecontext to the default trace propagation extraction and injection styles. The new defaults are:

  • Extraction: Datadog,b3multi,b3,tracecontext
  • Injection: Datadog,tracecontext

And to increase interoperability with tracecontext, 128-bit Trace ID generation is now the default.

For OpenTelemetry, this release adds support for converting OpenTelemetry Trace Semantic Conventions into equivalent Datadog trace semantics. Also, it's now possible to configure top-level Datadog span fields using OpenTelemetry span attributes (#3262).

For CI Visibility, you can now manually create CI traces and spans with the newly released API.

Added

  • OpenTelemetry: Parse OpenTelemetry semantic conventions to Datadog's (#3273)
  • OpenTelemetry: Support span reserved attribute overrides (#3262)
  • Tracing: Ensure W3C tracestate is always propagated (#3255)

Changed

  • Tracing: Set 128-bit trace_id to true by default (#3266)
  • Tracing: Default trace propagation styles to Datadog,b3multi,b3,tracecontext (#3248,#3267)
  • Ci-App: Upgraded datadog-ci dependency to 0.4 (#3270)

Read the full changeset and the release milestone.