ddtrace 0.43.0 → 0.44.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +5 -5
  2. data/.circleci/config.yml +100 -129
  3. data/.circleci/images/primary/Dockerfile-3.0.0 +73 -0
  4. data/.github/workflows/add-milestone-to-pull-requests.yml +1 -1
  5. data/.simplecov +4 -1
  6. data/Appraisals +200 -8
  7. data/CHANGELOG.md +1005 -376
  8. data/Gemfile +4 -2
  9. data/Rakefile +121 -4
  10. data/ddtrace.gemspec +5 -8
  11. data/docker-compose.yml +30 -0
  12. data/docs/GettingStarted.md +47 -8
  13. data/lib/ddtrace.rb +1 -0
  14. data/lib/ddtrace/contrib/action_view/event.rb +0 -4
  15. data/lib/ddtrace/contrib/action_view/events/render_partial.rb +1 -0
  16. data/lib/ddtrace/contrib/action_view/events/render_template.rb +1 -0
  17. data/lib/ddtrace/contrib/active_record/utils.rb +11 -1
  18. data/lib/ddtrace/contrib/aws/services.rb +1 -0
  19. data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +2 -0
  20. data/lib/ddtrace/contrib/ethon/easy_patch.rb +1 -1
  21. data/lib/ddtrace/contrib/ethon/ext.rb +1 -0
  22. data/lib/ddtrace/contrib/grape/endpoint.rb +29 -11
  23. data/lib/ddtrace/contrib/grape/ext.rb +1 -0
  24. data/lib/ddtrace/contrib/httprb/instrumentation.rb +1 -1
  25. data/lib/ddtrace/contrib/qless/configuration/settings.rb +35 -0
  26. data/lib/ddtrace/contrib/qless/ext.rb +20 -0
  27. data/lib/ddtrace/contrib/qless/integration.rb +38 -0
  28. data/lib/ddtrace/contrib/qless/patcher.rb +35 -0
  29. data/lib/ddtrace/contrib/qless/qless_job.rb +72 -0
  30. data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +32 -0
  31. data/lib/ddtrace/contrib/redis/configuration/resolver.rb +3 -1
  32. data/lib/ddtrace/contrib/redis/configuration/settings.rb +5 -0
  33. data/lib/ddtrace/contrib/redis/ext.rb +1 -0
  34. data/lib/ddtrace/contrib/redis/patcher.rb +20 -3
  35. data/lib/ddtrace/contrib/redis/quantize.rb +27 -0
  36. data/lib/ddtrace/contrib/redis/tags.rb +5 -1
  37. data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +2 -2
  38. data/lib/ddtrace/ext/ci.rb +0 -1
  39. data/lib/ddtrace/version.rb +1 -1
  40. data/lib/ddtrace/workers/runtime_metrics.rb +7 -3
  41. metadata +77 -29
data/Gemfile CHANGED
@@ -2,6 +2,8 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- # Add debugger for pry that's compatible with 0.10.4
6
- gem 'pry-nav', git: 'https://github.com/nixme/pry-nav.git', branch: 'master'
5
+ if RUBY_VERSION >= '3.0.0'
6
+ gem 'webrick', '>= 1.7.0' # No longer bundled by default since Ruby 3.0
7
+ end
8
+
7
9
  # This file was generated by Appraisal
data/Rakefile CHANGED
@@ -101,6 +101,7 @@ namespace :spec do
101
101
  :mongodb,
102
102
  :mysql2,
103
103
  :presto,
104
+ :qless,
104
105
  :que,
105
106
  :racecar,
106
107
  :rack,
@@ -355,6 +356,7 @@ task :ci do
355
356
  declare 'bundle exec appraisal contrib rake spec:mongodb'
356
357
  declare 'bundle exec appraisal contrib rake spec:mysql2'
357
358
  declare 'bundle exec appraisal contrib rake spec:presto'
359
+ declare 'bundle exec appraisal contrib rake spec:qless'
358
360
  declare 'bundle exec appraisal contrib rake spec:que'
359
361
  declare 'bundle exec appraisal contrib rake spec:racecar'
360
362
  declare 'bundle exec appraisal contrib rake spec:rack'
@@ -582,6 +584,7 @@ task :ci do
582
584
  declare 'bundle exec appraisal contrib rake spec:mongodb'
