ddtrace 0.35.1 → 0.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +3 -1
- data/.gitignore +2 -0
- data/.gitlab-ci.yml +26 -0
- data/.rubocop.yml +4 -0
- data/Appraisals +52 -11
- data/CHANGELOG.md +135 -1
- data/Rakefile +109 -75
- data/ddtrace.gemspec +5 -0
- data/docker-compose.yml +37 -2
- data/docs/GettingStarted.md +146 -82
- data/lib/ddtrace.rb +3 -0
- data/lib/ddtrace/configuration/base.rb +1 -1
- data/lib/ddtrace/configuration/options.rb +1 -1
- data/lib/ddtrace/configuration/pin_setup.rb +3 -2
- data/lib/ddtrace/configuration/settings.rb +27 -3
- data/lib/ddtrace/contrib/action_cable/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/action_cable/ext.rb +5 -2
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +7 -0
- data/lib/ddtrace/contrib/action_pack/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/action_pack/ext.rb +5 -2
- data/lib/ddtrace/contrib/action_view/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/action_view/ext.rb +5 -2
- data/lib/ddtrace/contrib/active_model_serializers/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/active_model_serializers/ext.rb +5 -2
- data/lib/ddtrace/contrib/active_record/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/active_record/ext.rb +5 -2
- data/lib/ddtrace/contrib/active_support/cache/redis.rb +1 -1
- data/lib/ddtrace/contrib/active_support/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/active_support/ext.rb +5 -2
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +3 -1
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +1 -1
- data/lib/ddtrace/contrib/aws/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/aws/ext.rb +5 -2
- data/lib/ddtrace/contrib/concurrent_ruby/configuration/settings.rb +5 -0
- data/lib/ddtrace/contrib/concurrent_ruby/context_composite_executor_service.rb +9 -3
- data/lib/ddtrace/contrib/concurrent_ruby/ext.rb +1 -0
- data/lib/ddtrace/contrib/configuration/settings.rb +20 -1
- data/lib/ddtrace/contrib/dalli/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/dalli/ext.rb +5 -2
- data/lib/ddtrace/contrib/dalli/patcher.rb +1 -5
- data/lib/ddtrace/contrib/delayed_job/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/delayed_job/ext.rb +5 -2
- data/lib/ddtrace/contrib/elasticsearch/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/elasticsearch/ext.rb +5 -2
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -2
- data/lib/ddtrace/contrib/ethon/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/ethon/ext.rb +5 -2
- data/lib/ddtrace/contrib/excon/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/excon/ext.rb +5 -2
- data/lib/ddtrace/contrib/extensions.rb +39 -5
- data/lib/ddtrace/contrib/faraday/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/faraday/ext.rb +5 -2
- data/lib/ddtrace/contrib/faraday/middleware.rb +5 -3
- data/lib/ddtrace/contrib/faraday/patcher.rb +13 -5
- data/lib/ddtrace/contrib/grape/configuration/settings.rb +7 -3
- data/lib/ddtrace/contrib/grape/ext.rb +5 -2
- data/lib/ddtrace/contrib/grape/patcher.rb +1 -1
- data/lib/ddtrace/contrib/graphql/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/graphql/ext.rb +5 -2
- data/lib/ddtrace/contrib/graphql/patcher.rb +6 -3
- data/lib/ddtrace/contrib/grpc/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +1 -1
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/client.rb +1 -3
- data/lib/ddtrace/contrib/grpc/ext.rb +5 -2
- data/lib/ddtrace/contrib/grpc/patcher.rb +1 -5
- data/lib/ddtrace/contrib/http/circuit_breaker.rb +8 -32
- data/lib/ddtrace/contrib/http/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/http/ext.rb +5 -2
- data/lib/ddtrace/contrib/http/instrumentation.rb +13 -8
- data/lib/ddtrace/contrib/httprb/configuration/settings.rb +32 -0
- data/lib/ddtrace/contrib/httprb/ext.rb +17 -0
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +160 -0
- data/lib/ddtrace/contrib/httprb/integration.rb +43 -0
- data/lib/ddtrace/contrib/httprb/patcher.rb +35 -0
- data/lib/ddtrace/contrib/kafka/configuration/settings.rb +30 -0
- data/lib/ddtrace/contrib/kafka/consumer_event.rb +14 -0
- data/lib/ddtrace/contrib/kafka/consumer_group_event.rb +14 -0
- data/lib/ddtrace/contrib/kafka/event.rb +51 -0
- data/lib/ddtrace/contrib/kafka/events.rb +44 -0
- data/lib/ddtrace/contrib/kafka/events/connection/request.rb +34 -0
- data/lib/ddtrace/contrib/kafka/events/consumer/process_batch.rb +41 -0
- data/lib/ddtrace/contrib/kafka/events/consumer/process_message.rb +39 -0
- data/lib/ddtrace/contrib/kafka/events/consumer_group/heartbeat.rb +39 -0
- data/lib/ddtrace/contrib/kafka/events/consumer_group/join_group.rb +29 -0
- data/lib/ddtrace/contrib/kafka/events/consumer_group/leave_group.rb +29 -0
- data/lib/ddtrace/contrib/kafka/events/consumer_group/sync_group.rb +29 -0
- data/lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb +32 -0
- data/lib/ddtrace/contrib/kafka/events/producer/deliver_messages.rb +35 -0
- data/lib/ddtrace/contrib/kafka/ext.rb +41 -0
- data/lib/ddtrace/contrib/kafka/integration.rb +39 -0
- data/lib/ddtrace/contrib/kafka/patcher.rb +26 -0
- data/lib/ddtrace/contrib/mongodb/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/mongodb/ext.rb +5 -2
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +1 -2
- data/lib/ddtrace/contrib/mysql2/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/mysql2/ext.rb +5 -2
- data/lib/ddtrace/contrib/mysql2/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/patcher.rb +14 -8
- data/lib/ddtrace/contrib/presto/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/presto/ext.rb +5 -2
- data/lib/ddtrace/contrib/racecar/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/racecar/ext.rb +5 -2
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/rack/ext.rb +5 -2
- data/lib/ddtrace/contrib/rack/middlewares.rb +15 -12
- data/lib/ddtrace/contrib/rails/configuration/settings.rb +20 -13
- data/lib/ddtrace/contrib/rails/ext.rb +5 -2
- data/lib/ddtrace/contrib/rails/framework.rb +52 -46
- data/lib/ddtrace/contrib/rails/integration.rb +1 -1
- data/lib/ddtrace/contrib/rake/configuration/settings.rb +7 -3
- data/lib/ddtrace/contrib/rake/ext.rb +5 -2
- data/lib/ddtrace/contrib/redis/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/redis/ext.rb +5 -2
- data/lib/ddtrace/contrib/redis/patcher.rb +1 -1
- data/lib/ddtrace/contrib/resque/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/resque/ext.rb +5 -2
- data/lib/ddtrace/contrib/rest_client/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/rest_client/ext.rb +5 -2
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +2 -2
- data/lib/ddtrace/contrib/sequel/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sequel/database.rb +1 -1
- data/lib/ddtrace/contrib/sequel/ext.rb +5 -2
- data/lib/ddtrace/contrib/sequel/utils.rb +19 -1
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/shoryuken/ext.rb +5 -2
- data/lib/ddtrace/contrib/sidekiq/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sidekiq/ext.rb +6 -2
- data/lib/ddtrace/contrib/sidekiq/patcher.rb +8 -1
- data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +1 -0
- data/lib/ddtrace/contrib/sinatra/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sinatra/ext.rb +5 -2
- data/lib/ddtrace/contrib/sneakers/configuration/settings.rb +32 -0
- data/lib/ddtrace/contrib/sneakers/ext.rb +22 -0
- data/lib/ddtrace/contrib/sneakers/integration.rb +41 -0
- data/lib/ddtrace/contrib/sneakers/patcher.rb +24 -0
- data/lib/ddtrace/contrib/sneakers/tracer.rb +58 -0
- data/lib/ddtrace/contrib/sucker_punch/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sucker_punch/ext.rb +5 -2
- data/lib/ddtrace/contrib/sucker_punch/patcher.rb +1 -1
- data/lib/ddtrace/diagnostics/environment_logger.rb +278 -0
- data/lib/ddtrace/environment.rb +17 -3
- data/lib/ddtrace/ext/diagnostics.rb +3 -0
- data/lib/ddtrace/ext/environment.rb +2 -0
- data/lib/ddtrace/ext/transport.rb +1 -0
- data/lib/ddtrace/logger.rb +1 -1
- data/lib/ddtrace/pin.rb +39 -15
- data/lib/ddtrace/pipeline/span_filter.rb +15 -15
- data/lib/ddtrace/runtime/metrics.rb +18 -4
- data/lib/ddtrace/sampler.rb +2 -0
- data/lib/ddtrace/span.rb +10 -0
- data/lib/ddtrace/tracer.rb +15 -8
- data/lib/ddtrace/transport/http.rb +15 -0
- data/lib/ddtrace/transport/http/adapters/net.rb +8 -0
- data/lib/ddtrace/transport/http/adapters/test.rb +6 -0
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +4 -0
- data/lib/ddtrace/transport/response.rb +11 -0
- data/lib/ddtrace/version.rb +2 -2
- data/lib/ddtrace/workers/trace_writer.rb +3 -0
- data/lib/ddtrace/writer.rb +33 -12
- metadata +114 -29
data/docs/GettingStarted.md
CHANGED
@@ -43,6 +43,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
43
43
|
- [Grape](#grape)
|
44
44
|
- [GraphQL](#graphql)
|
45
45
|
- [gRPC](#grpc)
|
46
|
+
- [http.rb](#http.rb)
|
46
47
|
- [MongoDB](#mongodb)
|
47
48
|
- [MySQL2](#mysql2)
|
48
49
|
- [Net/HTTP](#net-http)
|
@@ -58,6 +59,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
58
59
|
- [Sequel](#sequel)
|
59
60
|
- [Sidekiq](#sidekiq)
|
60
61
|
- [Sinatra](#sinatra)
|
62
|
+
- [Sneakers](#sneakers)
|
61
63
|
- [Sucker Punch](#sucker-punch)
|
62
64
|
- [Advanced configuration](#advanced-configuration)
|
63
65
|
- [Tracer settings](#tracer-settings)
|
@@ -92,7 +94,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
92
94
|
| | | 2.0 | Full | Latest |
|
93
95
|
| | | 1.9.3 | Maintenance (until August 6th, 2020) | < 0.27.0 |
|
94
96
|
| | | 1.9.1 | Maintenance (until August 6th, 2020) | < 0.27.0 |
|
95
|
-
| JRuby |
|
97
|
+
| JRuby | https://www.jruby.org | 9.2 | Full | Latest |
|
96
98
|
|
97
99
|
**Supported web servers**:
|
98
100
|
|
@@ -325,41 +327,44 @@ end
|
|
325
327
|
|
326
328
|
For a list of available integrations, and their configuration options, please refer to the following:
|
327
329
|
|
328
|
-
| Name | Key | Versions Supported
|
329
|
-
| ------------------------ | -------------------------- | ------------------------ | ----------------------------------- | ------------------------------------------------------------------------------ |
|
330
|
-
| Action Cable | `action_cable` | `>= 5.0` | *[Link](#action-cable)* | *[Link](https://github.com/rails/rails/tree/master/actioncable)* |
|
331
|
-
| Action View | `action_view` | `>= 3.0` | *[Link](#action-view)* | *[Link](https://github.com/rails/rails/tree/master/actionview)* |
|
332
|
-
| Active Model Serializers | `active_model_serializers` | `>= 0.9` | *[Link](#active-model-serializers)* | *[Link](https://github.com/rails-api/active_model_serializers)* |
|
333
|
-
| Action Pack | `action_pack` | `>= 3.0` | *[Link](#action-pack)* | *[Link](https://github.com/rails/rails/tree/master/actionpack)* |
|
334
|
-
| Active Record | `active_record` | `>= 3.0` | *[Link](#active-record)* | *[Link](https://github.com/rails/rails/tree/master/activerecord)* |
|
335
|
-
| Active Support | `active_support` | `>= 3.0` | *[Link](#active-support)* | *[Link](https://github.com/rails/rails/tree/master/activesupport)* |
|
336
|
-
| AWS | `aws` | `>= 2.0` | *[Link](#aws)* | *[Link](https://github.com/aws/aws-sdk-ruby)* |
|
337
|
-
| Concurrent Ruby | `concurrent_ruby` | `>= 0.9` | *[Link](#concurrent-ruby)* | *[Link](https://github.com/ruby-concurrency/concurrent-ruby)* |
|
338
|
-
| Dalli | `dalli` | `>= 2.0` | *[Link](#dalli)* | *[Link](https://github.com/petergoldstein/dalli)* |
|
339
|
-
| DelayedJob | `delayed_job` | `>= 4.1` | *[Link](#delayedjob)* | *[Link](https://github.com/collectiveidea/delayed_job)* |
|
340
|
-
| Elasticsearch | `elasticsearch` | `>= 1.0` | *[Link](#elasticsearch)* | *[Link](https://github.com/elastic/elasticsearch-ruby)* |
|
341
|
-
| Ethon | `ethon` | `>= 0.11` | *[Link](#ethon)* | *[Link](https://github.com/typhoeus/ethon)* |
|
342
|
-
| Excon | `excon` | `>= 0.50` | *[Link](#excon)* | *[Link](https://github.com/excon/excon)* |
|
343
|
-
| Faraday | `faraday` | `>= 0.14` | *[Link](#faraday)* | *[Link](https://github.com/lostisland/faraday)* |
|
344
|
-
| Grape | `grape` | `>= 1.0` | *[Link](#grape)* | *[Link](https://github.com/ruby-grape/grape)* |
|
345
|
-
| GraphQL | `graphql` | `>= 1.7.9` | *[Link](#graphql)* | *[Link](https://github.com/rmosolgo/graphql-ruby)* |
|
346
|
-
| gRPC | `grpc` | `>= 1.7` | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
330
|
+
| Name | Key | Versions Supported: MRI | Versions Supported: JRuby | How to configure | Gem source |
|
331
|
+
| ------------------------ | -------------------------- | ------------------------ | --------------------------| ----------------------------------- | ------------------------------------------------------------------------------ |
|
332
|
+
| Action Cable | `action_cable` | `>= 5.0` | `>= 5.0` | *[Link](#action-cable)* | *[Link](https://github.com/rails/rails/tree/master/actioncable)* |
|
333
|
+
| Action View | `action_view` | `>= 3.0` | `>= 3.0` | *[Link](#action-view)* | *[Link](https://github.com/rails/rails/tree/master/actionview)* |
|
334
|
+
| Active Model Serializers | `active_model_serializers` | `>= 0.9` | `>= 0.9` | *[Link](#active-model-serializers)* | *[Link](https://github.com/rails-api/active_model_serializers)* |
|
335
|
+
| Action Pack | `action_pack` | `>= 3.0` | `>= 3.0` | *[Link](#action-pack)* | *[Link](https://github.com/rails/rails/tree/master/actionpack)* |
|
336
|
+
| Active Record | `active_record` | `>= 3.0` | `>= 3.0` | *[Link](#active-record)* | *[Link](https://github.com/rails/rails/tree/master/activerecord)* |
|
337
|
+
| Active Support | `active_support` | `>= 3.0` | `>= 3.0` | *[Link](#active-support)* | *[Link](https://github.com/rails/rails/tree/master/activesupport)* |
|
338
|
+
| AWS | `aws` | `>= 2.0` | `>= 2.0` | *[Link](#aws)* | *[Link](https://github.com/aws/aws-sdk-ruby)* |
|
339
|
+
| Concurrent Ruby | `concurrent_ruby` | `>= 0.9` | `>= 0.9` | *[Link](#concurrent-ruby)* | *[Link](https://github.com/ruby-concurrency/concurrent-ruby)* |
|
340
|
+
| Dalli | `dalli` | `>= 2.0` | `>= 2.0` | *[Link](#dalli)* | *[Link](https://github.com/petergoldstein/dalli)* |
|
341
|
+
| DelayedJob | `delayed_job` | `>= 4.1` | `>= 4.1` | *[Link](#delayedjob)* | *[Link](https://github.com/collectiveidea/delayed_job)* |
|
342
|
+
| Elasticsearch | `elasticsearch` | `>= 1.0` | `>= 1.0` | *[Link](#elasticsearch)* | *[Link](https://github.com/elastic/elasticsearch-ruby)* |
|
343
|
+
| Ethon | `ethon` | `>= 0.11` | `>= 0.11` | *[Link](#ethon)* | *[Link](https://github.com/typhoeus/ethon)* |
|
344
|
+
| Excon | `excon` | `>= 0.50` | `>= 0.50` | *[Link](#excon)* | *[Link](https://github.com/excon/excon)* |
|
345
|
+
| Faraday | `faraday` | `>= 0.14` | `>= 0.14` | *[Link](#faraday)* | *[Link](https://github.com/lostisland/faraday)* |
|
346
|
+
| Grape | `grape` | `>= 1.0` | `>= 1.0` | *[Link](#grape)* | *[Link](https://github.com/ruby-grape/grape)* |
|
347
|
+
| GraphQL | `graphql` | `>= 1.7.9` | `>= 1.7.9` | *[Link](#graphql)* | *[Link](https://github.com/rmosolgo/graphql-ruby)* |
|
348
|
+
| gRPC | `grpc` | `>= 1.7` | *gem not available* | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
|
349
|
+
| http.rb | `httprb` | `>= 2.0` | `>= 2.0` | *[Link](#http.rb)* | *[Link](https://github.com/httprb/http)* |
|
350
|
+
| Kafka | `ruby-kafka` | `>= 0.7.10` | `>= 0.7.10` | *[Link](#kafka)* | *[Link](https://github.com/zendesk/ruby-kafka)* |
|
351
|
+
| MongoDB | `mongo` | `>= 2.1` | `>= 2.1` | *[Link](#mongodb)* | *[Link](https://github.com/mongodb/mongo-ruby-driver)* |
|
352
|
+
| MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
|
353
|
+
| 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)* |
|
354
|
+
| Presto | `presto` | `>= 0.5.14` | `>= 0.5.14` | *[Link](#presto)* | *[Link](https://github.com/treasure-data/presto-client-ruby)* |
|
355
|
+
| Racecar | `racecar` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#racecar)* | *[Link](https://github.com/zendesk/racecar)* |
|
356
|
+
| Rack | `rack` | `>= 1.1` | `>= 1.1` | *[Link](#rack)* | *[Link](https://github.com/rack/rack)* |
|
357
|
+
| Rails | `rails` | `>= 3.0` | `>= 3.0` | *[Link](#rails)* | *[Link](https://github.com/rails/rails)* |
|
358
|
+
| Rake | `rake` | `>= 12.0` | `>= 12.0` | *[Link](#rake)* | *[Link](https://github.com/ruby/rake)* |
|
359
|
+
| Redis | `redis` | `>= 3.2` | `>= 3.2` | *[Link](#redis)* | *[Link](https://github.com/redis/redis-rb)* |
|
360
|
+
| Resque | `resque` | `>= 1.0, < 2.0` | `>= 1.0, < 2.0` | *[Link](#resque)* | *[Link](https://github.com/resque/resque)* |
|
361
|
+
| Rest Client | `rest-client` | `>= 1.8` | `>= 1.8` | *[Link](#rest-client)* | *[Link](https://github.com/rest-client/rest-client)* |
|
362
|
+
| Sequel | `sequel` | `>= 3.41` | `>= 3.41` | *[Link](#sequel)* | *[Link](https://github.com/jeremyevans/sequel)* |
|
363
|
+
| Shoryuken | `shoryuken` | `>= 3.2` | `>= 3.2` | *[Link](#shoryuken)* | *[Link](https://github.com/phstc/shoryuken)* |
|
364
|
+
| Sidekiq | `sidekiq` | `>= 3.5.4` | `>= 3.5.4` | *[Link](#sidekiq)* | *[Link](https://github.com/mperham/sidekiq)* |
|
365
|
+
| Sinatra | `sinatra` | `>= 1.4` | `>= 1.4` | *[Link](#sinatra)* | *[Link](https://github.com/sinatra/sinatra)* |
|
366
|
+
| Sneakers | `sneakers` | `>= 2.12.0` | `>= 2.12.0` | *[Link](#sneakers)* | *[Link](https://github.com/jondot/sneakers)* |
|
367
|
+
| Sucker Punch | `sucker_punch` | `>= 2.0` | `>= 2.0` | *[Link](#sucker-punch)* | *[Link](https://github.com/brandonhilkert/sucker_punch)* |
|
363
368
|
|
364
369
|
### Action Cable
|
365
370
|
|
@@ -381,7 +386,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
381
386
|
| --- | ----------- | ------- |
|
382
387
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
383
388
|
| `service_name` | Service name used for `action_cable` instrumentation | `'action_cable'` |
|
384
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
385
389
|
|
386
390
|
### Action View
|
387
391
|
|
@@ -402,7 +406,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
402
406
|
| ---| --- | --- |
|
403
407
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
404
408
|
| `service_name` | Service name used for rendering instrumentation. | `action_view` |
|
405
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
406
409
|
| `template_base_path` | Used when the template name is parsed. If you don't store your templates in the `views/` folder, you may need to change this value | `'views/'` |
|
407
410
|
|
408
411
|
### Active Model Serializers
|
@@ -425,7 +428,6 @@ ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
|
|
425
428
|
| --- | ----------- | ------- |
|
426
429
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
427
430
|
| `service_name` | Service name used for `active_model_serializers` instrumentation. | `'active_model_serializers'` |
|
428
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
429
431
|
|
430
432
|
### Action Pack
|
431
433
|
|
@@ -446,7 +448,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
446
448
|
| ---| --- | --- |
|
447
449
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
448
450
|
| `service_name` | Service name used for rendering instrumentation. | `action_pack` |
|
449
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
450
451
|
|
451
452
|
### Active Record
|
452
453
|
|
@@ -474,9 +475,8 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
474
475
|
| Key | Description | Default |
|
475
476
|
| ---| --- | --- |
|
476
477
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
477
|
-
| `orm_service_name` | Service name used for the
|
478
|
+
| `orm_service_name` | Service name used for the mapping portion of query results to ActiveRecord objects. Inherits service name from parent by default. | _parent.service_name_ (e.g. `'mysql2'`) |
|
478
479
|
| `service_name` | Service name used for database portion of `active_record` instrumentation. | Name of database adapter (e.g. `'mysql2'`) |
|
479
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually, you don't need to set this. | `Datadog.tracer` |
|
480
480
|
|
481
481
|
**Configuring trace settings per database**
|
482
482
|
|
@@ -538,7 +538,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
538
538
|
| ---| --- | --- |
|
539
539
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
540
540
|
| `cache_service` | Service name used for caching with `active_support` instrumentation. | `active_support-cache` |
|
541
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
542
541
|
|
543
542
|
### AWS
|
544
543
|
|
@@ -562,7 +561,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
562
561
|
| --- | ----------- | ------- |
|
563
562
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
564
563
|
| `service_name` | Service name used for `aws` instrumentation | `'aws'` |
|
565
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
566
564
|
|
567
565
|
### Concurrent Ruby
|
568
566
|
|
@@ -589,7 +587,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
589
587
|
| Key | Description | Default |
|
590
588
|
| --- | ----------- | ------- |
|
591
589
|
| `service_name` | Service name used for `concurrent-ruby` instrumentation | `'concurrent-ruby'` |
|
592
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
593
590
|
|
594
591
|
### Dalli
|
595
592
|
|
@@ -615,7 +612,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
615
612
|
| --- | ----------- | ------- |
|
616
613
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
617
614
|
| `service_name` | Service name used for `dalli` instrumentation | `'memcached'` |
|
618
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
619
615
|
|
620
616
|
### DelayedJob
|
621
617
|
|
@@ -637,7 +633,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
637
633
|
| --- | ----------- | ------- |
|
638
634
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
639
635
|
| `service_name` | Service name used for `DelayedJob` instrumentation | `'delayed_job'` |
|
640
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
641
636
|
|
642
637
|
### Elasticsearch
|
643
638
|
|
@@ -663,7 +658,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
663
658
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
664
659
|
| `quantize` | Hash containing options for quantization. May include `:show` with an Array of keys to not quantize (or `:all` to skip quantization), or `:exclude` with Array of keys to exclude entirely. | `{}` |
|
665
660
|
| `service_name` | Service name used for `elasticsearch` instrumentation | `'elasticsearch'` |
|
666
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
667
661
|
|
668
662
|
### Ethon
|
669
663
|
|
@@ -691,7 +685,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
691
685
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
692
686
|
| `service_name` | Service name for `ethon` instrumentation. | `'ethon'` |
|
693
687
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
694
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
695
688
|
|
696
689
|
### Excon
|
697
690
|
|
@@ -725,7 +718,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
725
718
|
| `error_handler` | A `Proc` that accepts a `response` parameter. If it evaluates to a *truthy* value, the trace span is marked as an error. By default only sets 5XX responses as errors. | `nil` |
|
726
719
|
| `service_name` | Service name for Excon instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'excon'` |
|
727
720
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
728
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
729
721
|
|
730
722
|
**Configuring connections to use different settings**
|
731
723
|
|
@@ -789,7 +781,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
789
781
|
| `error_handler` | A `Proc` that accepts a `response` parameter. If it evaluates to a *truthy* value, the trace span is marked as an error. By default only sets 5XX responses as errors. | `nil` |
|
790
782
|
| `service_name` | Service name for Faraday instrumentation. When provided to middleware for a specific connection, it applies only to that connection object. | `'faraday'` |
|
791
783
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
792
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually, you don't need to set this. | `Datadog.tracer` |
|
793
784
|
|
794
785
|
### Grape
|
795
786
|
|
@@ -822,7 +813,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
822
813
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
823
814
|
| `enabled` | Defines whether Grape should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
824
815
|
| `service_name` | Service name used for `grape` instrumentation | `'grape'` |
|
825
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
826
816
|
|
827
817
|
### GraphQL
|
828
818
|
|
@@ -847,7 +837,6 @@ The `use :graphql` method accepts the following parameters. Additional options c
|
|
847
837
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `nil` |
|
848
838
|
| `service_name` | Service name used for `graphql` instrumentation | `'ruby-graphql'` |
|
849
839
|
| `schemas` | Required. Array of `GraphQL::Schema` objects which to trace. Tracing will be added to all the schemas listed, using the options provided to this configuration. If you do not provide any, then tracing will not be activated. | `[]` |
|
850
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
851
840
|
|
852
841
|
**Manually configuring GraphQL schemas**
|
853
842
|
|
@@ -926,7 +915,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
926
915
|
| --- | ----------- | ------- |
|
927
916
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
928
917
|
| `service_name` | Service name used for `grpc` instrumentation | `'grpc'` |
|
929
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
930
918
|
|
931
919
|
**Configuring clients to use different settings**
|
932
920
|
|
@@ -946,6 +934,56 @@ alternate_client = Demo::Echo::Service.rpc_stub_class.new(
|
|
946
934
|
|
947
935
|
The integration will ensure that the `configured_interceptor` establishes a unique tracing setup for that client instance.
|
948
936
|
|
937
|
+
### http.rb
|
938
|
+
|
939
|
+
The http.rb integration will trace any HTTP call using the Http.rb gem.
|
940
|
+
|
941
|
+
```ruby
|
942
|
+
require 'http'
|
943
|
+
require 'ddtrace'
|
944
|
+
Datadog.configure do |c|
|
945
|
+
c.use :httprb, options
|
946
|
+
# optionally, specify a different service name for hostnames matching a regex
|
947
|
+
c.use :httprb, describes: /user-[^.]+\.example\.com/ do |httprb|
|
948
|
+
httprb.service_name = 'user.example.com'
|
949
|
+
httprb.split_by_domain = false # Only necessary if split_by_domain is true by default
|
950
|
+
end
|
951
|
+
end
|
952
|
+
```
|
953
|
+
|
954
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
955
|
+
|
956
|
+
| Key | Description | Default |
|
957
|
+
| --- | ----------- | ------- |
|
958
|
+
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
959
|
+
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
960
|
+
| `service_name` | Service name for `httprb` instrumentation. | `'httprb'` |
|
961
|
+
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
962
|
+
|
963
|
+
### Kafka
|
964
|
+
|
965
|
+
The Kafka integration provides tracing of the `ruby-kafka` gem:
|
966
|
+
|
967
|
+
You can enable it through `Datadog.configure`:
|
968
|
+
|
969
|
+
```ruby
|
970
|
+
require 'active_support/notifications' # required to enable 'ruby-kafka' instrumentation
|
971
|
+
require 'kafka'
|
972
|
+
require 'ddtrace'
|
973
|
+
|
974
|
+
Datadog.configure do |c|
|
975
|
+
c.use :kafka, options
|
976
|
+
end
|
977
|
+
```
|
978
|
+
|
979
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
980
|
+
|
981
|
+
| Key | Description | Default |
|
982
|
+
| --- | ----------- | ------- |
|
983
|
+
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
984
|
+
| `service_name` | Service name used for `kafka` instrumentation | `'kafka'` |
|
985
|
+
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
986
|
+
|
949
987
|
### MongoDB
|
950
988
|
|
951
989
|
The integration traces any `Command` that is sent from the [MongoDB Ruby Driver](https://github.com/mongodb/mongo-ruby-driver) to a MongoDB cluster. By extension, Object Document Mappers (ODM) such as Mongoid are automatically instrumented if they use the official Ruby driver. To activate the integration, simply:
|
@@ -974,7 +1012,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
974
1012
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
975
1013
|
| `quantize` | Hash containing options for quantization. May include `:show` with an Array of keys to not quantize (or `:all` to skip quantization), or `:exclude` with Array of keys to exclude entirely. | `{ show: [:collection, :database, :operation] }` |
|
976
1014
|
| `service_name` | Service name used for `mongo` instrumentation | `'mongodb'` |
|
977
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
978
1015
|
|
979
1016
|
### MySQL2
|
980
1017
|
|
@@ -998,7 +1035,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
998
1035
|
| --- | ----------- | ------- |
|
999
1036
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1000
1037
|
| `service_name` | Service name used for `mysql2` instrumentation | `'mysql2'` |
|
1001
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1002
1038
|
|
1003
1039
|
### Net/HTTP
|
1004
1040
|
|
@@ -1034,7 +1070,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1034
1070
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1035
1071
|
| `service_name` | Service name used for `http` instrumentation | `'net/http'` |
|
1036
1072
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
1037
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1038
1073
|
|
1039
1074
|
If you wish to configure each connection object individually, you may use the `Datadog.configure` as it follows:
|
1040
1075
|
|
@@ -1074,7 +1109,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1074
1109
|
| --- | ----------- | ------- |
|
1075
1110
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1076
1111
|
| `service_name` | Service name used for `presto` instrumentation | `'presto'` |
|
1077
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1078
1112
|
|
1079
1113
|
### Racecar
|
1080
1114
|
|
@@ -1096,7 +1130,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1096
1130
|
| --- | ----------- | ------- |
|
1097
1131
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1098
1132
|
| `service_name` | Service name used for `racecar` instrumentation | `'racecar'` |
|
1099
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1100
1133
|
|
1101
1134
|
### Rack
|
1102
1135
|
|
@@ -1137,7 +1170,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1137
1170
|
| `quantize.fragment` | Defines behavior for URL fragments. Removes fragments by default. May be `:show` to show URL fragments. Option must be nested inside the `quantize` option. | `nil` |
|
1138
1171
|
| `request_queuing` | Track HTTP request time spent in the queue of the frontend server. See [HTTP request queuing](#http-request-queuing) for setup details. Set to `true` to enable. | `false` |
|
1139
1172
|
| `service_name` | Service name used for `rack` instrumentation | `'rack'` |
|
1140
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1141
1173
|
| `web_service_name` | Service name for frontend server request queuing spans. (e.g. `'nginx'`) | `'web-server'` |
|
1142
1174
|
|
1143
1175
|
|
@@ -1200,18 +1232,17 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1200
1232
|
| `middleware_names` | Enables any short-circuited middleware requests to display the middleware name as a resource for the trace. | `false` |
|
1201
1233
|
| `service_name` | Service name used when tracing application requests (on the `rack` level) | `'<app_name>'` (inferred from your Rails application namespace) |
|
1202
1234
|
| `template_base_path` | Used when the template name is parsed. If you don't store your templates in the `views/` folder, you may need to change this value | `'views/'` |
|
1203
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually, you don't need to set this. | `Datadog.tracer` |
|
1204
1235
|
|
1205
1236
|
**Supported versions**
|
1206
1237
|
|
1207
|
-
|
|
1208
|
-
| ------------- |
|
1209
|
-
| 2.0 | 3.0 - 3.2
|
1210
|
-
| 2.1 | 3.0 - 4.2
|
1211
|
-
| 2.2 - 2.3 | 3.0 - 5.2
|
1212
|
-
| 2.4 | 4.2.8 - 5.2
|
1213
|
-
| 2.5 | 4.2.8 - 6.0
|
1214
|
-
| 2.6 - 2.7 | 5.0 - 6.0
|
1238
|
+
| MRI Versions | JRuby Versions | Rails Versions |
|
1239
|
+
| ------------- | -------------- | -------------- |
|
1240
|
+
| 2.0 | | 3.0 - 3.2 |
|
1241
|
+
| 2.1 | | 3.0 - 4.2 |
|
1242
|
+
| 2.2 - 2.3 | | 3.0 - 5.2 |
|
1243
|
+
| 2.4 | | 4.2.8 - 5.2 |
|
1244
|
+
| 2.5 | | 4.2.8 - 6.0 |
|
1245
|
+
| 2.6 - 2.7 | 9.2 | 5.0 - 6.0 |
|
1215
1246
|
|
1216
1247
|
### Rake
|
1217
1248
|
|
@@ -1243,7 +1274,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1243
1274
|
| `enabled` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1244
1275
|
| `quantize` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` |
|
1245
1276
|
| `service_name` | Service name used for `rake` instrumentation | `'rake'` |
|
1246
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually, you don't need to set this. | `Datadog.tracer` |
|
1247
1277
|
|
1248
1278
|
**Configuring task quantization behavior**
|
1249
1279
|
|
@@ -1302,11 +1332,17 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1302
1332
|
| --- | ----------- | ------- |
|
1303
1333
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1304
1334
|
| `service_name` | Service name used for `redis` instrumentation | `'redis'` |
|
1305
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1306
1335
|
|
1307
1336
|
You can also set *per-instance* configuration as it follows:
|
1308
1337
|
|
1309
1338
|
```ruby
|
1339
|
+
require 'redis'
|
1340
|
+
require 'ddtrace'
|
1341
|
+
|
1342
|
+
Datadog.configure do |c|
|
1343
|
+
c.use :redis # Enabling integration instrumentation is still required
|
1344
|
+
end
|
1345
|
+
|
1310
1346
|
customer_cache = Redis.new
|
1311
1347
|
invoice_cache = Redis.new
|
1312
1348
|
|
@@ -1372,7 +1408,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1372
1408
|
| --- | ----------- | ------- |
|
1373
1409
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to the global setting, `false` for off. | `false` |
|
1374
1410
|
| `service_name` | Service name used for `resque` instrumentation | `'resque'` |
|
1375
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually, you don't need to set this. | `Datadog.tracer` |
|
1376
1411
|
| `workers` | An array including all worker classes you want to trace (e.g. `[MyJob]`) | `[]` |
|
1377
1412
|
|
1378
1413
|
### Rest Client
|
@@ -1395,7 +1430,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1395
1430
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1396
1431
|
| `distributed_tracing` | Enables [distributed tracing](#distributed-tracing) | `true` |
|
1397
1432
|
| `service_name` | Service name for `rest_client` instrumentation. | `'rest_client'` |
|
1398
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1399
1433
|
|
1400
1434
|
### Sequel
|
1401
1435
|
|
@@ -1429,7 +1463,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1429
1463
|
| --- | ----------- | ------- |
|
1430
1464
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1431
1465
|
| `service_name` | Service name for `sequel` instrumentation | Name of database adapter (e.g. `'mysql2'`) |
|
1432
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1433
1466
|
|
1434
1467
|
Only Ruby 2.0+ is supported.
|
1435
1468
|
|
@@ -1466,7 +1499,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1466
1499
|
| --- | ----------- | ------- |
|
1467
1500
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1468
1501
|
| `service_name` | Service name used for `shoryuken` instrumentation | `'shoryuken'` |
|
1469
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1470
1502
|
|
1471
1503
|
### Sidekiq
|
1472
1504
|
|
@@ -1490,7 +1522,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1490
1522
|
| `client_service_name` | Service name used for client-side `sidekiq` instrumentation | `'sidekiq-client'` |
|
1491
1523
|
| `service_name` | Service name used for server-side `sidekiq` instrumentation | `'sidekiq'` |
|
1492
1524
|
| `tag_args` | Enable tagging of job arguments. `true` for on, `false` for off. | `false` |
|
1493
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1494
1525
|
|
1495
1526
|
### Sinatra
|
1496
1527
|
|
@@ -1555,7 +1586,29 @@ Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before y
|
|
1555
1586
|
| `headers` | Hash of HTTP request or response headers to add as tags to the `sinatra.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'] }` |
|
1556
1587
|
| `resource_script_names` | Prepend resource names with script name | `false` |
|
1557
1588
|
| `service_name` | Service name used for `sinatra` instrumentation | `'sinatra'` |
|
1558
|
-
|
1589
|
+
|
1590
|
+
### Sneakers
|
1591
|
+
|
1592
|
+
The Sneakers integration is a server-side middleware which will trace job executions.
|
1593
|
+
|
1594
|
+
You can enable it through `Datadog.configure`:
|
1595
|
+
|
1596
|
+
```ruby
|
1597
|
+
require 'ddtrace'
|
1598
|
+
|
1599
|
+
Datadog.configure do |c|
|
1600
|
+
c.use :sneakers, options
|
1601
|
+
end
|
1602
|
+
```
|
1603
|
+
|
1604
|
+
Where `options` is an optional `Hash` that accepts the following parameters:
|
1605
|
+
|
1606
|
+
| Key | Description | Default |
|
1607
|
+
| --- | ----------- | ------- |
|
1608
|
+
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1609
|
+
| `enabled` | Defines whether Sneakers should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1610
|
+
| `service_name` | Service name used for `sneakers` instrumentation | `'sneakers'` |
|
1611
|
+
| `tag_body` | Enable tagging of job message. `true` for on, `false` for off. | `false` |
|
1559
1612
|
|
1560
1613
|
### Sucker Punch
|
1561
1614
|
|
@@ -1578,7 +1631,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1578
1631
|
| --- | ----------- | ------- |
|
1579
1632
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
1580
1633
|
| `service_name` | Service name used for `sucker_punch` instrumentation | `'sucker_punch'` |
|
1581
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1582
1634
|
|
1583
1635
|
## Advanced configuration
|
1584
1636
|
|
@@ -1606,12 +1658,14 @@ end
|
|
1606
1658
|
|
1607
1659
|
Available options are:
|
1608
1660
|
|
1609
|
-
- `enabled`: defines if the `tracer` is enabled or not. If set to `false` instrumentation will still run, but no spans are sent to the trace agent.
|
1661
|
+
- `enabled`: defines if the `tracer` is enabled or not. If set to `false` instrumentation will still run, but no spans are sent to the trace agent. Can be configured through the `DD_TRACE_ENABLED` environment variable. Defaults to `true`.
|
1610
1662
|
- `hostname`: set the hostname of the trace agent.
|
1611
1663
|
- `instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
|
1612
1664
|
- `partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
|
1613
1665
|
- `port`: set the port the trace agent is listening on.
|
1614
1666
|
- `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
1667
|
+
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
1668
|
+
- `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
|
1615
1669
|
|
1616
1670
|
#### Custom logging
|
1617
1671
|
|
@@ -1659,6 +1713,15 @@ This enables you to set this value on a per application basis, so you can have f
|
|
1659
1713
|
|
1660
1714
|
Tags can also be set directly on individual spans, which will supersede any conflicting tags defined at the application level.
|
1661
1715
|
|
1716
|
+
### Environment variables
|
1717
|
+
|
1718
|
+
Other Environment Variables:
|
1719
|
+
|
1720
|
+
- `DD_TRACE_AGENT_URL`: Sets the URL endpoint where traces are sent. Has priority over `DD_AGENT_HOST` and `DD_TRACE_AGENT_PORT` if set. e.g. `DD_TRACE_AGENT_URL=http://localhost:8126`.
|
1721
|
+
- `DD_TRACE_<INTEGRATION>_ENABLED`: Enables or disables an **activated** integration. Defaults to `true`.. e.g. `DD_TRACE_RAILS_ENABLED=false`. This option has no effects on integrations that have not been explicitly activated (e.g. `Datadog.configure{ |c| c.use :integration }`).on code. This environment variable can only be used to disable an integration.
|
1722
|
+
- `DD_TRACE_<INTEGRATION>_ANALYTICS_ENABLED`: Enables or disable App Analytics for a specific integration. Valid values are: true or false (default). e.g. `DD_TRACE_ACTION_CABLE_ANALYTICS_ENABLED=true`.
|
1723
|
+
- `DD_TRACE_<INTEGRATION>_ANALYTICS_SAMPLE_RATE`: Sets the App Analytics sampling rate for a specific integration. A floating number between 0.0 and 1.0 (default). e.g. `DD_TRACE_ACTION_CABLE_ANALYTICS_SAMPLE_RATE=0.5`.
|
1724
|
+
|
1662
1725
|
### Sampling
|
1663
1726
|
|
1664
1727
|
`ddtrace` can perform trace sampling. While the trace agent already samples traces to reduce bandwidth usage, client sampling reduces the performance overhead.
|
@@ -1809,7 +1872,7 @@ Service C:
|
|
1809
1872
|
|
1810
1873
|
**Activating distributed tracing for integrations**
|
1811
1874
|
|
1812
|
-
Many integrations included in `ddtrace` support distributed tracing. Distributed tracing is enabled by default,
|
1875
|
+
Many integrations included in `ddtrace` support distributed tracing. Distributed tracing is enabled by default in Agent v7 and most versions of Agent v6. If needed, you can activate distributed tracing with configuration settings.
|
1813
1876
|
|
1814
1877
|
- If your application receives requests from services with distributed tracing activated, you must activate distributed tracing on the integrations that handle these requests (e.g. Rails)
|
1815
1878
|
- If your application send requests to services with distributed tracing activated, you must activate distributed tracing on the integrations that send these requests (e.g. Faraday)
|
@@ -1824,6 +1887,7 @@ For more details on how to activate distributed tracing for integrations, see th
|
|
1824
1887
|
- [Rack](#rack)
|
1825
1888
|
- [Rails](#rails)
|
1826
1889
|
- [Sinatra](#sinatra)
|
1890
|
+
- [http.rb](#http.rb)
|
1827
1891
|
|
1828
1892
|
**Using the HTTP propagator**
|
1829
1893
|
|
@@ -2150,13 +2214,13 @@ end
|
|
2150
2214
|
|
2151
2215
|
See the [Dogstatsd documentation](https://www.rubydoc.info/github/DataDog/dogstatsd-ruby/master/frames) for more details about configuring `Datadog::Statsd`.
|
2152
2216
|
|
2153
|
-
The stats
|
2217
|
+
The stats are VM specific and will include:
|
2154
2218
|
|
2155
2219
|
| Name | Type | Description |
|
2156
2220
|
| -------------------------- | ------- | -------------------------------------------------------- |
|
2157
2221
|
| `runtime.ruby.class_count` | `gauge` | Number of classes in memory space. |
|
2158
2222
|
| `runtime.ruby.thread_count` | `gauge` | Number of threads. |
|
2159
|
-
| `runtime.ruby.gc.*`. | `gauge` | Garbage collection statistics
|
2223
|
+
| `runtime.ruby.gc.*`. | `gauge` | Garbage collection statistics: collected from `GC.stat`. |
|
2160
2224
|
|
2161
2225
|
In addition, all metrics include the following tags:
|
2162
2226
|
|