Skip to content

Releases: DataDog/dd-trace-rb

0.13.0.beta1

08 May 19:17
a50ff58
Compare
Choose a tag to compare
0.13.0.beta1 Pre-release
Pre-release

Read the full changeset.

Added

  • Sequel integration (supporting Ruby 2.0+) (#171) (@randy-girard, @twe4ked)
  • gRPC integration (supporting Ruby 2.2+) (#379, #403) (@Jared-Prime)
  • ActiveModelSerializers integration (#340) (@sullimander)
  • Excon integration (#211) (@walterking)
  • Rake integration (supporting Ruby 2.0+, Rake 12.0+) (#409)
  • Request queuing tracing to Rack (experimental) (#272)
  • ActiveSupport::Notifications::Event helper for event tracing (#400)
  • Request and response header tags to Rack (#389)

Refactored

  • Hash quantization into core library (#410)

0.12.0

08 May 16:52
3621e5c
Compare
Choose a tag to compare

Changes to quantization

Rack and Elasticsearch now have quantization enabled by default.

  • Rack's http.url quantizes query string values.
  • Elasticsearch's elasticsearch.body quantizes body values.

Quantization behavior can be configured: see the API documentation for Rack and Elasticsearch.

Breaking changes

  • If the rack integration was being configured with middleware_names, now it must also provide the application option, with a reference to the completed Rack application stack. This is necessary so middleware can be properly instrumented.

    If you are using rails and would like to activate middleware_names, you can provide the middleware_names option to rails without the application option (which therails integration will automatically provide to rack.) See the documentation for Rack and Rails for more details.

Changelog

Read the full changeset and the release milestone.

Added

  • GraphQL integration (supporting graphql 1.7.9+) (#295)
  • ActiveRecord object instantiation tracing (#311, #334)
  • Subscriber module for ActiveSupport::Notifications tracing (#324, #380, #390, #395) (@dasch)
  • HTTP quantization module (#384)
  • Partial flushing option to tracer (#247, #397)

Changed

  • Rack applies URL quantization by default (#371)
  • Elasticsearch applies body quantization by default (#362)
  • Context for a single trace now has hard limit of 100,000 spans (#247)
  • Tags with rails.db.x to active_record.db.x instead (#396)

Fixed

  • Loading the ddtrace library after Rails has fully initialized can result in load errors. (#357)
  • Some scenarios where middleware_names could result in bad resource names (#354)
  • ActionController instrumentation conflicting with some gems that monkey patch Rails (#391)

Deprecated

  • Use of :datadog_rack_request_span variable in favor of 'datadog.rack_request_span' in Rack. To be removed in 0.14.0 (#365, #392)

Refactored

  • Racecar to use ActiveSupport::Notifications Subscriber module (#381)
  • Rails to use ActiveRecord integration instead of its own implementation (#396)
  • ActiveRecord to use ActiveSupport::Notifications Subscriber module (#396)

0.12.0.rc1

11 Apr 21:07
1d49453
Compare
Choose a tag to compare
0.12.0.rc1 Pre-release
Pre-release

Overview

0.12.0 adds a variety of new features, and introduces a few changes to existing functionality.

Changes to quantization

Rack and Elasticsearch now have quantization enabled by default.

  • Rack's http.url quantizes query string values.
  • Elasticsearch's elasticsearch.body quantizes body values.

Quantization behavior can be configured: see the API documentation for Rack and Elasticsearch.

Breaking changes

  • If the rack integration was being configured with middleware_names, now it must also provide the application option, with a reference to the completed Rack application stack. This is necessary so middleware can be properly instrumented.

    If you are using rails and would like to activate middleware_names, you can provide the middleware_names option to rails without the application option (which therails integration will automatically provide to rack.) See the documentation for Rack and Rails for more details.

Changelog

Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.12.0.rc1

Git diff: v0.11.4...v0.12.0.rc1

Added

  • GraphQL integration (supporting graphql 1.7.9+) (#295)
  • ActiveRecord object instantiation tracing (#311, #334)
  • Subscriber module for ActiveSupport::Notifications tracing (#324, #380, #390, #395) (@dasch)
  • HTTP quantization module (#384)
  • Partial flushing option to tracer (#247, #397)

Changed

  • Rack applies URL quantization by default (#371)
  • Elasticsearch applies body quantization by default (#362)
  • Context for a single trace now has hard limit of 100,000 spans (#247)
  • Tags with rails.db.x to active_record.db.x instead (#396)

Fixed

  • Loading the ddtrace library after Rails has fully initialized can result in load errors. (#357)
  • Some scenarios where middleware_names could result in bad resource names (#354)
  • ActionController instrumentation conflicting with some gems that monkey patch Rails (#391)

Deprecated

  • Use of :datadog_rack_request_span variable in favor of 'datadog.rack_request_span' in Rack. To be removed in 0.14.0 (#365, #392)

Refactored

  • Racecar to use ActiveSupport::Notifications Subscriber module (#381)
  • Rails to use ActiveRecord integration instead of its own implementation (#396)
  • ActiveRecord to use ActiveSupport::Notifications Subscriber module (#396)

0.11.4

29 Mar 17:56
d4a2613
Compare
Choose a tag to compare

Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.11.4

Git diff: v0.11.3...v0.11.4

Fixed

  • Transport body parsing when downgrading (#369)
  • Transport incorrectly attempting to apply sampling to service metadata (#370)
  • sql.active_record traces showing incorrect adapter settings when non-default adapter used (#383)

Read the full changeset and the release milestone.

0.11.3

12 Mar 17:45
6663d82
Compare
Choose a tag to compare

Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.11.3

Git diff: v0.11.2...v0.11.3

Added

Fixed

  • Extra indentation in README.md (#349) (@ck3g)
  • http.url when Rails raises exceptions (#351, #353)
  • Rails from being patched twice (#352)
  • 4XX responses from middleware being marked as errors (#345)
  • Rails exception middleware sometimes not being inserted at correct position (#345)
  • Processing pipeline documentation typo (#355) (@MMartyn)
  • Loading the ddtrace library after Rails has fully initialized can result in load errors. (#357)
  • Use of block syntax with Rails render not working (#359, #360) (@dorner)

0.12.0.beta2

28 Feb 20:10
Compare
Choose a tag to compare
0.12.0.beta2 Pre-release
Pre-release

Bugfixes

  • Addresses an issue where loading the ddtrace library after Rails has fully initialized can result in load errors. (#357)

Read the full changeset.

0.12.0.beta1

09 Feb 16:05
fbf203a
Compare
Choose a tag to compare
0.12.0.beta1 Pre-release
Pre-release

New integrations

GraphQL tracing support (#295, docs)

screen shot 2018-02-09 at 10 48 23 am

GraphQL is now supported (version 1.7.9+ is required). To activate the integration, use the following configuration:

Datadog.configure do |c|
  c.use :graphql,
        service_name: 'graphql',
        schemas: [YourSchema]
end

ActiveRecord object instantiation tracing (#311, #334, docs)

GraphQL tracing

ActiveRecord queries can spend significant time instantiating Ruby objects from database queries. This feature adds spans to track object instantiation as a part of a trace. Supported in both Rails and standalone applications that implement ActiveRecord.

Improvements

  • Rack applications now tag their traces with the http.request_id tag, which contains X-Request-Id header value. Great for associating traces with requests in HTTP logs. (#330, #335)

Read the full changeset.

0.11.2

02 Feb 20:14
Compare
Choose a tag to compare

Critical update

In the previous 0.11.1 release the PR #322 removed the Monkey module that was used as a main API to activate libraries and frameworks integrations, and it was entirely replaced with the new API that changes the way how libraries are instrumented.

This release introduces the Monkey API again (#336) as a no-op interface, that prints a deprecation warning in your logs as:

Datadog::Monkey has been REMOVED as of version 0.11.1.
All calls to Datadog::Monkey are no-ops.
*Implementations using Monkey will no longer function*.
Upgrade to the new configuration API using the migration guide here:
https://github.com/DataDog/dd-trace-rb/releases/tag/v0.11.0

The no-op Monkey API will be available for the next releases to avoid issues with partially migrated configurations. This is one of the last breaking changes before moving towards a stable 1.0 release.

Read the full changeset.

0.11.1

29 Jan 17:25
adba5c1
Compare
Choose a tag to compare

New features

  • Addedhttp.base_url tag for Rack applications (#301, #327)
  • Added distributed_tracing option to Sinatra (#325)
  • Added exception_controller option to Rails (#320)

Improvements

  • Decoupled Sinatra and ActiveRecord integrations (#328, #330) (thanks @hawknewton!)
  • Racecar uses preferred ActiveSupport::Notifications strategy (#323 )
  • Removed old monkey patcher, in favor of newer configuration API (#322)

Bugfixes

  • Allow Rails controllers to change resource names (#321)
  • Custom Rails exception controllers no longer report as the resource (#320)

Read the full changeset.

0.11.0

17 Jan 22:02
f44c6b6
Compare
Choose a tag to compare

Thank you to our many contributors for reporting issues, and sharing improvements that have been integrated into release 0.11.0!

@whithajess, @NullVoxPopuli, @skisulli, @jjoos, @nerdrew, @drewbailey, @bentheax, @bramswenson

Breaking changes

  • Tracer configuration API has been changed. The new configuration API replaces the old configuration API (which is no longer available.) Applications using the old API will be required to migrate to the new one (docs)
  • New default names for Rails services. By default the Rails app name is used for the main service. If you use the tracer in multiple Rails applications, you'll have a different service for each one (#264)
  • Rack and Rails are now grouped under the same service name by default. You can split them using the new configuration API (#263)

Please check out our migration guide below for updating your application.

Migration from 0.10.x to 0.11.0

Updating to the new configuration API

Version 0.11.0 brings new changes to how you configure your Datadog tracing integration. In this new version, we've introduced the Datadog.configure function, to simplify configuration for all of your frameworks. This new functionality replaces the old configuration API, and as such, will require you to update your old configuration (that was compatible with versions < 0.11.0) to this new Datadog.configure API.

The following is an example of a Rails initializer, that enabled Rails, Redis, Grape and Net::HTTP integration:

Rails.configuration.datadog_trace = {
  # Tracer
  enabled: true,
  trace_agent_hostname: '127.0.0.1',

  # Rails
  auto_instrument: true,
  default_service: 'rails-app',
  default_controller_service: 'rails-controller',
  default_cache_service: 'rails-cache',
  default_database_service: 'mysql',

  # Redis
  auto_instrument_redis: true,

  # Grape
  auto_instrument_grape: true
}

# Net::HTTP
Datadog::Monkey.patch_module(:http)

# Custom configuration for Redis using the Pin
redis = Redis.new
pin = Datadog::Pin.get_from(redis)
pin.service = 'custom-redis'

To update the library, convert the configuration above with the new one:

Datadog.configure do |c|
  # Tracer
  c.tracer hostname: '127.0.0.1'

  # Rails
  c.use :rails,
        service_name: 'rails-app',
        controller_service: 'rails-controller',
        cache_service: 'rails-cache',
        database_service: 'mysql'

  # Redis
  c.use :redis, service_name: 'custom-redis'

  # Grape
  c.use :grape

  # Net::HTTP
  c.use :http
end

For more details regarding changes to configuration for specific integrations, check out our documentation.

Changing default Rails service names

The old defaults for Rails service names were:

  • Default service: rails-app
  • Controller service: rails-controller
  • Cache service: rails-cache

The new defaults for Rails service names are:

  • Default service: <app name>-app
  • Controller service: <app name>-controller
  • Cache service: <app name>-cache

To keep previous defaults, and continue collecting traces under those previous default service names, add the following to your Datadog configuration:

Datadog.configure do |c|
  c.use :rails, service_name: 'rails-app', controller_service: 'rails-controller', cache_service: 'rails-cache'
end
Merging/splitting Rails services

By default in 0.11.0, the Rails controller service will be merged with the default Rails service, rails-app.

If you wish to keep the Rails controller service separate from the parent application service, add the following to your Datadog configuration:

Datadog.configure do |c|
  # Rails controller will be under `rails-app` service
  c.use :rails, service_name: 'rails-app'

  # Rails controller will be under a different service
  c.use :rails, service_name: 'rails-app', controller_service: 'rails-controller'
end

New integrations

  • Support for Redis 4.0+ (#305)
  • Support for Racecar (#268)

Improvements

  • Change the Redis service name (#135 -- thanks @BaneOfSerenity, @nerdrew)
  • Added cached tag for ActiveRecord (#291)
  • Added rails.db.name tag for ActiveRecord (#270)
  • Added out.host and out.port tag for ActiveRecord (#288)
  • Improve rack resource names (#285)
  • Added script_name to Sinatra resource (#283 -- thanks @jamiehodge)
  • Support custom configuration per Faraday connection (#266)

Bugfixes

  • Set span types for integrations (#286)
  • Added safeguard for binary metadata in Dalli (#267)
  • Reduced memory consumption for long Rails cache keys (#284)
  • Drop invalid byte sequences for Redis (#289)
  • Fixed dropped traces for Rails views with nested partials (#302)
  • Fixed ActiveRecord::ConnectionNotEstablished message in logs for ActiveRecord applications that fork (#304)
  • Fixed UTF-8 encoding issue raising errors (#316)

Read the full changeset.