583
585
  declare 'bundle exec appraisal contrib rake spec:mysql2' if RUBY_PLATFORM != 'java' # built-in jdbc is used instead
584
586
  declare 'bundle exec appraisal contrib rake spec:presto'
587
+ declare 'bundle exec appraisal contrib rake spec:qless'
585
588
  declare 'bundle exec appraisal contrib rake spec:que'
586
589
  declare 'bundle exec appraisal contrib rake spec:racecar'
587
590
  declare 'bundle exec appraisal contrib rake spec:rack'
@@ -617,9 +620,17 @@ task :ci do
617
620
  declare 'bundle exec appraisal rails5-mysql2 rake spec:action_cable'
618
621
  declare 'bundle exec appraisal rails5-mysql2 rake spec:rails'
619
622
  declare 'bundle exec appraisal rails5-postgres rake spec:rails'
620
- # declare 'bundle exec appraisal rails6-mysql2 rake spec:action_cable' # TODO: Hangs CI jobs... fix and re-enable.
623
+ declare 'bundle exec appraisal rails6-mysql2 rake spec:action_cable'
621
624
  declare 'bundle exec appraisal rails6-mysql2 rake spec:rails'
622
625
  declare 'bundle exec appraisal rails6-postgres rake spec:rails'
626
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:action_cable'
627
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:rails'
628
+ declare 'bundle exec appraisal rails61-mysql2 rake test:rails'
629
+ declare 'bundle exec appraisal rails61-postgres rake spec:rails'
630
+ declare 'bundle exec appraisal rails61-postgres rake spec:railsdisableenv'
631
+ declare 'bundle exec appraisal rails61-postgres rake test:rails'
632
+ declare 'bundle exec appraisal rails61-postgres-redis rake spec:railsredis'
633
+ declare 'bundle exec appraisal rails61-postgres-sidekiq rake spec:railsactivejob'
623
634
 
624
635
  # explicitly test resque-2x compatability
625
636
  declare 'bundle exec appraisal resque2-redis3 rake spec:resque'
@@ -664,6 +675,7 @@ task :ci do
664
675
  declare 'bundle exec appraisal contrib rake spec:mongodb'
665
676
  declare 'bundle exec appraisal contrib rake spec:mysql2'
666
677
  declare 'bundle exec appraisal contrib rake spec:presto'
678
+ declare 'bundle exec appraisal contrib rake spec:qless'
667
679
  declare 'bundle exec appraisal contrib rake spec:que'
668
680
  declare 'bundle exec appraisal contrib rake spec:racecar'
669
681
  declare 'bundle exec appraisal contrib rake spec:rack'
@@ -679,6 +691,7 @@ task :ci do
679
691
  declare 'bundle exec appraisal contrib rake spec:sneakers'
680
692
  declare 'bundle exec appraisal contrib rake spec:sucker_punch'
681
693
  declare 'bundle exec appraisal contrib rake spec:suite'
694
+
682
695
  # Contrib specs with old gem versions
683
696
  declare 'bundle exec appraisal contrib-old rake spec:faraday'
684
697
  # Rails minitests
@@ -699,9 +712,17 @@ task :ci do
699
712
  declare 'bundle exec appraisal rails5-mysql2 rake spec:action_cable'
700
713
  declare 'bundle exec appraisal rails5-mysql2 rake spec:rails'
701
714
  declare 'bundle exec appraisal rails5-postgres rake spec:rails'
702
- # declare 'bundle exec appraisal rails6-mysql2 rake spec:action_cable' # TODO: Hangs CI jobs... fix and re-enable.
715
+ declare 'bundle exec appraisal rails6-mysql2 rake spec:action_cable'
703
716
  declare 'bundle exec appraisal rails6-mysql2 rake spec:rails'
704
717
  declare 'bundle exec appraisal rails6-postgres rake spec:rails'
718
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:action_cable'
719
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:rails'
720
+ declare 'bundle exec appraisal rails61-mysql2 rake test:rails'
721
+ declare 'bundle exec appraisal rails61-postgres rake spec:rails'
722
+ declare 'bundle exec appraisal rails61-postgres rake spec:railsdisableenv'
723
+ declare 'bundle exec appraisal rails61-postgres rake test:rails'
724
+ declare 'bundle exec appraisal rails61-postgres-redis rake spec:railsredis'
725
+ declare 'bundle exec appraisal rails61-postgres-sidekiq rake spec:railsactivejob'
705
726
 
706
727
  # explicitly test resque-2x compatability
707
728
  declare 'bundle exec appraisal resque2-redis3 rake spec:resque'
@@ -712,7 +733,8 @@ task :ci do
712
733
  declare 'bundle exec appraisal cucumber4 rake spec:cucumber'
713
734
  declare 'bundle exec appraisal cucumber5 rake spec:cucumber'
714
735
  end
715
- elsif Gem::Version.new('2.7.0') <= Gem::Version.new(RUBY_VERSION)
736
+ elsif Gem::Version.new('2.7.0') <= Gem::Version.new(RUBY_VERSION) \
737
+ && Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3.0.0')
716
738
  # Main library
717
739
  declare 'bundle exec rake test:main'
718
740
  declare 'bundle exec rake spec:main'
@@ -746,6 +768,7 @@ task :ci do
746
768
  declare 'bundle exec appraisal contrib rake spec:mongodb'
747
769
  declare 'bundle exec appraisal contrib rake spec:mysql2'
748
770
  declare 'bundle exec appraisal contrib rake spec:presto'
771
+ declare 'bundle exec appraisal contrib rake spec:qless'
749
772
  declare 'bundle exec appraisal contrib rake spec:que'
750
773
  declare 'bundle exec appraisal contrib rake spec:racecar'
751
774
  declare 'bundle exec appraisal contrib rake spec:rack'
@@ -761,6 +784,7 @@ task :ci do
761
784
  declare 'bundle exec appraisal contrib rake spec:sneakers'
762
785
  declare 'bundle exec appraisal contrib rake spec:sucker_punch'
763
786
  declare 'bundle exec appraisal contrib rake spec:suite'
787
+
764
788
  # Contrib specs with old gem versions
765
789
  declare 'bundle exec appraisal contrib-old rake spec:faraday'
766
790
  # Rails minitests
@@ -780,8 +804,87 @@ task :ci do
780
804
  # Rails specs
781
805
  declare 'bundle exec appraisal rails5-mysql2 rake spec:rails'
782
806
  declare 'bundle exec appraisal rails5-postgres rake spec:rails'
807
+ declare 'bundle exec appraisal rails6-mysql2 rake spec:action_cable'
783
808
  declare 'bundle exec appraisal rails6-mysql2 rake spec:rails'
784
809
  declare 'bundle exec appraisal rails6-postgres rake spec:rails'
810
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:action_cable'
811
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:rails'
812
+ declare 'bundle exec appraisal rails61-mysql2 rake test:rails'
813
+ declare 'bundle exec appraisal rails61-postgres rake spec:rails'
814
+ declare 'bundle exec appraisal rails61-postgres rake spec:railsdisableenv'
815
+ declare 'bundle exec appraisal rails61-postgres rake test:rails'
816
+ declare 'bundle exec appraisal rails61-postgres-redis rake spec:railsredis'
817
+ declare 'bundle exec appraisal rails61-postgres-sidekiq rake spec:railsactivejob'
818
+
819
+ # explicitly test resque-2x compatability
820
+ declare 'bundle exec appraisal resque2-redis3 rake spec:resque'
821
+ declare 'bundle exec appraisal resque2-redis4 rake spec:resque'
822
+
823
+ # explicitly test cucumber compatibility
824
+ declare 'bundle exec appraisal cucumber3 rake spec:cucumber'
825
+ declare 'bundle exec appraisal cucumber4 rake spec:cucumber'
826
+ declare 'bundle exec appraisal cucumber5 rake spec:cucumber'
827
+ end
828
+ elsif Gem::Version.new('3.0.0') <= Gem::Version.new(RUBY_VERSION)
829
+ # Main library
830
+ declare 'bundle exec rake test:main'
831
+ declare 'bundle exec rake spec:main'
832
+ declare 'bundle exec rake spec:contrib'
833
+ declare 'bundle exec rake spec:opentracer'
834
+ declare 'bundle exec rake spec:opentelemetry'
835
+
836
+ if RUBY_PLATFORM != 'java'
837
+ # Contrib minitests
838
+ # Contrib specs
839
+ declare 'bundle exec appraisal contrib rake spec:action_pack'
840
+ declare 'bundle exec appraisal contrib rake spec:action_view'
841
+ declare 'bundle exec appraisal contrib rake spec:active_model_serializers'
842
+ declare 'bundle exec appraisal contrib rake spec:active_record'
843
+ declare 'bundle exec appraisal contrib rake spec:active_support'
844
+ declare 'bundle exec appraisal contrib rake spec:aws'
845
+ declare 'bundle exec appraisal contrib rake spec:concurrent_ruby'
846
+ declare 'bundle exec appraisal contrib rake spec:cucumber'
847
+ declare 'bundle exec appraisal contrib rake spec:dalli'
848
+ declare 'bundle exec appraisal contrib rake spec:delayed_job'
849
+ declare 'bundle exec appraisal contrib rake spec:elasticsearch'
850
+ declare 'bundle exec appraisal contrib rake spec:ethon'
851
+ declare 'bundle exec appraisal contrib rake spec:excon'
852
+ declare 'bundle exec appraisal contrib rake spec:faraday'
853
+ declare 'bundle exec appraisal contrib rake spec:grape'
854
+ declare 'bundle exec appraisal contrib rake spec:graphql'
855
+ # declare 'bundle exec appraisal contrib rake spec:grpc' # Pending https://github.com/protocolbuffers/protobuf/issues/7922
856
+ declare 'bundle exec appraisal contrib rake spec:http'
857
+ declare 'bundle exec appraisal contrib rake spec:httprb'
858
+ declare 'bundle exec appraisal contrib rake spec:kafka'
859
+ declare 'bundle exec appraisal contrib rake spec:mongodb'
860
+ declare 'bundle exec appraisal contrib rake spec:mysql2'
861
+ declare 'bundle exec appraisal contrib rake spec:presto'
862
+ declare 'bundle exec appraisal contrib rake spec:qless'
863
+ declare 'bundle exec appraisal contrib rake spec:que'
864
+ # declare 'bundle exec appraisal contrib rake spec:racecar' # Pending release of our fix: https://github.com/appsignal/rdkafka-ruby/pull/144
865
+ declare 'bundle exec appraisal contrib rake spec:rack'
866
+ declare 'bundle exec appraisal contrib rake spec:rake'
867
+ declare 'bundle exec appraisal contrib rake spec:redis'
868
+ declare 'bundle exec appraisal contrib rake spec:resque'
869
+ declare 'bundle exec appraisal contrib rake spec:rest_client'
870
+ declare 'bundle exec appraisal contrib rake spec:rspec'
871
+ declare 'bundle exec appraisal contrib rake spec:sequel'
872
+ declare 'bundle exec appraisal contrib rake spec:shoryuken'
873
+ declare 'bundle exec appraisal contrib rake spec:sidekiq'
874
+ declare 'bundle exec appraisal contrib rake spec:sinatra'
875
+ declare 'bundle exec appraisal contrib rake spec:sneakers'
876
+ declare 'bundle exec appraisal contrib rake spec:sucker_punch'
877
+ declare 'bundle exec appraisal contrib rake spec:suite'
878
+
879
+ # Rails
880
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:action_cable'
881
+ declare 'bundle exec appraisal rails61-mysql2 rake spec:rails'
882
+ declare 'bundle exec appraisal rails61-mysql2 rake test:rails'
883
+ declare 'bundle exec appraisal rails61-postgres rake spec:rails'
884
+ declare 'bundle exec appraisal rails61-postgres rake spec:railsdisableenv'
885
+ declare 'bundle exec appraisal rails61-postgres rake test:rails'
886
+ declare 'bundle exec appraisal rails61-postgres-redis rake spec:railsredis'
887
+ declare 'bundle exec appraisal rails61-postgres-sidekiq rake spec:railsactivejob'
785
888
 
786
889
  # explicitly test resque-2x compatability
787
890
  declare 'bundle exec appraisal resque2-redis3 rake spec:resque'
@@ -805,7 +908,13 @@ namespace :coverage do
805
908
 
806
909
  SimpleCov.collate resultset_files do
807
910
  coverage_dir "#{ENV.fetch('COVERAGE_DIR', 'coverage')}/report"
808
- formatter SimpleCov::Formatter::HTMLFormatter
911
+ if ENV['CI'] == 'true'
912
+ require 'codecov'
913
+ formatter SimpleCov::Formatter::MultiFormatter.new([SimpleCov::Formatter::HTMLFormatter,
914
+ SimpleCov::Formatter::Codecov])
915
+ else
916
+ formatter SimpleCov::Formatter::HTMLFormatter
917
+ end
809
918
  end
810
919
  end
811
920
 
@@ -824,4 +933,12 @@ namespace :coverage do
824
933
  end
825
934
  end
826
935
 
936
+ namespace :changelog do
937
+ task :format do
938
+ require 'pimpmychangelog'
939
+
940
+ PimpMyChangelog::CLI.run!
941
+ end
942
+ end
943
+
827
944
  task default: :test
@@ -50,15 +50,11 @@ Gem::Specification.new do |spec|
50
50
  spec.add_development_dependency 'minitest', '= 5.10.1'
51
51
  spec.add_development_dependency 'minitest-around', '0.5.0'
52
52
  spec.add_development_dependency 'minitest-stub_any_instance', '1.0.2'
53
+ spec.add_development_dependency 'pimpmychangelog', '>= 0.1.2'
53
54
  spec.add_development_dependency 'appraisal', '~> 2.2'
54
55
  spec.add_development_dependency 'yard', '~> 0.9'
55
- spec.add_development_dependency 'webmock', '~> 2.0'
56
+ spec.add_development_dependency 'webmock', '>= 3.10.0'
56
57
  spec.add_development_dependency 'builder'
57
- if RUBY_PLATFORM != 'java'
58
- spec.add_development_dependency 'sqlite3', '~> 1.3.6'
59
- else
60
- spec.add_development_dependency 'jdbc-sqlite3', '~> 3'
61
- end
62
58
  spec.add_development_dependency 'climate_control', '~> 0.2.0'
63
59
 
64
60
  # locking transitive dependency of webmock
@@ -67,8 +63,9 @@ Gem::Specification.new do |spec|
67
63
  spec.add_development_dependency 'benchmark-memory', '~> 0.1'
68
64
  spec.add_development_dependency 'memory_profiler', '~> 0.9'
69
65
  spec.add_development_dependency 'redcarpet', '~> 3.4' if RUBY_PLATFORM != 'java'
70
- spec.add_development_dependency 'pry', '~> 0.10.4'
71
- spec.add_development_dependency 'pry-stack_explorer', '~> 0.4.9.2'
66
+ spec.add_development_dependency 'pry', '~> 0.12.2'
67
+ spec.add_development_dependency 'pry-nav', '~> 0.3.0'
68
+ spec.add_development_dependency 'pry-stack_explorer', '~> 0.4.9' if RUBY_PLATFORM != 'java'
72
69
  spec.add_development_dependency 'simplecov', '~> 0.17'
73
70
  spec.add_development_dependency 'warning', '~> 1' if RUBY_VERSION >= '2.5.0'
74
71
  end
@@ -248,6 +248,34 @@ services:
248
248
  - .:/app
249
249
  - bundle-2.7:/usr/local/bundle
250
250
  - gemfiles-2.7:/app/gemfiles
251
+ tracer-3.0:
252
+ image: marcotc/docker-library:ddtrace_rb_3.0.0
253
+ command: /bin/bash
254
+ depends_on:
255
+ - ddagent
256
+ - elasticsearch
257
+ - memcached
258
+ - mongodb
259
+ - mysql
260
+ - postgres
261
+ - redis
262
+ env_file: ./.env
263
+ environment:
264
+ - BUNDLE_GEMFILE=/app/Gemfile
265
+ - DD_AGENT_HOST=ddagent
266
+ - TEST_DATADOG_INTEGRATION=1
267
+ - TEST_ELASTICSEARCH_HOST=elasticsearch
268
+ - TEST_MEMCACHED_HOST=memcached
269
+ - TEST_MONGODB_HOST=mongodb
270
+ - TEST_MYSQL_HOST=mysql
271
+ - TEST_POSTGRES_HOST=postgres
272
+ - TEST_REDIS_HOST=redis
273
+ stdin_open: true
274
+ tty: true
275
+ volumes:
276
+ - .:/app
277
+ - bundle-3.0:/usr/local/bundle
278
+ - gemfiles-3.0:/app/gemfiles
251
279
  # JRuby
252
280
  tracer-jruby-9.2:
253
281
  image: marcotc/docker-library:ddtrace_rb_jruby_9_2
@@ -358,6 +386,7 @@ volumes:
358
386
  bundle-2.5:
359
387
  bundle-2.6:
360
388
  bundle-2.7:
389
+ bundle-3.0:
361
390
  bundle-jruby-9.2:
362
391
  gemfiles-2.0:
363
392
  gemfiles-2.1:
@@ -367,4 +396,5 @@ volumes:
367
396
  gemfiles-2.5:
368
397
  gemfiles-2.6:
369
398
  gemfiles-2.7:
399
+ gemfiles-3.0:
370
400
  gemfiles-jruby-9.2:
@@ -49,6 +49,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
49
49
  - [MySQL2](#mysql2)
50
50
  - [Net/HTTP](#net-http)
51
51
  - [Presto](#presto)
52
+ - [Qless](#qless)
52
53
  - [Que](#que)
53
54
  - [Racecar](#racecar)
54
55
  - [Rack](#rack)
@@ -57,6 +58,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
57
58
  - [Redis](#redis)
58
59
  - [Rest Client](#rest-client)
59
60
  - [Resque](#resque)
61
+ - [RSpec](#rspec)
60
62
  - [Shoryuken](#shoryuken)
61
63
  - [Sequel](#sequel)
62
64
  - [Sidekiq](#sidekiq)
@@ -86,7 +88,8 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
86
88
 
87
89
  | Type | Documentation | Version | Support type | Gem version support |
88
90
  | ----- | -------------------------- | ----- | ------------------------------------ | ------------------- |
89
- | MRI | https://www.ruby-lang.org/ | 2.7 | Full | Latest |
91
+ | MRI | https://www.ruby-lang.org/ | 3.0 | Full | Latest |
92
+ | | | 2.7 | Full | Latest |
90
93
  | | | 2.6 | Full | Latest |
91
94
  | | | 2.5 | Full | Latest |
92
95
  | | | 2.4 | Full | Latest |
@@ -124,11 +127,20 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
124
127
 
125
128
  The following steps will help you quickly start tracing your Ruby application.
126
129
 
127
- ### Setup the Datadog Agent
130
+ ### Configure the Datadog Agent for APM
128
131
 
129
132
  Before downloading tracing on your application, install the Datadog Agent. The Ruby APM tracer sends trace data through the Datadog Agent.
130
133
 
131
- [Install and configure the Datadog Agent](https://docs.datadoghq.com/tracing/setup), see additional documentation for [tracing Docker applications](https://docs.datadoghq.com/tracing/setup/docker/).
134
+ Install and configure the Datadog Agent to receive traces from your now instrumented application. By default the Datadog Agent is enabled in your `datadog.yaml` file under `apm_enabled: true` and listens for trace traffic at `localhost:8126`. For containerized environments, follow the steps below to enable trace collection within the Datadog Agent.
135
+
136
+ #### Containers
137
+
138
+ 1. Set `apm_non_local_traffic: true` in your main [`datadog.yaml` configuration file](https://docs.datadoghq.com/agent/guide/agent-configuration-files/#agent-main-configuration-file).
139
+
140
+ 2. See the specific setup instructions for [Docker](https://docs.datadoghq.com/agent/docker/apm/?tab=ruby), [Kubernetes](https://docs.datadoghq.com/agent/kubernetes/apm/?tab=helm), [Amazon ECS](https://docs.datadoghq.com/agent/amazon_ecs/apm/?tab=ruby) or [Fargate](https://docs.datadoghq.com/integrations/ecs_fargate/#trace-collection) to ensure that the Agent is configured to receive traces in a containerized environment:
141
+
142
+ 3. After having instrumented your application, the tracing client sends traces to `localhost:8126` by default. If this is not the correct host and port change it by setting the env variables `DD_AGENT_HOST` and `DD_TRACE_AGENT_PORT`.
143
+
132
144
 
133
145
  ### Quickstart for Rails applications
134
146
 
@@ -227,7 +239,7 @@ And `options` is an optional `Hash` that accepts the following parameters:
227
239
  | `resource` | `String` | Name of the resource or action being operated on. Traces with the same resource value will be grouped together for the purpose of metrics (but still independently viewable.) Usually domain specific, such as a URL, query, request, etc. (e.g. `'Article#submit'`, `http://example.com/articles/list`.) | `name` of Span. |
228
240
  | `span_type` | `String` | The type of the span (such as `'http'`, `'db'`, etc.) | `nil` |
229
241
  | `child_of` | `Datadog::Span` / `Datadog::Context` | Parent for this span. If not provided, will automatically become current active span. | `nil` |
230
- | `start_time` | `Integer` | When the span actually starts. Useful when tracing events that have already happened. | `Time.now.utc` |
242
+ | `start_time` | `Time` | When the span actually starts. Useful when tracing events that have already happened. | `Time.now` |
231
243
  | `tags` | `Hash` | Extra tags which should be added to the span. | `{}` |
232
244
  | `on_error` | `Proc` | Handler invoked when a block is provided to trace, and it raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
233
245
 
@@ -355,6 +367,7 @@ For a list of available integrations, and their configuration options, please re
355
367
  | MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
356
368
  | Net/HTTP | `http` | *(Any supported Ruby)* | *(Any supported Ruby)* | *[Link](#nethttp)* | *[Link](https://ruby-doc.org/stdlib-2.4.0/libdoc/net/http/rdoc/Net/HTTP.html)* |
357
369
  | Presto | `presto` | `>= 0.5.14` | `>= 0.5.14` | *[Link](#presto)* | *[Link](https://github.com/treasure-data/presto-client-ruby)* |
370
+ | Qless | `qless` | `>= 0.10.0` | `>= 0.10.0` | *[Link](#qless)* | *[Link](https://github.com/seomoz/qless)* |
358
371
  | Que | `que` | `>= 1.0.0.beta2` | `>= 1.0.0.beta2` | *[Link](#que)* | *[Link](https://github.com/que-rb/que)* |
359
372
  | Racecar | `racecar` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#racecar)* | *[Link](https://github.com/zendesk/racecar)* |
360
373
  | Rack | `rack` | `>= 1.1` | `>= 1.1` | *[Link](#rack)* | *[Link](https://github.com/rack/rack)* |
@@ -363,6 +376,7 @@ For a list of available integrations, and their configuration options, please re
363
376
  | Redis | `redis` | `>= 3.2` | `>= 3.2` | *[Link](#redis)* | *[Link](https://github.com/redis/redis-rb)* |
364
377
  | Resque | `resque` | `>= 1.0` | `>= 1.0` | *[Link](#resque)* | *[Link](https://github.com/resque/resque)* |
365
378
  | Rest Client | `rest-client` | `>= 1.8` | `>= 1.8` | *[Link](#rest-client)* | *[Link](https://github.com/rest-client/rest-client)* |
379
+ | RSpec | `rspec`. | `>= 3.0.0` | `>= 3.0.0` | *[Link](#rspec)*. | *[Link](https://github.com/rspec/rspec)* |
366
380
  | Sequel | `sequel` | `>= 3.41` | `>= 3.41` | *[Link](#sequel)* | *[Link](https://github.com/jeremyevans/sequel)* |
367
381
  | Shoryuken | `shoryuken` | `>= 3.2` | `>= 3.2` | *[Link](#shoryuken)* | *[Link](https://github.com/phstc/shoryuken)* |
368
382
  | Sidekiq | `sidekiq` | `>= 3.5.4` | `>= 3.5.4` | *[Link](#sidekiq)* | *[Link](https://github.com/mperham/sidekiq)* |
@@ -1153,6 +1167,29 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1153
1167
  | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1154
1168
  | `service_name` | Service name used for `presto` instrumentation | `'presto'` |
1155
1169
 
1170
+ ### Qless
1171
+
1172
+ The Qless integration uses lifecycle hooks to trace job executions.
1173
+
1174
+ To add tracing to a Qless job:
1175
+
1176
+ ```ruby
1177
+ require 'ddtrace'
1178
+
1179
+ Datadog.configure do |c|
1180
+ c.use :qless, options
1181
+ end
1182
+ ```
1183
+
1184
+ Where `options` is an optional `Hash` that accepts the following parameters:
1185
+
1186
+ | Key | Description | Default |
1187
+ | --- | ----------- | ------- |
1188
+ | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
1189
+ | `service_name` | Service name used for `qless` instrumentation | `'qless'` |
1190
+ | `tag_job_data` | Enable tagging with job arguments. true for on, false for off. | `false` |
1191
+ | `tag_job_tags` | Enable tagging with job tags. true for on, false for off. | `false` |
1192
+
1156
1193
  ### Que
1157
1194
 
1158
1195
  The Que integration is a middleware which will trace job executions.
@@ -1230,7 +1267,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1230
1267
  | `application` | Your Rack application. Required for `middleware_names`. | `nil` |
1231
1268
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) so that this service trace is connected with a trace of another service if tracing headers are received | `true` |
1232
1269
  | `headers` | Hash of HTTP request or response headers to add as tags to the `rack.request`. Accepts `request` and `response` keys with Array values e.g. `['Last-Modified']`. Adds `http.request.headers.*` and `http.response.headers.*` tags respectively. | `{ response: ['Content-Type', 'X-Request-ID'] }` |
1233
- | `middleware_names` | Enable this if you want to use the middleware classes as the resource names for `rack` spans. Requires `application` option to use. | `false` |
1270
+ | `middleware_names` | Enable this if you want to use the last executed middleware class as the resource name for the `rack` span. If enabled alongside the `rails` instrumention, `rails` takes precedence by setting the `rack` resource name to the active `rails` controller when applicable. Requires `application` option to use. | `false` |
1234
1271
  | `quantize` | Hash containing options for quantization. May include `:query` or `:fragment`. | `{}` |
1235
1272
  | `quantize.query` | Hash containing options for query portion of URL quantization. May include `:show` or `:exclude`. See options below. Option must be nested inside the `quantize` option. | `{}` |
1236
1273
  | `quantize.query.show` | Defines which values should always be shown. Shows no values by default. May be an Array of strings, or `:all` to show all values. Option must be nested inside the `query` option. | `nil` |
@@ -1309,8 +1346,9 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1309
1346
  | 2.1 | | 3.0 - 4.2 |
1310
1347
  | 2.2 - 2.3 | | 3.0 - 5.2 |
1311
1348
  | 2.4 | | 4.2.8 - 5.2 |
1312
- | 2.5 | | 4.2.8 - 6.0 |
1313
- | 2.6 - 2.7 | 9.2 | 5.0 - 6.0 |
1349
+ | 2.5 | | 4.2.8 - 6.1 |
1350
+ | 2.6 - 2.7 | 9.2 | 5.0 - 6.1 |
1351
+ | 3.0 | | 6.1 |
1314
1352
 
1315
1353
  ### Rake
1316
1354
 
@@ -1400,6 +1438,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1400
1438
  | --- | ----------- | ------- |
1401
1439
  | `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
1402
1440
  | `service_name` | Service name used for `redis` instrumentation | `'redis'` |
1441
+ | `command_args` | Show the command arguments (e.g. `key` in `GET key`) as resource name and tag | true |
1403
1442
 
1404
1443
  You can also set *per-instance* configuration as it follows:
1405
1444
 
@@ -1500,7 +1539,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
1500
1539
  | `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
1501
1540
  | `service_name` | Service name for `rest_client` instrumentation. | `'rest_client'` |
1502
1541
 
1503
- ## RSpec
1542
+ ### RSpec
1504
1543
 
1505
1544
  RSpec integration will trace all executions of example groups and examples when using `rspec` test framework.
1506
1545
 
@@ -63,6 +63,7 @@ require 'ddtrace/contrib/presto/integration'
63
63
  require 'ddtrace/contrib/que/integration'
64
64
  require 'ddtrace/contrib/mysql2/integration'
65
65
  require 'ddtrace/contrib/mongodb/integration'
66
+ require 'ddtrace/contrib/qless/integration'
66
67
  require 'ddtrace/contrib/racecar/integration'
67
68
  require 'ddtrace/contrib/rack/integration'
68
69
  require 'ddtrace/contrib/rails/integration'