ddtrace 0.54.2 → 1.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/LICENSE-3rdparty.csv +2 -1
- data/README.md +4 -0
- data/bin/ddtracerb +5 -5
- data/ddtrace.gemspec +7 -4
- data/docs/0.x-trace.png +0 -0
- data/docs/1.0-trace.png +0 -0
- data/docs/AutoInstrumentation.md +36 -0
- data/docs/Deprecation.md +8 -0
- data/docs/DevelopmentGuide.md +1 -1
- data/docs/GettingStarted.md +408 -431
- data/docs/ProfilingDevelopment.md +12 -9
- data/docs/PublicApi.md +14 -0
- data/docs/UpgradeGuide.md +557 -0
- data/lib/datadog/appsec/assets/blocked.html +4 -0
- data/lib/datadog/appsec/assets/waf_rules/README.md +7 -0
- data/lib/datadog/appsec/assets/waf_rules/recommended.json +5708 -0
- data/lib/datadog/appsec/assets/waf_rules/risky.json +1439 -0
- data/lib/datadog/appsec/assets/waf_rules/strict.json +1361 -0
- data/lib/datadog/appsec/assets.rb +36 -0
- data/lib/datadog/appsec/autoload.rb +16 -0
- data/lib/datadog/appsec/configuration/settings.rb +173 -0
- data/lib/datadog/appsec/configuration.rb +70 -0
- data/lib/datadog/appsec/contrib/auto_instrument.rb +27 -0
- data/lib/datadog/appsec/contrib/configuration/settings.rb +18 -0
- data/lib/datadog/appsec/contrib/integration.rb +35 -0
- data/lib/datadog/appsec/contrib/patcher.rb +10 -0
- data/lib/datadog/appsec/contrib/rack/configuration/settings.rb +20 -0
- data/lib/datadog/appsec/contrib/rack/ext.rb +13 -0
- data/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +128 -0
- data/lib/datadog/appsec/contrib/rack/integration.rb +48 -0
- data/lib/datadog/appsec/contrib/rack/patcher.rb +33 -0
- data/lib/datadog/appsec/contrib/rack/reactive/request.rb +85 -0
- data/lib/datadog/appsec/contrib/rack/reactive/response.rb +62 -0
- data/lib/datadog/appsec/contrib/rack/request.rb +43 -0
- data/lib/datadog/appsec/contrib/rack/request_middleware.rb +98 -0
- data/lib/datadog/appsec/contrib/rack/response.rb +22 -0
- data/lib/datadog/appsec/contrib/rails/configuration/settings.rb +20 -0
- data/lib/datadog/appsec/contrib/rails/ext.rb +13 -0
- data/lib/datadog/appsec/contrib/rails/framework.rb +28 -0
- data/lib/datadog/appsec/contrib/rails/integration.rb +48 -0
- data/lib/datadog/appsec/contrib/rails/patcher.rb +125 -0
- data/lib/datadog/appsec/contrib/rails/request_middleware.rb +18 -0
- data/lib/datadog/appsec/contrib/sinatra/configuration/settings.rb +20 -0
- data/lib/datadog/appsec/contrib/sinatra/ext.rb +13 -0
- data/lib/datadog/appsec/contrib/sinatra/framework.rb +32 -0
- data/lib/datadog/appsec/contrib/sinatra/integration.rb +48 -0
- data/lib/datadog/appsec/contrib/sinatra/patcher.rb +77 -0
- data/lib/datadog/appsec/contrib/sinatra/request_middleware.rb +18 -0
- data/lib/datadog/appsec/event.rb +111 -0
- data/lib/datadog/appsec/extensions.rb +120 -0
- data/lib/datadog/appsec/instrumentation/gateway.rb +42 -0
- data/lib/datadog/appsec/rate_limiter.rb +53 -0
- data/lib/datadog/appsec/reactive/address_hash.rb +16 -0
- data/lib/datadog/appsec/reactive/engine.rb +42 -0
- data/lib/datadog/appsec/reactive/operation.rb +50 -0
- data/lib/datadog/appsec/reactive/subscriber.rb +16 -0
- data/lib/datadog/appsec.rb +21 -0
- data/lib/datadog/ci/configuration/components.rb +8 -8
- data/lib/datadog/ci/configuration/settings.rb +12 -3
- data/lib/datadog/ci/contrib/cucumber/configuration/settings.rb +3 -2
- data/lib/datadog/ci/contrib/cucumber/ext.rb +1 -0
- data/lib/datadog/ci/contrib/cucumber/formatter.rb +2 -8
- data/lib/datadog/ci/contrib/cucumber/instrumentation.rb +1 -1
- data/lib/datadog/ci/contrib/cucumber/integration.rb +2 -2
- data/lib/datadog/ci/contrib/cucumber/patcher.rb +2 -2
- data/lib/datadog/ci/contrib/rspec/configuration/settings.rb +3 -2
- data/lib/datadog/ci/contrib/rspec/example.rb +1 -7
- data/lib/datadog/ci/contrib/rspec/ext.rb +1 -0
- data/lib/datadog/ci/contrib/rspec/integration.rb +2 -2
- data/lib/datadog/ci/contrib/rspec/patcher.rb +2 -2
- data/lib/datadog/ci/ext/app_types.rb +1 -1
- data/lib/datadog/ci/ext/environment.rb +105 -102
- data/lib/datadog/ci/ext/settings.rb +1 -1
- data/lib/datadog/ci/extensions.rb +4 -4
- data/lib/datadog/ci/flush.rb +37 -0
- data/lib/datadog/ci/test.rb +14 -13
- data/lib/datadog/ci.rb +3 -2
- data/lib/datadog/core/buffer/cruby.rb +54 -0
- data/lib/datadog/core/buffer/random.rb +134 -0
- data/lib/datadog/core/buffer/thread_safe.rb +57 -0
- data/lib/datadog/core/chunker.rb +35 -0
- data/lib/datadog/core/configuration/agent_settings_resolver.rb +296 -0
- data/lib/datadog/core/configuration/base.rb +88 -0
- data/lib/datadog/core/configuration/components.rb +392 -0
- data/lib/datadog/core/configuration/dependency_resolver.rb +27 -0
- data/lib/datadog/core/configuration/option.rb +68 -0
- data/lib/datadog/core/configuration/option_definition.rb +125 -0
- data/lib/datadog/core/configuration/option_definition_set.rb +21 -0
- data/lib/datadog/core/configuration/option_set.rb +9 -0
- data/lib/datadog/core/configuration/options.rb +117 -0
- data/lib/datadog/core/configuration/settings.rb +626 -0
- data/lib/datadog/core/configuration.rb +283 -0
- data/lib/datadog/core/diagnostics/environment_logger.rb +282 -0
- data/lib/datadog/core/diagnostics/ext.rb +40 -0
- data/lib/datadog/core/diagnostics/health.rb +36 -0
- data/lib/datadog/core/encoding.rb +75 -0
- data/lib/datadog/core/environment/ext.rb +27 -9
- data/lib/datadog/core/environment/identity.rb +10 -4
- data/lib/datadog/core/environment/socket.rb +8 -2
- data/lib/datadog/core/environment/variable_helpers.rb +1 -0
- data/lib/datadog/core/error.rb +100 -0
- data/lib/datadog/core/extensions.rb +15 -0
- data/lib/datadog/core/git/ext.rb +34 -0
- data/lib/datadog/core/logger.rb +45 -0
- data/lib/datadog/core/metrics/client.rb +187 -0
- data/lib/datadog/core/metrics/ext.rb +19 -0
- data/lib/datadog/core/metrics/helpers.rb +23 -0
- data/lib/datadog/core/metrics/logging.rb +42 -0
- data/lib/datadog/core/metrics/metric.rb +12 -0
- data/lib/datadog/core/metrics/options.rb +48 -0
- data/lib/datadog/core/pin.rb +75 -0
- data/lib/datadog/core/runtime/ext.rb +28 -0
- data/lib/datadog/core/runtime/metrics.rb +125 -0
- data/lib/datadog/core/utils/compression.rb +31 -0
- data/lib/datadog/core/utils/forking.rb +62 -0
- data/lib/datadog/core/utils/object_set.rb +42 -0
- data/lib/datadog/core/utils/only_once.rb +43 -0
- data/lib/datadog/core/utils/sequence.rb +20 -0
- data/lib/datadog/core/utils/string_table.rb +48 -0
- data/lib/datadog/core/utils/time.rb +53 -0
- data/lib/datadog/core/utils.rb +114 -0
- data/lib/{ddtrace → datadog/core}/vendor/multipart-post/LICENSE +0 -0
- data/lib/datadog/core/vendor/multipart-post/multipart/post/composite_read_io.rb +119 -0
- data/lib/datadog/core/vendor/multipart-post/multipart/post/multipartable.rb +60 -0
- data/lib/datadog/core/vendor/multipart-post/multipart/post/parts.rb +138 -0
- data/lib/datadog/core/vendor/multipart-post/multipart/post/version.rb +12 -0
- data/lib/datadog/core/vendor/multipart-post/multipart/post.rb +11 -0
- data/lib/datadog/core/vendor/multipart-post/multipart.rb +15 -0
- data/lib/datadog/core/vendor/multipart-post/net/http/post/multipart.rb +35 -0
- data/lib/datadog/core/worker.rb +23 -0
- data/lib/datadog/core/workers/async.rb +179 -0
- data/lib/datadog/core/workers/interval_loop.rb +118 -0
- data/lib/datadog/core/workers/polling.rb +58 -0
- data/lib/datadog/core/workers/queue.rb +43 -0
- data/lib/datadog/core/workers/runtime_metrics.rb +64 -0
- data/lib/datadog/core.rb +73 -0
- data/lib/datadog/opentelemetry/extensions.rb +14 -0
- data/lib/datadog/opentelemetry/span.rb +34 -0
- data/lib/{ddtrace → datadog}/opentracer/binary_propagator.rb +0 -0
- data/lib/datadog/opentracer/carrier.rb +8 -0
- data/lib/datadog/opentracer/distributed_headers.rb +57 -0
- data/lib/datadog/opentracer/global_tracer.rb +16 -0
- data/lib/datadog/opentracer/propagator.rb +25 -0
- data/lib/datadog/opentracer/rack_propagator.rb +71 -0
- data/lib/datadog/opentracer/scope.rb +17 -0
- data/lib/datadog/opentracer/scope_manager.rb +8 -0
- data/lib/datadog/opentracer/span.rb +100 -0
- data/lib/datadog/opentracer/span_context.rb +18 -0
- data/lib/datadog/opentracer/span_context_factory.rb +26 -0
- data/lib/datadog/opentracer/text_map_propagator.rb +86 -0
- data/lib/datadog/opentracer/thread_local_scope.rb +33 -0
- data/lib/datadog/opentracer/thread_local_scope_manager.rb +42 -0
- data/lib/datadog/opentracer/tracer.rb +213 -0
- data/lib/datadog/opentracer.rb +23 -0
- data/lib/{ddtrace → datadog}/profiling/backtrace_location.rb +0 -0
- data/lib/datadog/profiling/buffer.rb +42 -0
- data/lib/datadog/profiling/collectors/code_provenance.rb +113 -0
- data/lib/datadog/profiling/collectors/stack.rb +297 -0
- data/lib/datadog/profiling/encoding/profile.rb +47 -0
- data/lib/{ddtrace → datadog}/profiling/event.rb +0 -0
- data/lib/datadog/profiling/events/stack.rb +81 -0
- data/lib/datadog/profiling/exporter.rb +24 -0
- data/lib/{ddtrace → datadog}/profiling/ext/forking.rb +0 -0
- data/lib/datadog/profiling/ext.rb +56 -0
- data/lib/datadog/profiling/flush.rb +68 -0
- data/lib/{ddtrace → datadog}/profiling/native_extension.rb +0 -0
- data/lib/datadog/profiling/pprof/builder.rb +126 -0
- data/lib/datadog/profiling/pprof/converter.rb +103 -0
- data/lib/datadog/profiling/pprof/message_set.rb +15 -0
- data/lib/{ddtrace → datadog}/profiling/pprof/payload.rb +0 -0
- data/lib/{ddtrace → datadog}/profiling/pprof/pprof.proto +0 -0
- data/lib/datadog/profiling/pprof/pprof_pb.rb +82 -0
- data/lib/datadog/profiling/pprof/stack_sample.rb +140 -0
- data/lib/datadog/profiling/pprof/string_table.rb +11 -0
- data/lib/datadog/profiling/pprof/template.rb +119 -0
- data/lib/datadog/profiling/preload.rb +4 -0
- data/lib/datadog/profiling/profiler.rb +33 -0
- data/lib/datadog/profiling/recorder.rb +116 -0
- data/lib/datadog/profiling/scheduler.rb +150 -0
- data/lib/datadog/profiling/tasks/exec.rb +49 -0
- data/lib/datadog/profiling/tasks/help.rb +17 -0
- data/lib/datadog/profiling/tasks/setup.rb +90 -0
- data/lib/datadog/profiling/trace_identifiers/ddtrace.rb +44 -0
- data/lib/datadog/profiling/trace_identifiers/helper.rb +46 -0
- data/lib/{ddtrace → datadog}/profiling/transport/client.rb +0 -0
- data/lib/datadog/profiling/transport/http/api/endpoint.rb +106 -0
- data/lib/datadog/profiling/transport/http/api/instance.rb +37 -0
- data/lib/{ddtrace → datadog}/profiling/transport/http/api/spec.rb +0 -0
- data/lib/datadog/profiling/transport/http/api.rb +44 -0
- data/lib/datadog/profiling/transport/http/builder.rb +29 -0
- data/lib/datadog/profiling/transport/http/client.rb +34 -0
- data/lib/datadog/profiling/transport/http/response.rb +22 -0
- data/lib/datadog/profiling/transport/http.rb +111 -0
- data/lib/datadog/profiling/transport/io/client.rb +28 -0
- data/lib/datadog/profiling/transport/io/response.rb +17 -0
- data/lib/datadog/profiling/transport/io.rb +31 -0
- data/lib/{ddtrace → datadog}/profiling/transport/parcel.rb +0 -0
- data/lib/datadog/profiling/transport/request.rb +16 -0
- data/lib/{ddtrace → datadog}/profiling/transport/response.rb +0 -0
- data/lib/datadog/profiling.rb +167 -0
- data/lib/datadog/tracing/analytics.rb +24 -0
- data/lib/datadog/tracing/buffer.rb +125 -0
- data/lib/datadog/tracing/configuration/ext.rb +50 -0
- data/lib/datadog/tracing/context.rb +67 -0
- data/lib/datadog/tracing/context_provider.rb +67 -0
- data/lib/datadog/tracing/contrib/action_cable/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/action_cable/event.rb +71 -0
- data/lib/datadog/tracing/contrib/action_cable/events/broadcast.rb +57 -0
- data/lib/datadog/tracing/contrib/action_cable/events/perform_action.rb +62 -0
- data/lib/datadog/tracing/contrib/action_cable/events/transmit.rb +58 -0
- data/lib/datadog/tracing/contrib/action_cable/events.rb +36 -0
- data/lib/datadog/tracing/contrib/action_cable/ext.rb +31 -0
- data/lib/datadog/tracing/contrib/action_cable/instrumentation.rb +91 -0
- data/lib/datadog/tracing/contrib/action_cable/integration.rb +49 -0
- data/lib/datadog/tracing/contrib/action_cable/patcher.rb +30 -0
- data/lib/datadog/tracing/contrib/action_mailer/configuration/settings.rb +35 -0
- data/lib/datadog/tracing/contrib/action_mailer/event.rb +51 -0
- data/lib/datadog/tracing/contrib/action_mailer/events/deliver.rb +59 -0
- data/lib/datadog/tracing/contrib/action_mailer/events/process.rb +46 -0
- data/lib/datadog/tracing/contrib/action_mailer/events.rb +33 -0
- data/lib/datadog/tracing/contrib/action_mailer/ext.rb +32 -0
- data/lib/datadog/tracing/contrib/action_mailer/integration.rb +49 -0
- data/lib/datadog/tracing/contrib/action_mailer/patcher.rb +28 -0
- data/lib/datadog/tracing/contrib/action_pack/action_controller/instrumentation.rb +155 -0
- data/lib/datadog/tracing/contrib/action_pack/action_controller/patcher.rb +28 -0
- data/lib/datadog/tracing/contrib/action_pack/configuration/settings.rb +35 -0
- data/lib/datadog/tracing/contrib/action_pack/ext.rb +21 -0
- data/lib/datadog/tracing/contrib/action_pack/integration.rb +49 -0
- data/lib/datadog/tracing/contrib/action_pack/patcher.rb +26 -0
- data/lib/datadog/tracing/contrib/action_pack/utils.rb +39 -0
- data/lib/datadog/tracing/contrib/action_view/configuration/settings.rb +35 -0
- data/lib/datadog/tracing/contrib/action_view/event.rb +34 -0
- data/lib/datadog/tracing/contrib/action_view/events/render_partial.rb +53 -0
- data/lib/datadog/tracing/contrib/action_view/events/render_template.rb +56 -0
- data/lib/datadog/tracing/contrib/action_view/events.rb +33 -0
- data/lib/datadog/tracing/contrib/action_view/ext.rb +23 -0
- data/lib/datadog/tracing/contrib/action_view/instrumentation/partial_renderer.rb +77 -0
- data/lib/datadog/tracing/contrib/action_view/instrumentation/template_renderer.rb +90 -0
- data/lib/datadog/tracing/contrib/action_view/integration.rb +56 -0
- data/lib/datadog/tracing/contrib/action_view/patcher.rb +47 -0
- data/lib/datadog/tracing/contrib/action_view/utils.rb +35 -0
- data/lib/datadog/tracing/contrib/active_job/configuration/settings.rb +36 -0
- data/lib/datadog/tracing/contrib/active_job/event.rb +57 -0
- data/lib/datadog/tracing/contrib/active_job/events/discard.rb +49 -0
- data/lib/datadog/tracing/contrib/active_job/events/enqueue.rb +48 -0
- data/lib/datadog/tracing/contrib/active_job/events/enqueue_at.rb +48 -0
- data/lib/datadog/tracing/contrib/active_job/events/enqueue_retry.rb +50 -0
- data/lib/datadog/tracing/contrib/active_job/events/perform.rb +48 -0
- data/lib/datadog/tracing/contrib/active_job/events/retry_stopped.rb +49 -0
- data/lib/datadog/tracing/contrib/active_job/events.rb +41 -0
- data/lib/datadog/tracing/contrib/active_job/ext.rb +38 -0
- data/lib/datadog/tracing/contrib/active_job/integration.rb +49 -0
- data/lib/datadog/tracing/contrib/active_job/log_injection.rb +25 -0
- data/lib/datadog/tracing/contrib/active_job/patcher.rb +35 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/configuration/settings.rb +32 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/event.rb +68 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/events/render.rb +44 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb +46 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/events.rb +33 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/ext.rb +23 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/integration.rb +44 -0
- data/lib/datadog/tracing/contrib/active_model_serializers/patcher.rb +32 -0
- data/lib/datadog/tracing/contrib/active_record/configuration/makara_resolver.rb +35 -0
- data/lib/datadog/tracing/contrib/active_record/configuration/resolver.rb +137 -0
- data/lib/datadog/tracing/contrib/active_record/configuration/settings.rb +38 -0
- data/lib/datadog/tracing/contrib/active_record/event.rb +29 -0
- data/lib/datadog/tracing/contrib/active_record/events/instantiation.rb +57 -0
- data/lib/datadog/tracing/contrib/active_record/events/sql.rb +77 -0
- data/lib/datadog/tracing/contrib/active_record/events.rb +33 -0
- data/lib/datadog/tracing/contrib/active_record/ext.rb +28 -0
- data/lib/datadog/tracing/contrib/active_record/integration.rb +55 -0
- data/lib/datadog/tracing/contrib/active_record/patcher.rb +26 -0
- data/lib/datadog/tracing/contrib/active_record/utils.rb +127 -0
- data/lib/{ddtrace/vendor/active_record → datadog/tracing/contrib/active_record/vendor}/MIT-LICENSE +0 -0
- data/lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb +306 -0
- data/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb +269 -0
- data/lib/datadog/tracing/contrib/active_support/cache/patcher.rb +72 -0
- data/lib/datadog/tracing/contrib/active_support/cache/redis.rb +46 -0
- data/lib/datadog/tracing/contrib/active_support/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/active_support/ext.rb +30 -0
- data/lib/datadog/tracing/contrib/active_support/integration.rb +50 -0
- data/lib/datadog/tracing/contrib/active_support/notifications/event.rb +70 -0
- data/lib/datadog/tracing/contrib/active_support/notifications/subscriber.rb +70 -0
- data/lib/datadog/tracing/contrib/active_support/notifications/subscription.rb +161 -0
- data/lib/datadog/tracing/contrib/active_support/patcher.rb +26 -0
- data/lib/datadog/tracing/contrib/analytics.rb +28 -0
- data/lib/datadog/tracing/contrib/auto_instrument.rb +50 -0
- data/lib/datadog/tracing/contrib/aws/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/aws/ext.rb +26 -0
- data/lib/datadog/tracing/contrib/aws/instrumentation.rb +93 -0
- data/lib/datadog/tracing/contrib/aws/integration.rb +46 -0
- data/lib/datadog/tracing/contrib/aws/parsed_context.rb +59 -0
- data/lib/datadog/tracing/contrib/aws/patcher.rb +56 -0
- data/lib/datadog/tracing/contrib/aws/services.rb +122 -0
- data/lib/datadog/tracing/contrib/concurrent_ruby/configuration/settings.rb +22 -0
- data/lib/datadog/tracing/contrib/concurrent_ruby/context_composite_executor_service.rb +45 -0
- data/lib/datadog/tracing/contrib/concurrent_ruby/ext.rb +15 -0
- data/lib/datadog/tracing/contrib/concurrent_ruby/future_patch.rb +26 -0
- data/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/concurrent_ruby/patcher.rb +32 -0
- data/lib/datadog/tracing/contrib/configurable.rb +101 -0
- data/lib/datadog/tracing/contrib/configuration/resolver.rb +84 -0
- data/lib/datadog/tracing/contrib/configuration/resolvers/pattern_resolver.rb +42 -0
- data/lib/datadog/tracing/contrib/configuration/settings.rb +42 -0
- data/lib/datadog/tracing/contrib/dalli/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/dalli/ext.rb +23 -0
- data/lib/datadog/tracing/contrib/dalli/instrumentation.rb +57 -0
- data/lib/datadog/tracing/contrib/dalli/integration.rb +51 -0
- data/lib/datadog/tracing/contrib/dalli/patcher.rb +28 -0
- data/lib/datadog/tracing/contrib/dalli/quantize.rb +25 -0
- data/lib/datadog/tracing/contrib/delayed_job/configuration/settings.rb +37 -0
- data/lib/datadog/tracing/contrib/delayed_job/ext.rb +25 -0
- data/lib/datadog/tracing/contrib/delayed_job/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/delayed_job/patcher.rb +31 -0
- data/lib/datadog/tracing/contrib/delayed_job/plugin.rb +100 -0
- data/lib/datadog/tracing/contrib/elasticsearch/configuration/settings.rb +35 -0
- data/lib/datadog/tracing/contrib/elasticsearch/ext.rb +25 -0
- data/lib/datadog/tracing/contrib/elasticsearch/integration.rb +43 -0
- data/lib/datadog/tracing/contrib/elasticsearch/patcher.rb +114 -0
- data/lib/datadog/tracing/contrib/elasticsearch/quantize.rb +88 -0
- data/lib/datadog/tracing/contrib/ethon/configuration/settings.rb +36 -0
- data/lib/datadog/tracing/contrib/ethon/easy_patch.rb +176 -0
- data/lib/datadog/tracing/contrib/ethon/ext.rb +23 -0
- data/lib/datadog/tracing/contrib/ethon/integration.rb +47 -0
- data/lib/datadog/tracing/contrib/ethon/multi_patch.rb +95 -0
- data/lib/datadog/tracing/contrib/ethon/patcher.rb +31 -0
- data/lib/datadog/tracing/contrib/excon/configuration/settings.rb +37 -0
- data/lib/datadog/tracing/contrib/excon/ext.rb +20 -0
- data/lib/datadog/tracing/contrib/excon/integration.rb +47 -0
- data/lib/datadog/tracing/contrib/excon/middleware.rb +169 -0
- data/lib/datadog/tracing/contrib/excon/patcher.rb +30 -0
- data/lib/datadog/tracing/contrib/extensions.rb +184 -0
- data/lib/datadog/tracing/contrib/faraday/configuration/settings.rb +41 -0
- data/lib/datadog/tracing/contrib/faraday/connection.rb +21 -0
- data/lib/datadog/tracing/contrib/faraday/ext.rb +20 -0
- data/lib/datadog/tracing/contrib/faraday/integration.rb +47 -0
- data/lib/datadog/tracing/contrib/faraday/middleware.rb +92 -0
- data/lib/datadog/tracing/contrib/faraday/patcher.rb +56 -0
- data/lib/datadog/tracing/contrib/faraday/rack_builder.rb +21 -0
- data/lib/datadog/tracing/contrib/grape/configuration/settings.rb +41 -0
- data/lib/datadog/tracing/contrib/grape/endpoint.rb +251 -0
- data/lib/datadog/tracing/contrib/grape/ext.rb +27 -0
- data/lib/datadog/tracing/contrib/grape/instrumentation.rb +36 -0
- data/lib/datadog/tracing/contrib/grape/integration.rb +43 -0
- data/lib/datadog/tracing/contrib/grape/patcher.rb +33 -0
- data/lib/datadog/tracing/contrib/graphql/configuration/settings.rb +35 -0
- data/lib/datadog/tracing/contrib/graphql/ext.rb +18 -0
- data/lib/datadog/tracing/contrib/graphql/integration.rb +43 -0
- data/lib/datadog/tracing/contrib/graphql/patcher.rb +64 -0
- data/lib/datadog/tracing/contrib/grpc/configuration/settings.rb +36 -0
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/client.rb +83 -0
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/server.rb +89 -0
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb +103 -0
- data/lib/datadog/tracing/contrib/grpc/ext.rb +22 -0
- data/lib/datadog/tracing/contrib/grpc/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/grpc/intercept_with_datadog.rb +52 -0
- data/lib/datadog/tracing/contrib/grpc/patcher.rb +37 -0
- data/lib/datadog/tracing/contrib/http/circuit_breaker.rb +43 -0
- data/lib/datadog/tracing/contrib/http/configuration/settings.rb +36 -0
- data/lib/datadog/tracing/contrib/http/ext.rb +20 -0
- data/lib/datadog/tracing/contrib/http/instrumentation.rb +138 -0
- data/lib/datadog/tracing/contrib/http/integration.rb +48 -0
- data/lib/datadog/tracing/contrib/http/patcher.rb +29 -0
- data/lib/datadog/tracing/contrib/http_annotation_helper.rb +16 -0
- data/lib/datadog/tracing/contrib/httpclient/configuration/settings.rb +36 -0
- data/lib/datadog/tracing/contrib/httpclient/ext.rb +20 -0
- data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +116 -0
- data/lib/datadog/tracing/contrib/httpclient/integration.rb +47 -0
- data/lib/datadog/tracing/contrib/httpclient/patcher.rb +41 -0
- data/lib/datadog/tracing/contrib/httprb/configuration/settings.rb +36 -0
- data/lib/datadog/tracing/contrib/httprb/ext.rb +20 -0
- data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +127 -0
- data/lib/datadog/tracing/contrib/httprb/integration.rb +47 -0
- data/lib/datadog/tracing/contrib/httprb/patcher.rb +41 -0
- data/lib/datadog/tracing/contrib/integration.rb +77 -0
- data/lib/datadog/tracing/contrib/kafka/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/kafka/consumer_event.rb +17 -0
- data/lib/datadog/tracing/contrib/kafka/consumer_group_event.rb +17 -0
- data/lib/datadog/tracing/contrib/kafka/event.rb +51 -0
- data/lib/datadog/tracing/contrib/kafka/events/connection/request.rb +41 -0
- data/lib/datadog/tracing/contrib/kafka/events/consumer/process_batch.rb +48 -0
- data/lib/datadog/tracing/contrib/kafka/events/consumer/process_message.rb +46 -0
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/heartbeat.rb +46 -0
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/join_group.rb +36 -0
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/leave_group.rb +36 -0
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/sync_group.rb +36 -0
- data/lib/datadog/tracing/contrib/kafka/events/produce_operation/send_messages.rb +39 -0
- data/lib/datadog/tracing/contrib/kafka/events/producer/deliver_messages.rb +42 -0
- data/lib/datadog/tracing/contrib/kafka/events.rb +47 -0
- data/lib/datadog/tracing/contrib/kafka/ext.rb +51 -0
- data/lib/datadog/tracing/contrib/kafka/integration.rb +43 -0
- data/lib/datadog/tracing/contrib/kafka/patcher.rb +29 -0
- data/lib/datadog/tracing/contrib/lograge/configuration/settings.rb +22 -0
- data/lib/datadog/tracing/contrib/lograge/ext.rb +14 -0
- data/lib/datadog/tracing/contrib/lograge/instrumentation.rb +45 -0
- data/lib/datadog/tracing/contrib/lograge/integration.rb +49 -0
- data/lib/datadog/tracing/contrib/lograge/patcher.rb +28 -0
- data/lib/datadog/tracing/contrib/mongodb/configuration/settings.rb +37 -0
- data/lib/datadog/tracing/contrib/mongodb/ext.rb +26 -0
- data/lib/datadog/tracing/contrib/mongodb/instrumentation.rb +46 -0
- data/lib/datadog/tracing/contrib/mongodb/integration.rb +47 -0
- data/lib/datadog/tracing/contrib/mongodb/parsers.rb +48 -0
- data/lib/datadog/tracing/contrib/mongodb/patcher.rb +33 -0
- data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +120 -0
- data/lib/datadog/tracing/contrib/mysql2/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/mysql2/ext.rb +21 -0
- data/lib/datadog/tracing/contrib/mysql2/instrumentation.rb +61 -0
- data/lib/datadog/tracing/contrib/mysql2/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/mysql2/patcher.rb +30 -0
- data/lib/datadog/tracing/contrib/patchable.rb +108 -0
- data/lib/datadog/tracing/contrib/patcher.rb +73 -0
- data/lib/datadog/tracing/contrib/presto/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/presto/ext.rb +31 -0
- data/lib/datadog/tracing/contrib/presto/instrumentation.rb +124 -0
- data/lib/datadog/tracing/contrib/presto/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/presto/patcher.rb +36 -0
- data/lib/datadog/tracing/contrib/qless/configuration/settings.rb +39 -0
- data/lib/datadog/tracing/contrib/qless/ext.rb +25 -0
- data/lib/datadog/tracing/contrib/qless/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/qless/patcher.rb +38 -0
- data/lib/datadog/tracing/contrib/qless/qless_job.rb +74 -0
- data/lib/datadog/tracing/contrib/qless/tracer_cleaner.rb +31 -0
- data/lib/datadog/tracing/contrib/que/configuration/settings.rb +48 -0
- data/lib/datadog/tracing/contrib/que/ext.rb +33 -0
- data/lib/datadog/tracing/contrib/que/integration.rb +45 -0
- data/lib/datadog/tracing/contrib/que/patcher.rb +28 -0
- data/lib/datadog/tracing/contrib/que/tracer.rb +60 -0
- data/lib/datadog/tracing/contrib/racecar/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/racecar/event.rb +78 -0
- data/lib/datadog/tracing/contrib/racecar/events/batch.rb +34 -0
- data/lib/datadog/tracing/contrib/racecar/events/consume.rb +34 -0
- data/lib/datadog/tracing/contrib/racecar/events/message.rb +34 -0
- data/lib/datadog/tracing/contrib/racecar/events.rb +35 -0
- data/lib/datadog/tracing/contrib/racecar/ext.rb +30 -0
- data/lib/datadog/tracing/contrib/racecar/integration.rb +43 -0
- data/lib/datadog/tracing/contrib/racecar/patcher.rb +29 -0
- data/lib/datadog/tracing/contrib/rack/configuration/settings.rb +50 -0
- data/lib/datadog/tracing/contrib/rack/ext.rb +24 -0
- data/lib/datadog/tracing/contrib/rack/integration.rb +49 -0
- data/lib/datadog/tracing/contrib/rack/middlewares.rb +254 -0
- data/lib/datadog/tracing/contrib/rack/patcher.rb +108 -0
- data/lib/datadog/tracing/contrib/rack/request_queue.rb +47 -0
- data/lib/datadog/tracing/contrib/rails/auto_instrument_railtie.rb +10 -0
- data/lib/datadog/tracing/contrib/rails/configuration/settings.rb +70 -0
- data/lib/datadog/tracing/contrib/rails/ext.rb +18 -0
- data/lib/datadog/tracing/contrib/rails/framework.rb +151 -0
- data/lib/datadog/tracing/contrib/rails/integration.rb +48 -0
- data/lib/datadog/tracing/contrib/rails/log_injection.rb +46 -0
- data/lib/datadog/tracing/contrib/rails/middlewares.rb +46 -0
- data/lib/datadog/tracing/contrib/rails/patcher.rb +116 -0
- data/lib/datadog/tracing/contrib/rails/railtie.rb +18 -0
- data/lib/datadog/tracing/contrib/rails/utils.rb +27 -0
- data/lib/datadog/tracing/contrib/rake/configuration/settings.rb +35 -0
- data/lib/datadog/tracing/contrib/rake/ext.rb +25 -0
- data/lib/datadog/tracing/contrib/rake/instrumentation.rb +96 -0
- data/lib/datadog/tracing/contrib/rake/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/rake/patcher.rb +34 -0
- data/lib/datadog/tracing/contrib/redis/configuration/resolver.rb +48 -0
- data/lib/datadog/tracing/contrib/redis/configuration/settings.rb +39 -0
- data/lib/datadog/tracing/contrib/redis/ext.rb +25 -0
- data/lib/datadog/tracing/contrib/redis/instrumentation.rb +77 -0
- data/lib/datadog/tracing/contrib/redis/integration.rb +46 -0
- data/lib/datadog/tracing/contrib/redis/patcher.rb +35 -0
- data/lib/datadog/tracing/contrib/redis/quantize.rb +78 -0
- data/lib/datadog/tracing/contrib/redis/tags.rb +53 -0
- data/lib/{ddtrace → datadog/tracing}/contrib/redis/vendor/LICENSE +0 -0
- data/lib/datadog/tracing/contrib/redis/vendor/resolver.rb +161 -0
- data/lib/datadog/tracing/contrib/registerable.rb +50 -0
- data/lib/datadog/tracing/contrib/registry.rb +51 -0
- data/lib/datadog/tracing/contrib/resque/configuration/settings.rb +36 -0
- data/lib/datadog/tracing/contrib/resque/ext.rb +20 -0
- data/lib/datadog/tracing/contrib/resque/integration.rb +47 -0
- data/lib/datadog/tracing/contrib/resque/patcher.rb +29 -0
- data/lib/datadog/tracing/contrib/resque/resque_job.rb +102 -0
- data/lib/datadog/tracing/contrib/rest_client/configuration/settings.rb +35 -0
- data/lib/datadog/tracing/contrib/rest_client/ext.rb +20 -0
- data/lib/datadog/tracing/contrib/rest_client/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/rest_client/patcher.rb +29 -0
- data/lib/datadog/tracing/contrib/rest_client/request_patch.rb +104 -0
- data/lib/datadog/tracing/contrib/semantic_logger/configuration/settings.rb +22 -0
- data/lib/datadog/tracing/contrib/semantic_logger/ext.rb +14 -0
- data/lib/datadog/tracing/contrib/semantic_logger/instrumentation.rb +49 -0
- data/lib/datadog/tracing/contrib/semantic_logger/integration.rb +51 -0
- data/lib/datadog/tracing/contrib/semantic_logger/patcher.rb +28 -0
- data/lib/datadog/tracing/contrib/sequel/configuration/settings.rb +32 -0
- data/lib/datadog/tracing/contrib/sequel/database.rb +59 -0
- data/lib/datadog/tracing/contrib/sequel/dataset.rb +64 -0
- data/lib/datadog/tracing/contrib/sequel/ext.rb +21 -0
- data/lib/datadog/tracing/contrib/sequel/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/sequel/patcher.rb +36 -0
- data/lib/datadog/tracing/contrib/sequel/utils.rb +86 -0
- data/lib/datadog/tracing/contrib/shoryuken/configuration/settings.rb +37 -0
- data/lib/datadog/tracing/contrib/shoryuken/ext.rb +24 -0
- data/lib/datadog/tracing/contrib/shoryuken/integration.rb +43 -0
- data/lib/datadog/tracing/contrib/shoryuken/patcher.rb +27 -0
- data/lib/datadog/tracing/contrib/shoryuken/tracer.rb +60 -0
- data/lib/datadog/tracing/contrib/sidekiq/client_tracer.rb +52 -0
- data/lib/datadog/tracing/contrib/sidekiq/configuration/settings.rb +42 -0
- data/lib/datadog/tracing/contrib/sidekiq/ext.rb +37 -0
- data/lib/datadog/tracing/contrib/sidekiq/integration.rb +52 -0
- data/lib/datadog/tracing/contrib/sidekiq/patcher.rb +70 -0
- data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/heartbeat.rb +34 -0
- data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/job_fetch.rb +34 -0
- data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/scheduled_push.rb +33 -0
- data/lib/datadog/tracing/contrib/sidekiq/server_tracer.rb +78 -0
- data/lib/datadog/tracing/contrib/sidekiq/tracing.rb +43 -0
- data/lib/datadog/tracing/contrib/sinatra/configuration/settings.rb +42 -0
- data/lib/datadog/tracing/contrib/sinatra/env.rb +65 -0
- data/lib/datadog/tracing/contrib/sinatra/ext.rb +31 -0
- data/lib/datadog/tracing/contrib/sinatra/framework.rb +105 -0
- data/lib/datadog/tracing/contrib/sinatra/headers.rb +34 -0
- data/lib/datadog/tracing/contrib/sinatra/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/sinatra/patcher.rb +76 -0
- data/lib/datadog/tracing/contrib/sinatra/tracer.rb +158 -0
- data/lib/datadog/tracing/contrib/sinatra/tracer_middleware.rb +122 -0
- data/lib/datadog/tracing/contrib/sneakers/configuration/settings.rb +37 -0
- data/lib/datadog/tracing/contrib/sneakers/ext.rb +25 -0
- data/lib/datadog/tracing/contrib/sneakers/integration.rb +45 -0
- data/lib/datadog/tracing/contrib/sneakers/patcher.rb +29 -0
- data/lib/datadog/tracing/contrib/sneakers/tracer.rb +57 -0
- data/lib/datadog/tracing/contrib/status_code_matcher.rb +74 -0
- data/lib/datadog/tracing/contrib/sucker_punch/configuration/settings.rb +34 -0
- data/lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb +27 -0
- data/lib/datadog/tracing/contrib/sucker_punch/ext.rb +26 -0
- data/lib/datadog/tracing/contrib/sucker_punch/instrumentation.rb +104 -0
- data/lib/datadog/tracing/contrib/sucker_punch/integration.rb +42 -0
- data/lib/datadog/tracing/contrib/sucker_punch/patcher.rb +37 -0
- data/lib/datadog/tracing/contrib/utils/database.rb +30 -0
- data/lib/datadog/tracing/contrib/utils/quantization/hash.rb +110 -0
- data/lib/datadog/tracing/contrib/utils/quantization/http.rb +98 -0
- data/lib/datadog/tracing/contrib.rb +73 -0
- data/lib/datadog/tracing/correlation.rb +108 -0
- data/lib/datadog/tracing/distributed/headers/b3.rb +54 -0
- data/lib/datadog/tracing/distributed/headers/b3_single.rb +66 -0
- data/lib/datadog/tracing/distributed/headers/datadog.rb +51 -0
- data/lib/datadog/tracing/distributed/headers/ext.rb +30 -0
- data/lib/datadog/tracing/distributed/helpers.rb +43 -0
- data/lib/datadog/tracing/distributed/parser.rb +69 -0
- data/lib/datadog/tracing/event.rb +76 -0
- data/lib/datadog/tracing/flush.rb +73 -0
- data/lib/datadog/tracing/metadata/analytics.rb +24 -0
- data/lib/datadog/tracing/metadata/ext.rb +150 -0
- data/lib/datadog/tracing/metadata/tagging.rb +118 -0
- data/lib/datadog/tracing/metadata.rb +16 -0
- data/lib/datadog/tracing/pipeline/span_filter.rb +42 -0
- data/lib/datadog/tracing/pipeline/span_processor.rb +38 -0
- data/lib/datadog/tracing/pipeline.rb +65 -0
- data/lib/datadog/tracing/propagation/grpc.rb +87 -0
- data/lib/datadog/tracing/propagation/http.rb +108 -0
- data/lib/datadog/tracing/runtime/metrics.rb +18 -0
- data/lib/datadog/tracing/sampling/all_sampler.rb +24 -0
- data/lib/datadog/tracing/sampling/ext.rb +26 -0
- data/lib/datadog/tracing/sampling/matcher.rb +67 -0
- data/lib/datadog/tracing/sampling/priority_sampler.rb +112 -0
- data/lib/datadog/tracing/sampling/rate_by_key_sampler.rb +96 -0
- data/lib/datadog/tracing/sampling/rate_by_service_sampler.rb +40 -0
- data/lib/datadog/tracing/sampling/rate_limiter.rb +184 -0
- data/lib/datadog/tracing/sampling/rate_sampler.rb +54 -0
- data/lib/datadog/tracing/sampling/rule.rb +69 -0
- data/lib/datadog/tracing/sampling/rule_sampler.rb +132 -0
- data/lib/datadog/tracing/sampling/sampler.rb +43 -0
- data/lib/datadog/tracing/span.rb +210 -0
- data/lib/datadog/tracing/span_operation.rb +519 -0
- data/lib/datadog/tracing/sync_writer.rb +68 -0
- data/lib/datadog/tracing/trace_digest.rb +58 -0
- data/lib/datadog/tracing/trace_operation.rb +411 -0
- data/lib/datadog/tracing/trace_segment.rb +292 -0
- data/lib/datadog/tracing/tracer.rb +504 -0
- data/lib/datadog/tracing/workers/trace_writer.rb +194 -0
- data/lib/datadog/tracing/workers.rb +124 -0
- data/lib/datadog/tracing/writer.rb +179 -0
- data/lib/datadog/tracing.rb +140 -0
- data/lib/ddtrace/auto_instrument.rb +4 -1
- data/lib/ddtrace/profiling/preload.rb +2 -4
- data/lib/ddtrace/transport/ext.rb +34 -0
- data/lib/ddtrace/transport/http/adapters/net.rb +2 -2
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +2 -2
- data/lib/ddtrace/transport/http/api.rb +4 -11
- data/lib/ddtrace/transport/http/builder.rb +2 -2
- data/lib/ddtrace/transport/http/traces.rb +2 -0
- data/lib/ddtrace/transport/http.rb +22 -28
- data/lib/ddtrace/transport/io/traces.rb +1 -1
- data/lib/ddtrace/transport/io.rb +2 -2
- data/lib/ddtrace/transport/parcel.rb +1 -0
- data/lib/ddtrace/transport/serializable_trace.rb +116 -0
- data/lib/ddtrace/transport/statistics.rb +5 -4
- data/lib/ddtrace/transport/trace_formatter.rb +164 -0
- data/lib/ddtrace/transport/traces.rb +14 -5
- data/lib/ddtrace/version.rb +5 -5
- data/lib/ddtrace.rb +18 -39
- metadata +561 -485
- data/.yardopts +0 -5
- data/lib/datadog/ci/context_flush.rb +0 -29
- data/lib/datadog/contrib.rb +0 -71
- data/lib/ddtrace/analytics.rb +0 -39
- data/lib/ddtrace/buffer.rb +0 -340
- data/lib/ddtrace/chunker.rb +0 -35
- data/lib/ddtrace/configuration/agent_settings_resolver.rb +0 -309
- data/lib/ddtrace/configuration/base.rb +0 -82
- data/lib/ddtrace/configuration/components.rb +0 -292
- data/lib/ddtrace/configuration/dependency_resolver.rb +0 -25
- data/lib/ddtrace/configuration/option.rb +0 -65
- data/lib/ddtrace/configuration/option_definition.rb +0 -122
- data/lib/ddtrace/configuration/option_definition_set.rb +0 -19
- data/lib/ddtrace/configuration/option_set.rb +0 -7
- data/lib/ddtrace/configuration/options.rb +0 -112
- data/lib/ddtrace/configuration/pin_setup.rb +0 -32
- data/lib/ddtrace/configuration/settings.rb +0 -413
- data/lib/ddtrace/configuration.rb +0 -195
- data/lib/ddtrace/context.rb +0 -334
- data/lib/ddtrace/context_flush.rb +0 -82
- data/lib/ddtrace/context_provider.rb +0 -62
- data/lib/ddtrace/contrib/action_cable/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/action_cable/event.rb +0 -67
- data/lib/ddtrace/contrib/action_cable/events/broadcast.rb +0 -50
- data/lib/ddtrace/contrib/action_cable/events/perform_action.rb +0 -56
- data/lib/ddtrace/contrib/action_cable/events/transmit.rb +0 -51
- data/lib/ddtrace/contrib/action_cable/events.rb +0 -34
- data/lib/ddtrace/contrib/action_cable/ext.rb +0 -27
- data/lib/ddtrace/contrib/action_cable/instrumentation.rb +0 -78
- data/lib/ddtrace/contrib/action_cable/integration.rb +0 -46
- data/lib/ddtrace/contrib/action_cable/patcher.rb +0 -29
- data/lib/ddtrace/contrib/action_mailer/configuration/settings.rb +0 -32
- data/lib/ddtrace/contrib/action_mailer/event.rb +0 -50
- data/lib/ddtrace/contrib/action_mailer/events/deliver.rb +0 -54
- data/lib/ddtrace/contrib/action_mailer/events/process.rb +0 -41
- data/lib/ddtrace/contrib/action_mailer/events.rb +0 -31
- data/lib/ddtrace/contrib/action_mailer/ext.rb +0 -32
- data/lib/ddtrace/contrib/action_mailer/integration.rb +0 -45
- data/lib/ddtrace/contrib/action_mailer/patcher.rb +0 -27
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +0 -157
- data/lib/ddtrace/contrib/action_pack/action_controller/patcher.rb +0 -26
- data/lib/ddtrace/contrib/action_pack/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/action_pack/ext.rb +0 -20
- data/lib/ddtrace/contrib/action_pack/integration.rb +0 -46
- data/lib/ddtrace/contrib/action_pack/patcher.rb +0 -24
- data/lib/ddtrace/contrib/action_pack/utils.rb +0 -37
- data/lib/ddtrace/contrib/action_view/configuration/settings.rb +0 -32
- data/lib/ddtrace/contrib/action_view/event.rb +0 -36
- data/lib/ddtrace/contrib/action_view/events/render_partial.rb +0 -47
- data/lib/ddtrace/contrib/action_view/events/render_template.rb +0 -50
- data/lib/ddtrace/contrib/action_view/events.rb +0 -31
- data/lib/ddtrace/contrib/action_view/ext.rb +0 -21
- data/lib/ddtrace/contrib/action_view/instrumentation/partial_renderer.rb +0 -75
- data/lib/ddtrace/contrib/action_view/instrumentation/template_renderer.rb +0 -168
- data/lib/ddtrace/contrib/action_view/integration.rb +0 -53
- data/lib/ddtrace/contrib/action_view/patcher.rb +0 -48
- data/lib/ddtrace/contrib/action_view/utils.rb +0 -33
- data/lib/ddtrace/contrib/active_job/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/active_job/event.rb +0 -54
- data/lib/ddtrace/contrib/active_job/events/discard.rb +0 -46
- data/lib/ddtrace/contrib/active_job/events/enqueue.rb +0 -45
- data/lib/ddtrace/contrib/active_job/events/enqueue_at.rb +0 -45
- data/lib/ddtrace/contrib/active_job/events/enqueue_retry.rb +0 -47
- data/lib/ddtrace/contrib/active_job/events/perform.rb +0 -45
- data/lib/ddtrace/contrib/active_job/events/retry_stopped.rb +0 -46
- data/lib/ddtrace/contrib/active_job/events.rb +0 -39
- data/lib/ddtrace/contrib/active_job/ext.rb +0 -32
- data/lib/ddtrace/contrib/active_job/integration.rb +0 -46
- data/lib/ddtrace/contrib/active_job/log_injection.rb +0 -21
- data/lib/ddtrace/contrib/active_job/patcher.rb +0 -33
- data/lib/ddtrace/contrib/active_model_serializers/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/active_model_serializers/event.rb +0 -69
- data/lib/ddtrace/contrib/active_model_serializers/events/render.rb +0 -33
- data/lib/ddtrace/contrib/active_model_serializers/events/serialize.rb +0 -36
- data/lib/ddtrace/contrib/active_model_serializers/events.rb +0 -31
- data/lib/ddtrace/contrib/active_model_serializers/ext.rb +0 -21
- data/lib/ddtrace/contrib/active_model_serializers/integration.rb +0 -41
- data/lib/ddtrace/contrib/active_model_serializers/patcher.rb +0 -30
- data/lib/ddtrace/contrib/active_record/configuration/makara_resolver.rb +0 -31
- data/lib/ddtrace/contrib/active_record/configuration/resolver.rb +0 -135
- data/lib/ddtrace/contrib/active_record/configuration/settings.rb +0 -36
- data/lib/ddtrace/contrib/active_record/event.rb +0 -31
- data/lib/ddtrace/contrib/active_record/events/instantiation.rb +0 -61
- data/lib/ddtrace/contrib/active_record/events/sql.rb +0 -69
- data/lib/ddtrace/contrib/active_record/events.rb +0 -31
- data/lib/ddtrace/contrib/active_record/ext.rb +0 -25
- data/lib/ddtrace/contrib/active_record/integration.rb +0 -54
- data/lib/ddtrace/contrib/active_record/patcher.rb +0 -24
- data/lib/ddtrace/contrib/active_record/utils.rb +0 -124
- data/lib/ddtrace/contrib/active_support/cache/instrumentation.rb +0 -259
- data/lib/ddtrace/contrib/active_support/cache/patcher.rb +0 -70
- data/lib/ddtrace/contrib/active_support/cache/redis.rb +0 -44
- data/lib/ddtrace/contrib/active_support/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/active_support/ext.rb +0 -28
- data/lib/ddtrace/contrib/active_support/integration.rb +0 -47
- data/lib/ddtrace/contrib/active_support/notifications/event.rb +0 -76
- data/lib/ddtrace/contrib/active_support/notifications/subscriber.rb +0 -68
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +0 -164
- data/lib/ddtrace/contrib/active_support/patcher.rb +0 -24
- data/lib/ddtrace/contrib/analytics.rb +0 -25
- data/lib/ddtrace/contrib/auto_instrument.rb +0 -48
- data/lib/ddtrace/contrib/aws/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/aws/ext.rb +0 -24
- data/lib/ddtrace/contrib/aws/instrumentation.rb +0 -91
- data/lib/ddtrace/contrib/aws/integration.rb +0 -43
- data/lib/ddtrace/contrib/aws/parsed_context.rb +0 -57
- data/lib/ddtrace/contrib/aws/patcher.rb +0 -54
- data/lib/ddtrace/contrib/aws/services.rb +0 -119
- data/lib/ddtrace/contrib/concurrent_ruby/configuration/settings.rb +0 -21
- data/lib/ddtrace/contrib/concurrent_ruby/context_composite_executor_service.rb +0 -42
- data/lib/ddtrace/contrib/concurrent_ruby/ext.rb +0 -13
- data/lib/ddtrace/contrib/concurrent_ruby/future_patch.rb +0 -24
- data/lib/ddtrace/contrib/concurrent_ruby/integration.rb +0 -39
- data/lib/ddtrace/contrib/concurrent_ruby/patcher.rb +0 -30
- data/lib/ddtrace/contrib/configurable.rb +0 -103
- data/lib/ddtrace/contrib/configuration/resolver.rb +0 -82
- data/lib/ddtrace/contrib/configuration/resolvers/pattern_resolver.rb +0 -40
- data/lib/ddtrace/contrib/configuration/settings.rb +0 -56
- data/lib/ddtrace/contrib/dalli/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/dalli/ext.rb +0 -21
- data/lib/ddtrace/contrib/dalli/instrumentation.rb +0 -55
- data/lib/ddtrace/contrib/dalli/integration.rb +0 -39
- data/lib/ddtrace/contrib/dalli/patcher.rb +0 -26
- data/lib/ddtrace/contrib/dalli/quantize.rb +0 -23
- data/lib/ddtrace/contrib/delayed_job/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/delayed_job/ext.rb +0 -24
- data/lib/ddtrace/contrib/delayed_job/integration.rb +0 -39
- data/lib/ddtrace/contrib/delayed_job/patcher.rb +0 -29
- data/lib/ddtrace/contrib/delayed_job/plugin.rb +0 -85
- data/lib/ddtrace/contrib/elasticsearch/configuration/settings.rb +0 -32
- data/lib/ddtrace/contrib/elasticsearch/ext.rb +0 -23
- data/lib/ddtrace/contrib/elasticsearch/integration.rb +0 -40
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +0 -123
- data/lib/ddtrace/contrib/elasticsearch/quantize.rb +0 -84
- data/lib/ddtrace/contrib/ethon/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/ethon/easy_patch.rb +0 -152
- data/lib/ddtrace/contrib/ethon/ext.rb +0 -20
- data/lib/ddtrace/contrib/ethon/integration.rb +0 -44
- data/lib/ddtrace/contrib/ethon/multi_patch.rb +0 -85
- data/lib/ddtrace/contrib/ethon/patcher.rb +0 -27
- data/lib/ddtrace/contrib/excon/configuration/settings.rb +0 -34
- data/lib/ddtrace/contrib/excon/ext.rb +0 -18
- data/lib/ddtrace/contrib/excon/integration.rb +0 -44
- data/lib/ddtrace/contrib/excon/middleware.rb +0 -164
- data/lib/ddtrace/contrib/excon/patcher.rb +0 -28
- data/lib/ddtrace/contrib/extensions.rb +0 -169
- data/lib/ddtrace/contrib/faraday/configuration/settings.rb +0 -39
- data/lib/ddtrace/contrib/faraday/connection.rb +0 -19
- data/lib/ddtrace/contrib/faraday/ext.rb +0 -18
- data/lib/ddtrace/contrib/faraday/integration.rb +0 -44
- data/lib/ddtrace/contrib/faraday/middleware.rb +0 -86
- data/lib/ddtrace/contrib/faraday/patcher.rb +0 -54
- data/lib/ddtrace/contrib/faraday/rack_builder.rb +0 -19
- data/lib/ddtrace/contrib/grape/configuration/settings.rb +0 -39
- data/lib/ddtrace/contrib/grape/endpoint.rb +0 -246
- data/lib/ddtrace/contrib/grape/ext.rb +0 -24
- data/lib/ddtrace/contrib/grape/instrumentation.rb +0 -34
- data/lib/ddtrace/contrib/grape/integration.rb +0 -40
- data/lib/ddtrace/contrib/grape/patcher.rb +0 -32
- data/lib/ddtrace/contrib/graphql/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/graphql/ext.rb +0 -17
- data/lib/ddtrace/contrib/graphql/integration.rb +0 -40
- data/lib/ddtrace/contrib/graphql/patcher.rb +0 -61
- data/lib/ddtrace/contrib/grpc/configuration/settings.rb +0 -32
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/client.rb +0 -59
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +0 -80
- data/lib/ddtrace/contrib/grpc/datadog_interceptor.rb +0 -79
- data/lib/ddtrace/contrib/grpc/ext.rb +0 -19
- data/lib/ddtrace/contrib/grpc/integration.rb +0 -39
- data/lib/ddtrace/contrib/grpc/intercept_with_datadog.rb +0 -50
- data/lib/ddtrace/contrib/grpc/patcher.rb +0 -34
- data/lib/ddtrace/contrib/http/circuit_breaker.rb +0 -38
- data/lib/ddtrace/contrib/http/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/http/ext.rb +0 -18
- data/lib/ddtrace/contrib/http/instrumentation.rb +0 -180
- data/lib/ddtrace/contrib/http/integration.rb +0 -46
- data/lib/ddtrace/contrib/http/patcher.rb +0 -27
- data/lib/ddtrace/contrib/http_annotation_helper.rb +0 -11
- data/lib/ddtrace/contrib/httpclient/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/httpclient/ext.rb +0 -18
- data/lib/ddtrace/contrib/httpclient/instrumentation.rb +0 -148
- data/lib/ddtrace/contrib/httpclient/integration.rb +0 -44
- data/lib/ddtrace/contrib/httpclient/patcher.rb +0 -39
- data/lib/ddtrace/contrib/httprb/configuration/settings.rb +0 -33
- data/lib/ddtrace/contrib/httprb/ext.rb +0 -18
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +0 -158
- data/lib/ddtrace/contrib/httprb/integration.rb +0 -44
- data/lib/ddtrace/contrib/httprb/patcher.rb +0 -39
- data/lib/ddtrace/contrib/integration.rb +0 -17
- data/lib/ddtrace/contrib/kafka/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/kafka/consumer_event.rb +0 -15
- data/lib/ddtrace/contrib/kafka/consumer_group_event.rb +0 -15
- data/lib/ddtrace/contrib/kafka/event.rb +0 -52
- data/lib/ddtrace/contrib/kafka/events/connection/request.rb +0 -35
- data/lib/ddtrace/contrib/kafka/events/consumer/process_batch.rb +0 -42
- data/lib/ddtrace/contrib/kafka/events/consumer/process_message.rb +0 -40
- data/lib/ddtrace/contrib/kafka/events/consumer_group/heartbeat.rb +0 -40
- data/lib/ddtrace/contrib/kafka/events/consumer_group/join_group.rb +0 -30
- data/lib/ddtrace/contrib/kafka/events/consumer_group/leave_group.rb +0 -30
- data/lib/ddtrace/contrib/kafka/events/consumer_group/sync_group.rb +0 -30
- data/lib/ddtrace/contrib/kafka/events/produce_operation/send_messages.rb +0 -33
- data/lib/ddtrace/contrib/kafka/events/producer/deliver_messages.rb +0 -36
- data/lib/ddtrace/contrib/kafka/events.rb +0 -45
- data/lib/ddtrace/contrib/kafka/ext.rb +0 -42
- data/lib/ddtrace/contrib/kafka/integration.rb +0 -40
- data/lib/ddtrace/contrib/kafka/patcher.rb +0 -27
- data/lib/ddtrace/contrib/lograge/configuration/settings.rb +0 -19
- data/lib/ddtrace/contrib/lograge/ext.rb +0 -11
- data/lib/ddtrace/contrib/lograge/instrumentation.rb +0 -39
- data/lib/ddtrace/contrib/lograge/integration.rb +0 -46
- data/lib/ddtrace/contrib/lograge/patcher.rb +0 -26
- data/lib/ddtrace/contrib/mongodb/configuration/settings.rb +0 -34
- data/lib/ddtrace/contrib/mongodb/ext.rb +0 -24
- data/lib/ddtrace/contrib/mongodb/instrumentation.rb +0 -70
- data/lib/ddtrace/contrib/mongodb/integration.rb +0 -44
- data/lib/ddtrace/contrib/mongodb/parsers.rb +0 -69
- data/lib/ddtrace/contrib/mongodb/patcher.rb +0 -32
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +0 -112
- data/lib/ddtrace/contrib/mysql2/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/mysql2/ext.rb +0 -19
- data/lib/ddtrace/contrib/mysql2/instrumentation.rb +0 -65
- data/lib/ddtrace/contrib/mysql2/integration.rb +0 -39
- data/lib/ddtrace/contrib/mysql2/patcher.rb +0 -28
- data/lib/ddtrace/contrib/patchable.rb +0 -71
- data/lib/ddtrace/contrib/patcher.rb +0 -66
- data/lib/ddtrace/contrib/presto/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/presto/ext.rb +0 -29
- data/lib/ddtrace/contrib/presto/instrumentation.rb +0 -111
- data/lib/ddtrace/contrib/presto/integration.rb +0 -39
- data/lib/ddtrace/contrib/presto/patcher.rb +0 -34
- data/lib/ddtrace/contrib/qless/configuration/settings.rb +0 -36
- data/lib/ddtrace/contrib/qless/ext.rb +0 -21
- data/lib/ddtrace/contrib/qless/integration.rb +0 -39
- data/lib/ddtrace/contrib/qless/patcher.rb +0 -35
- data/lib/ddtrace/contrib/qless/qless_job.rb +0 -74
- data/lib/ddtrace/contrib/qless/tracer_cleaner.rb +0 -34
- data/lib/ddtrace/contrib/que/configuration/settings.rb +0 -44
- data/lib/ddtrace/contrib/que/ext.rb +0 -31
- data/lib/ddtrace/contrib/que/integration.rb +0 -43
- data/lib/ddtrace/contrib/que/patcher.rb +0 -25
- data/lib/ddtrace/contrib/que/tracer.rb +0 -58
- data/lib/ddtrace/contrib/racecar/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/racecar/event.rb +0 -77
- data/lib/ddtrace/contrib/racecar/events/batch.rb +0 -28
- data/lib/ddtrace/contrib/racecar/events/consume.rb +0 -28
- data/lib/ddtrace/contrib/racecar/events/message.rb +0 -28
- data/lib/ddtrace/contrib/racecar/events.rb +0 -33
- data/lib/ddtrace/contrib/racecar/ext.rb +0 -26
- data/lib/ddtrace/contrib/racecar/integration.rb +0 -40
- data/lib/ddtrace/contrib/racecar/patcher.rb +0 -27
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +0 -47
- data/lib/ddtrace/contrib/rack/ext.rb +0 -22
- data/lib/ddtrace/contrib/rack/integration.rb +0 -46
- data/lib/ddtrace/contrib/rack/middlewares.rb +0 -288
- data/lib/ddtrace/contrib/rack/patcher.rb +0 -106
- data/lib/ddtrace/contrib/rack/request_queue.rb +0 -45
- data/lib/ddtrace/contrib/rails/auto_instrument_railtie.rb +0 -10
- data/lib/ddtrace/contrib/rails/configuration/settings.rb +0 -101
- data/lib/ddtrace/contrib/rails/ext.rb +0 -18
- data/lib/ddtrace/contrib/rails/framework.rb +0 -172
- data/lib/ddtrace/contrib/rails/integration.rb +0 -45
- data/lib/ddtrace/contrib/rails/log_injection.rb +0 -42
- data/lib/ddtrace/contrib/rails/middlewares.rb +0 -44
- data/lib/ddtrace/contrib/rails/patcher.rb +0 -119
- data/lib/ddtrace/contrib/rails/railtie.rb +0 -18
- data/lib/ddtrace/contrib/rails/utils.rb +0 -25
- data/lib/ddtrace/contrib/rake/configuration/settings.rb +0 -32
- data/lib/ddtrace/contrib/rake/ext.rb +0 -22
- data/lib/ddtrace/contrib/rake/instrumentation.rb +0 -91
- data/lib/ddtrace/contrib/rake/integration.rb +0 -39
- data/lib/ddtrace/contrib/rake/patcher.rb +0 -31
- data/lib/ddtrace/contrib/redis/configuration/resolver.rb +0 -46
- data/lib/ddtrace/contrib/redis/configuration/settings.rb +0 -36
- data/lib/ddtrace/contrib/redis/ext.rb +0 -23
- data/lib/ddtrace/contrib/redis/instrumentation.rb +0 -90
- data/lib/ddtrace/contrib/redis/integration.rb +0 -43
- data/lib/ddtrace/contrib/redis/patcher.rb +0 -33
- data/lib/ddtrace/contrib/redis/quantize.rb +0 -76
- data/lib/ddtrace/contrib/redis/tags.rb +0 -47
- data/lib/ddtrace/contrib/redis/vendor/resolver.rb +0 -159
- data/lib/ddtrace/contrib/registerable.rb +0 -33
- data/lib/ddtrace/contrib/registry.rb +0 -43
- data/lib/ddtrace/contrib/resque/configuration/settings.rb +0 -49
- data/lib/ddtrace/contrib/resque/ext.rb +0 -18
- data/lib/ddtrace/contrib/resque/integration.rb +0 -44
- data/lib/ddtrace/contrib/resque/patcher.rb +0 -30
- data/lib/ddtrace/contrib/resque/resque_job.rb +0 -104
- data/lib/ddtrace/contrib/rest_client/configuration/settings.rb +0 -32
- data/lib/ddtrace/contrib/rest_client/ext.rb +0 -18
- data/lib/ddtrace/contrib/rest_client/integration.rb +0 -39
- data/lib/ddtrace/contrib/rest_client/patcher.rb +0 -25
- data/lib/ddtrace/contrib/rest_client/request_patch.rb +0 -92
- data/lib/ddtrace/contrib/semantic_logger/configuration/settings.rb +0 -19
- data/lib/ddtrace/contrib/semantic_logger/ext.rb +0 -11
- data/lib/ddtrace/contrib/semantic_logger/instrumentation.rb +0 -43
- data/lib/ddtrace/contrib/semantic_logger/integration.rb +0 -48
- data/lib/ddtrace/contrib/semantic_logger/patcher.rb +0 -26
- data/lib/ddtrace/contrib/sequel/configuration/settings.rb +0 -29
- data/lib/ddtrace/contrib/sequel/database.rb +0 -64
- data/lib/ddtrace/contrib/sequel/dataset.rb +0 -64
- data/lib/ddtrace/contrib/sequel/ext.rb +0 -20
- data/lib/ddtrace/contrib/sequel/integration.rb +0 -39
- data/lib/ddtrace/contrib/sequel/patcher.rb +0 -34
- data/lib/ddtrace/contrib/sequel/utils.rb +0 -75
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +0 -32
- data/lib/ddtrace/contrib/shoryuken/ext.rb +0 -22
- data/lib/ddtrace/contrib/shoryuken/integration.rb +0 -40
- data/lib/ddtrace/contrib/shoryuken/patcher.rb +0 -25
- data/lib/ddtrace/contrib/shoryuken/tracer.rb +0 -56
- data/lib/ddtrace/contrib/sidekiq/client_tracer.rb +0 -44
- data/lib/ddtrace/contrib/sidekiq/configuration/settings.rb +0 -38
- data/lib/ddtrace/contrib/sidekiq/ext.rb +0 -31
- data/lib/ddtrace/contrib/sidekiq/integration.rb +0 -49
- data/lib/ddtrace/contrib/sidekiq/patcher.rb +0 -68
- data/lib/ddtrace/contrib/sidekiq/server_internal_tracer/heartbeat.rb +0 -30
- data/lib/ddtrace/contrib/sidekiq/server_internal_tracer/job_fetch.rb +0 -30
- data/lib/ddtrace/contrib/sidekiq/server_internal_tracer/scheduled_push.rb +0 -29
- data/lib/ddtrace/contrib/sidekiq/server_tracer.rb +0 -66
- data/lib/ddtrace/contrib/sidekiq/tracing.rb +0 -45
- data/lib/ddtrace/contrib/sinatra/configuration/settings.rb +0 -40
- data/lib/ddtrace/contrib/sinatra/env.rb +0 -59
- data/lib/ddtrace/contrib/sinatra/ext.rb +0 -28
- data/lib/ddtrace/contrib/sinatra/headers.rb +0 -30
- data/lib/ddtrace/contrib/sinatra/integration.rb +0 -39
- data/lib/ddtrace/contrib/sinatra/patcher.rb +0 -30
- data/lib/ddtrace/contrib/sinatra/tracer.rb +0 -150
- data/lib/ddtrace/contrib/sinatra/tracer_middleware.rb +0 -112
- data/lib/ddtrace/contrib/sneakers/configuration/settings.rb +0 -34
- data/lib/ddtrace/contrib/sneakers/ext.rb +0 -23
- data/lib/ddtrace/contrib/sneakers/integration.rb +0 -42
- data/lib/ddtrace/contrib/sneakers/patcher.rb +0 -25
- data/lib/ddtrace/contrib/sneakers/tracer.rb +0 -54
- data/lib/ddtrace/contrib/status_code_matcher.rb +0 -70
- data/lib/ddtrace/contrib/sucker_punch/configuration/settings.rb +0 -31
- data/lib/ddtrace/contrib/sucker_punch/exception_handler.rb +0 -25
- data/lib/ddtrace/contrib/sucker_punch/ext.rb +0 -22
- data/lib/ddtrace/contrib/sucker_punch/instrumentation.rb +0 -89
- data/lib/ddtrace/contrib/sucker_punch/integration.rb +0 -39
- data/lib/ddtrace/contrib/sucker_punch/patcher.rb +0 -44
- data/lib/ddtrace/correlation.rb +0 -40
- data/lib/ddtrace/diagnostics/environment_logger.rb +0 -280
- data/lib/ddtrace/diagnostics/health.rb +0 -34
- data/lib/ddtrace/distributed_tracing/headers/b3.rb +0 -45
- data/lib/ddtrace/distributed_tracing/headers/b3_single.rb +0 -57
- data/lib/ddtrace/distributed_tracing/headers/datadog.rb +0 -43
- data/lib/ddtrace/distributed_tracing/headers/headers.rb +0 -72
- data/lib/ddtrace/distributed_tracing/headers/helpers.rb +0 -44
- data/lib/ddtrace/encoding.rb +0 -72
- data/lib/ddtrace/error.rb +0 -97
- data/lib/ddtrace/event.rb +0 -53
- data/lib/ddtrace/ext/analytics.rb +0 -13
- data/lib/ddtrace/ext/app_types.rb +0 -12
- data/lib/ddtrace/ext/correlation.rb +0 -12
- data/lib/ddtrace/ext/diagnostics.rb +0 -37
- data/lib/ddtrace/ext/distributed.rb +0 -40
- data/lib/ddtrace/ext/environment.rb +0 -24
- data/lib/ddtrace/ext/errors.rb +0 -11
- data/lib/ddtrace/ext/forced_tracing.rb +0 -26
- data/lib/ddtrace/ext/git.rb +0 -32
- data/lib/ddtrace/ext/http.rb +0 -47
- data/lib/ddtrace/ext/integration.rb +0 -9
- data/lib/ddtrace/ext/manual_tracing.rb +0 -10
- data/lib/ddtrace/ext/metrics.rb +0 -16
- data/lib/ddtrace/ext/net.rb +0 -11
- data/lib/ddtrace/ext/priority.rb +0 -19
- data/lib/ddtrace/ext/profiling.rb +0 -53
- data/lib/ddtrace/ext/runtime.rb +0 -25
- data/lib/ddtrace/ext/sampling.rb +0 -17
- data/lib/ddtrace/ext/sql.rb +0 -9
- data/lib/ddtrace/ext/test.rb +0 -9
- data/lib/ddtrace/ext/transport.rb +0 -32
- data/lib/ddtrace/forced_tracing.rb +0 -39
- data/lib/ddtrace/logger.rb +0 -41
- data/lib/ddtrace/metrics.rb +0 -282
- data/lib/ddtrace/opentelemetry/extensions.rb +0 -14
- data/lib/ddtrace/opentelemetry/span.rb +0 -34
- data/lib/ddtrace/opentracer/carrier.rb +0 -7
- data/lib/ddtrace/opentracer/distributed_headers.rb +0 -56
- data/lib/ddtrace/opentracer/global_tracer.rb +0 -16
- data/lib/ddtrace/opentracer/propagator.rb +0 -23
- data/lib/ddtrace/opentracer/rack_propagator.rb +0 -61
- data/lib/ddtrace/opentracer/scope.rb +0 -16
- data/lib/ddtrace/opentracer/scope_manager.rb +0 -7
- data/lib/ddtrace/opentracer/span.rb +0 -95
- data/lib/ddtrace/opentracer/span_context.rb +0 -15
- data/lib/ddtrace/opentracer/span_context_factory.rb +0 -24
- data/lib/ddtrace/opentracer/text_map_propagator.rb +0 -76
- data/lib/ddtrace/opentracer/thread_local_scope.rb +0 -32
- data/lib/ddtrace/opentracer/thread_local_scope_manager.rb +0 -41
- data/lib/ddtrace/opentracer/tracer.rb +0 -209
- data/lib/ddtrace/opentracer.rb +0 -22
- data/lib/ddtrace/patcher.rb +0 -69
- data/lib/ddtrace/pin.rb +0 -86
- data/lib/ddtrace/pipeline/span_filter.rb +0 -39
- data/lib/ddtrace/pipeline/span_processor.rb +0 -21
- data/lib/ddtrace/pipeline.rb +0 -47
- data/lib/ddtrace/profiling/buffer.rb +0 -42
- data/lib/ddtrace/profiling/collectors/stack.rb +0 -297
- data/lib/ddtrace/profiling/encoding/profile.rb +0 -46
- data/lib/ddtrace/profiling/events/stack.rb +0 -81
- data/lib/ddtrace/profiling/exporter.rb +0 -24
- data/lib/ddtrace/profiling/flush.rb +0 -44
- data/lib/ddtrace/profiling/pprof/builder.rb +0 -126
- data/lib/ddtrace/profiling/pprof/converter.rb +0 -103
- data/lib/ddtrace/profiling/pprof/message_set.rb +0 -15
- data/lib/ddtrace/profiling/pprof/pprof_pb.rb +0 -82
- data/lib/ddtrace/profiling/pprof/stack_sample.rb +0 -140
- data/lib/ddtrace/profiling/pprof/string_table.rb +0 -11
- data/lib/ddtrace/profiling/pprof/template.rb +0 -119
- data/lib/ddtrace/profiling/profiler.rb +0 -31
- data/lib/ddtrace/profiling/recorder.rb +0 -96
- data/lib/ddtrace/profiling/scheduler.rb +0 -150
- data/lib/ddtrace/profiling/tasks/setup.rb +0 -90
- data/lib/ddtrace/profiling/trace_identifiers/ddtrace.rb +0 -42
- data/lib/ddtrace/profiling/trace_identifiers/helper.rb +0 -46
- data/lib/ddtrace/profiling/transport/http/api/endpoint.rb +0 -94
- data/lib/ddtrace/profiling/transport/http/api/instance.rb +0 -37
- data/lib/ddtrace/profiling/transport/http/api.rb +0 -44
- data/lib/ddtrace/profiling/transport/http/builder.rb +0 -29
- data/lib/ddtrace/profiling/transport/http/client.rb +0 -34
- data/lib/ddtrace/profiling/transport/http/response.rb +0 -22
- data/lib/ddtrace/profiling/transport/http.rb +0 -111
- data/lib/ddtrace/profiling/transport/io/client.rb +0 -28
- data/lib/ddtrace/profiling/transport/io/response.rb +0 -17
- data/lib/ddtrace/profiling/transport/io.rb +0 -31
- data/lib/ddtrace/profiling/transport/request.rb +0 -16
- data/lib/ddtrace/profiling.rb +0 -149
- data/lib/ddtrace/propagation/grpc_propagator.rb +0 -75
- data/lib/ddtrace/propagation/http_propagator.rb +0 -91
- data/lib/ddtrace/quantization/hash.rb +0 -104
- data/lib/ddtrace/quantization/http.rb +0 -90
- data/lib/ddtrace/runtime/metrics.rb +0 -135
- data/lib/ddtrace/sampler.rb +0 -303
- data/lib/ddtrace/sampling/matcher.rb +0 -58
- data/lib/ddtrace/sampling/rate_limiter.rb +0 -177
- data/lib/ddtrace/sampling/rule.rb +0 -62
- data/lib/ddtrace/sampling/rule_sampler.rb +0 -133
- data/lib/ddtrace/sampling.rb +0 -3
- data/lib/ddtrace/span.rb +0 -445
- data/lib/ddtrace/sync_writer.rb +0 -69
- data/lib/ddtrace/tasks/exec.rb +0 -47
- data/lib/ddtrace/tasks/help.rb +0 -15
- data/lib/ddtrace/tracer.rb +0 -449
- data/lib/ddtrace/utils/compression.rb +0 -28
- data/lib/ddtrace/utils/database.rb +0 -26
- data/lib/ddtrace/utils/forking.rb +0 -53
- data/lib/ddtrace/utils/object_set.rb +0 -40
- data/lib/ddtrace/utils/only_once.rb +0 -41
- data/lib/ddtrace/utils/sequence.rb +0 -18
- data/lib/ddtrace/utils/string_table.rb +0 -46
- data/lib/ddtrace/utils/time.rb +0 -51
- data/lib/ddtrace/utils.rb +0 -80
- data/lib/ddtrace/vendor/active_record/connection_specification.rb +0 -302
- data/lib/ddtrace/vendor/multipart-post/multipart/post/composite_read_io.rb +0 -117
- data/lib/ddtrace/vendor/multipart-post/multipart/post/multipartable.rb +0 -58
- data/lib/ddtrace/vendor/multipart-post/multipart/post/parts.rb +0 -136
- data/lib/ddtrace/vendor/multipart-post/multipart/post/version.rb +0 -10
- data/lib/ddtrace/vendor/multipart-post/multipart/post.rb +0 -9
- data/lib/ddtrace/vendor/multipart-post/multipart.rb +0 -13
- data/lib/ddtrace/vendor/multipart-post/net/http/post/multipart.rb +0 -33
- data/lib/ddtrace/worker.rb +0 -21
- data/lib/ddtrace/workers/async.rb +0 -175
- data/lib/ddtrace/workers/interval_loop.rb +0 -116
- data/lib/ddtrace/workers/polling.rb +0 -56
- data/lib/ddtrace/workers/queue.rb +0 -41
- data/lib/ddtrace/workers/runtime_metrics.rb +0 -65
- data/lib/ddtrace/workers/trace_writer.rb +0 -200
- data/lib/ddtrace/workers.rb +0 -123
- data/lib/ddtrace/writer.rb +0 -200
data/docs/GettingStarted.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
***Version 1.0.0 is in beta! Check out our [upgrade guide](https://github.com/DataDog/dd-trace-rb/blob/master/docs/UpgradeGuide.md#from-0x-to-10) for more details.***
|
2
|
+
|
1
3
|
# Datadog Ruby Trace Client
|
2
4
|
|
3
5
|
`ddtrace` is Datadog’s tracing client for Ruby. It is used to trace requests as they flow across web servers,
|
@@ -9,6 +11,8 @@ For the general APM documentation, see our [setup documentation][setup docs].
|
|
9
11
|
|
10
12
|
For more information about what APM looks like once your application is sending information to Datadog, take a look at [Visualizing your APM data][visualization docs].
|
11
13
|
|
14
|
+
For the library API documentation, see our [YARD documentation][yard docs].
|
15
|
+
|
12
16
|
To contribute, check out the [contribution guidelines][contribution docs] and [development guide][development docs].
|
13
17
|
|
14
18
|
[setup docs]: https://docs.datadoghq.com/tracing/
|
@@ -16,6 +20,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
16
20
|
[visualization docs]: https://docs.datadoghq.com/tracing/visualization/
|
17
21
|
[contribution docs]: https://github.com/DataDog/dd-trace-rb/blob/master/CONTRIBUTING.md
|
18
22
|
[development docs]: https://github.com/DataDog/dd-trace-rb/blob/master/docs/DevelopmentGuide.md
|
23
|
+
[yard docs]: https://www.rubydoc.info/gems/ddtrace/
|
19
24
|
|
20
25
|
## Table of Contents
|
21
26
|
|
@@ -27,11 +32,11 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
27
32
|
- [Manual instrumentation](#manual-instrumentation)
|
28
33
|
- [Integration instrumentation](#integration-instrumentation)
|
29
34
|
- [Action Cable](#action-cable)
|
30
|
-
- [Action View](#action-view)
|
31
35
|
- [Action Mailer](#action-mailer)
|
32
|
-
- [Active Model Serializers](#active-model-serializers)
|
33
36
|
- [Action Pack](#action-pack)
|
37
|
+
- [Action View](#action-view)
|
34
38
|
- [Active Job](#active-job)
|
39
|
+
- [Active Model Serializers](#active-model-serializers)
|
35
40
|
- [Active Record](#active-record)
|
36
41
|
- [Active Support](#active-support)
|
37
42
|
- [AWS](#aws)
|
@@ -49,6 +54,7 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
49
54
|
- [http.rb](#httprb)
|
50
55
|
- [httpclient](#httpclient)
|
51
56
|
- [httpx](#httpx)
|
57
|
+
- [Kafka](#kafka)
|
52
58
|
- [MongoDB](#mongodb)
|
53
59
|
- [MySQL2](#mysql2)
|
54
60
|
- [Net/HTTP](#nethttp)
|
@@ -60,11 +66,11 @@ To contribute, check out the [contribution guidelines][contribution docs] and [d
|
|
60
66
|
- [Rails](#rails)
|
61
67
|
- [Rake](#rake)
|
62
68
|
- [Redis](#redis)
|
63
|
-
- [Rest Client](#rest-client)
|
64
69
|
- [Resque](#resque)
|
70
|
+
- [Rest Client](#rest-client)
|
65
71
|
- [RSpec](#rspec)
|
66
|
-
- [Shoryuken](#shoryuken)
|
67
72
|
- [Sequel](#sequel)
|
73
|
+
- [Shoryuken](#shoryuken)
|
68
74
|
- [Sidekiq](#sidekiq)
|
69
75
|
- [Sinatra](#sinatra)
|
70
76
|
- [Sneakers](#sneakers)
|
@@ -193,7 +199,7 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
193
199
|
```ruby
|
194
200
|
Datadog.configure do |c|
|
195
201
|
# This will activate auto-instrumentation for Rails
|
196
|
-
c.
|
202
|
+
c.tracing.instrument :rails
|
197
203
|
end
|
198
204
|
```
|
199
205
|
|
@@ -243,8 +249,8 @@ Install and configure the Datadog Agent to receive traces from your now instrume
|
|
243
249
|
|
244
250
|
```ruby
|
245
251
|
require 'opentracing'
|
246
|
-
require '
|
247
|
-
require '
|
252
|
+
require 'datadog/tracing'
|
253
|
+
require 'datadog/opentracer'
|
248
254
|
|
249
255
|
# Activate the Datadog tracer for OpenTracing
|
250
256
|
OpenTracing.global_tracer = Datadog::OpenTracer::Tracer.new
|
@@ -274,10 +280,10 @@ After setting up, your services will appear on the [APM services page](https://a
|
|
274
280
|
|
275
281
|
If you aren't using a supported framework instrumentation, you may want to manually instrument your code.
|
276
282
|
|
277
|
-
To trace any Ruby code, you can use the `Datadog.
|
283
|
+
To trace any Ruby code, you can use the `Datadog::Tracing.trace` method:
|
278
284
|
|
279
285
|
```ruby
|
280
|
-
Datadog.
|
286
|
+
Datadog::Tracing.trace(name, options) do |span, trace|
|
281
287
|
# Wrap this block around the code you want to instrument
|
282
288
|
# Additionally, you can modify the span here.
|
283
289
|
# e.g. Change the resource name, set tags, etc...
|
@@ -289,14 +295,15 @@ Where `name` should be a `String` that describes the generic kind of operation b
|
|
289
295
|
And `options` is an optional `Hash` that accepts the following parameters:
|
290
296
|
|
291
297
|
| Key | Type | Description | Default |
|
292
|
-
|
|
293
|
-
| `
|
294
|
-
| `
|
295
|
-
| `
|
296
|
-
| `
|
297
|
-
| `
|
298
|
-
| `
|
299
|
-
| `
|
298
|
+
| --------------- | ----------------------- | --- | --- |
|
299
|
+
| `autostart` | `Bool` | Whether the time measurement should be started automatically. If `false`, user must call `span.start`. | `true` |
|
300
|
+
| `continue_from` | `Datadog::TraceDigest` | Continues a trace that originated from another execution context. TraceDigest describes the continuation point. | `nil` |
|
301
|
+
| `on_error` | `Proc` | Overrides error handling behavior, when a span 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? }` |
|
302
|
+
| `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. |
|
303
|
+
| `service` | `String` | The service name which this span belongs (e.g. `'my-web-service'`) | Tracer `default-service`, `$PROGRAM_NAME` or `'ruby'` |
|
304
|
+
| `start_time` | `Time` | When the span actually starts. Useful when tracing events that have already happened. | `Time.now` |
|
305
|
+
| `tags` | `Hash` | Extra tags which should be added to the span. | `{}` |
|
306
|
+
| `type` | `String` | The type of the span (such as `'http'`, `'db'`, etc.) | `nil` |
|
300
307
|
|
301
308
|
It's highly recommended you set both `service` and `resource` at a minimum. Spans without a `service` or `resource` as `nil` will be discarded by the Datadog agent.
|
302
309
|
|
@@ -304,9 +311,9 @@ Example of manual instrumentation in action:
|
|
304
311
|
|
305
312
|
```ruby
|
306
313
|
get '/posts' do
|
307
|
-
Datadog.
|
314
|
+
Datadog::Tracing.trace('web.request', service: 'my-blog', resource: 'GET /posts') do |span|
|
308
315
|
# Trace the activerecord call
|
309
|
-
Datadog.
|
316
|
+
Datadog::Tracing.trace('posts.fetch') do
|
310
317
|
@posts = Posts.order(created_at: :desc).limit(10)
|
311
318
|
end
|
312
319
|
|
@@ -315,7 +322,7 @@ get '/posts' do
|
|
315
322
|
span.set_tag('posts.count', @posts.length)
|
316
323
|
|
317
324
|
# Trace the template rendering
|
318
|
-
Datadog.
|
325
|
+
Datadog::Tracing.trace('template.render') do
|
319
326
|
erb :index
|
320
327
|
end
|
321
328
|
end
|
@@ -324,37 +331,36 @@ end
|
|
324
331
|
|
325
332
|
### Asynchronous tracing
|
326
333
|
|
327
|
-
It might not always be possible to wrap `Datadog.
|
334
|
+
It might not always be possible to wrap `Datadog::Tracing.trace` around a block of code. Some event or notification based instrumentation might only notify you when an event begins or ends.
|
328
335
|
|
329
|
-
To trace these operations, you can trace code asynchronously by calling `Datadog.
|
336
|
+
To trace these operations, you can trace code asynchronously by calling `Datadog::Tracing.trace` without a block:
|
330
337
|
|
331
338
|
```ruby
|
332
339
|
# Some instrumentation framework calls this after an event finishes...
|
333
340
|
def db_query(start, finish, query)
|
334
|
-
span = Datadog.
|
341
|
+
span = Datadog::Tracing.trace('database.query', start_time: start)
|
335
342
|
span.resource = query
|
336
|
-
span.start_time = start
|
337
343
|
span.finish(finish)
|
338
344
|
end
|
339
345
|
```
|
340
346
|
|
341
|
-
Calling `Datadog.
|
347
|
+
Calling `Datadog::Tracing.trace` without a block will cause the function to return a `Datadog::SpanOperation` that is started, but not finished. You can then modify this span however you wish, then close it `finish`.
|
342
348
|
|
343
349
|
*You must not leave any unfinished spans.* If any spans are left open when the trace completes, the trace will be discarded. You can [activate debug mode](#tracer-settings) to check for warnings if you suspect this might be happening.
|
344
350
|
|
345
|
-
To avoid this scenario when handling start/finish events, you can use `Datadog.
|
351
|
+
To avoid this scenario when handling start/finish events, you can use `Datadog::Tracing.active_span` to get the current active span.
|
346
352
|
|
347
353
|
```ruby
|
348
354
|
# e.g. ActiveSupport::Notifications calls this when an event starts
|
349
355
|
def start(name, id, payload)
|
350
356
|
# Start a span
|
351
|
-
Datadog.
|
357
|
+
Datadog::Tracing.trace(name)
|
352
358
|
end
|
353
359
|
|
354
360
|
# e.g. ActiveSupport::Notifications calls this when an event finishes
|
355
361
|
def finish(name, id, payload)
|
356
362
|
# Retrieve current active span (thread-safe)
|
357
|
-
current_span = Datadog.
|
363
|
+
current_span = Datadog::Tracing.active_span
|
358
364
|
unless current_span.nil?
|
359
365
|
current_span.resource = payload[:query]
|
360
366
|
current_span.finish
|
@@ -368,17 +374,16 @@ You can tag additional information to the current active span from any method. N
|
|
368
374
|
```ruby
|
369
375
|
# e.g. adding tag to active span
|
370
376
|
|
371
|
-
current_span = Datadog.
|
377
|
+
current_span = Datadog::Tracing.active_span
|
372
378
|
current_span.set_tag('my_tag', 'my_value') unless current_span.nil?
|
373
379
|
```
|
374
380
|
|
375
|
-
You can also get the
|
381
|
+
You can also get the current active trace using the `active_trace` method. This method will return `nil` if there is no active trace.
|
376
382
|
|
377
383
|
```ruby
|
378
|
-
# e.g.
|
384
|
+
# e.g. accessing active trace
|
379
385
|
|
380
|
-
|
381
|
-
current_root_span.set_tag('my_tag', 'my_value') unless current_root_span.nil?
|
386
|
+
current_trace = Datadog::Tracing.active_trace
|
382
387
|
```
|
383
388
|
|
384
389
|
## Integration instrumentation
|
@@ -388,7 +393,7 @@ Many popular libraries and frameworks are supported out-of-the-box, which can be
|
|
388
393
|
```ruby
|
389
394
|
Datadog.configure do |c|
|
390
395
|
# Activates and configures an integration
|
391
|
-
c.
|
396
|
+
c.tracing.instrument :integration_name, options
|
392
397
|
end
|
393
398
|
```
|
394
399
|
|
@@ -396,94 +401,86 @@ end
|
|
396
401
|
|
397
402
|
For a list of available integrations, and their configuration options, please refer to the following:
|
398
403
|
|
399
|
-
| Name
|
400
|
-
|
|
401
|
-
| Action Cable
|
402
|
-
| Action Mailer
|
403
|
-
| Action
|
404
|
-
|
|
405
|
-
|
|
406
|
-
| Active
|
407
|
-
| Active Record
|
408
|
-
| Active Support
|
409
|
-
| AWS
|
410
|
-
| Concurrent Ruby
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
The Action Cable integration traces broadcast messages and channel actions.
|
450
|
-
|
451
|
-
You can enable it through `Datadog.configure`:
|
404
|
+
| Name | Key | Versions Supported: MRI | Versions Supported: JRuby | How to configure | Gem source |
|
405
|
+
| -------------------------- | -------------------------- | ------------------------ | --------------------------| ----------------------------------- | ------------------------------------------------------------------------------ |
|
406
|
+
| Action Cable | `action_cable` | `>= 5.0` | `>= 5.0` | *[Link](#action-cable)* | *[Link](https://github.com/rails/rails/tree/master/actioncable)* |
|
407
|
+
| Action Mailer | `action_mailer` | `>= 5.0` | `>= 5.0` | *[Link](#action-mailer)* | *[Link](https://github.com/rails/rails/tree/master/actionmailer)* |
|
408
|
+
| Action Pack | `action_pack` | `>= 3.2` | `>= 3.2` | *[Link](#action-pack)* | *[Link](https://github.com/rails/rails/tree/master/actionpack)* |
|
409
|
+
| Action View | `action_view` | `>= 3.2` | `>= 3.2` | *[Link](#action-view)* | *[Link](https://github.com/rails/rails/tree/master/actionview)* |
|
410
|
+
| Active Job | `active_job` | `>= 4.2` | `>= 4.2` | *[Link](#active-job)* | *[Link](https://github.com/rails/rails/tree/master/activejob)* |
|
411
|
+
| Active Model Serializers | `active_model_serializers` | `>= 0.9` | `>= 0.9` | *[Link](#active-model-serializers)* | *[Link](https://github.com/rails-api/active_model_serializers)* |
|
412
|
+
| Active Record | `active_record` | `>= 3.2` | `>= 3.2` | *[Link](#active-record)* | *[Link](https://github.com/rails/rails/tree/master/activerecord)* |
|
413
|
+
| Active Support | `active_support` | `>= 3.2` | `>= 3.2` | *[Link](#active-support)* | *[Link](https://github.com/rails/rails/tree/master/activesupport)* |
|
414
|
+
| AWS | `aws` | `>= 2.0` | `>= 2.0` | *[Link](#aws)* | *[Link](https://github.com/aws/aws-sdk-ruby)* |
|
415
|
+
| Concurrent Ruby | `concurrent_ruby` | `>= 0.9` | `>= 0.9` | *[Link](#concurrent-ruby)* | *[Link](https://github.com/ruby-concurrency/concurrent-ruby)* |
|
416
|
+
| Dalli | `dalli` | `>= 2.0` | `>= 2.0` | *[Link](#dalli)* | *[Link](https://github.com/petergoldstein/dalli)* |
|
417
|
+
| DelayedJob | `delayed_job` | `>= 4.1` | `>= 4.1` | *[Link](#delayedjob)* | *[Link](https://github.com/collectiveidea/delayed_job)* |
|
418
|
+
| Elasticsearch | `elasticsearch` | `>= 1.0` | `>= 1.0` | *[Link](#elasticsearch)* | *[Link](https://github.com/elastic/elasticsearch-ruby)* |
|
419
|
+
| Ethon | `ethon` | `>= 0.11` | `>= 0.11` | *[Link](#ethon)* | *[Link](https://github.com/typhoeus/ethon)* |
|
420
|
+
| Excon | `excon` | `>= 0.50` | `>= 0.50` | *[Link](#excon)* | *[Link](https://github.com/excon/excon)* |
|
421
|
+
| Faraday | `faraday` | `>= 0.14` | `>= 0.14` | *[Link](#faraday)* | *[Link](https://github.com/lostisland/faraday)* |
|
422
|
+
| Grape | `grape` | `>= 1.0` | `>= 1.0` | *[Link](#grape)* | *[Link](https://github.com/ruby-grape/grape)* |
|
423
|
+
| GraphQL | `graphql` | `>= 1.7.9` | `>= 1.7.9` | *[Link](#graphql)* | *[Link](https://github.com/rmosolgo/graphql-ruby)* |
|
424
|
+
| gRPC | `grpc` | `>= 1.7` | *gem not available* | *[Link](#grpc)* | *[Link](https://github.com/grpc/grpc/tree/master/src/rubyc)* |
|
425
|
+
| http.rb | `httprb` | `>= 2.0` | `>= 2.0` | *[Link](#httprb)* | *[Link](https://github.com/httprb/http)* |
|
426
|
+
| httpclient | `httpclient` | `>= 2.2` | `>= 2.2` | *[Link](#httpclient)* | *[Link](https://github.com/nahi/httpclient)* |
|
427
|
+
| httpx | `httpx` | `>= 0.11` | `>= 0.11` | *[Link](#httpx)* | *[Link](https://gitlab.com/honeyryderchuck/httpx)* |
|
428
|
+
| Kafka | `ruby-kafka` | `>= 0.7.10` | `>= 0.7.10` | *[Link](#kafka)* | *[Link](https://github.com/zendesk/ruby-kafka)* |
|
429
|
+
| Makara (via Active Record) | `makara` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#active-record)* | *[Link](https://github.com/instacart/makara)* |
|
430
|
+
| MongoDB | `mongo` | `>= 2.1` | `>= 2.1` | *[Link](#mongodb)* | *[Link](https://github.com/mongodb/mongo-ruby-driver)* |
|
431
|
+
| MySQL2 | `mysql2` | `>= 0.3.21` | *gem not available* | *[Link](#mysql2)* | *[Link](https://github.com/brianmario/mysql2)* |
|
432
|
+
| 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)* |
|
433
|
+
| Presto | `presto` | `>= 0.5.14` | `>= 0.5.14` | *[Link](#presto)* | *[Link](https://github.com/treasure-data/presto-client-ruby)* |
|
434
|
+
| Qless | `qless` | `>= 0.10.0` | `>= 0.10.0` | *[Link](#qless)* | *[Link](https://github.com/seomoz/qless)* |
|
435
|
+
| Que | `que` | `>= 1.0.0.beta2` | `>= 1.0.0.beta2` | *[Link](#que)* | *[Link](https://github.com/que-rb/que)* |
|
436
|
+
| Racecar | `racecar` | `>= 0.3.5` | `>= 0.3.5` | *[Link](#racecar)* | *[Link](https://github.com/zendesk/racecar)* |
|
437
|
+
| Rack | `rack` | `>= 1.1` | `>= 1.1` | *[Link](#rack)* | *[Link](https://github.com/rack/rack)* |
|
438
|
+
| Rails | `rails` | `>= 3.2` | `>= 3.2` | *[Link](#rails)* | *[Link](https://github.com/rails/rails)* |
|
439
|
+
| Rake | `rake` | `>= 12.0` | `>= 12.0` | *[Link](#rake)* | *[Link](https://github.com/ruby/rake)* |
|
440
|
+
| Redis | `redis` | `>= 3.2` | `>= 3.2` | *[Link](#redis)* | *[Link](https://github.com/redis/redis-rb)* |
|
441
|
+
| Resque | `resque` | `>= 1.0` | `>= 1.0` | *[Link](#resque)* | *[Link](https://github.com/resque/resque)* |
|
442
|
+
| Rest Client | `rest-client` | `>= 1.8` | `>= 1.8` | *[Link](#rest-client)* | *[Link](https://github.com/rest-client/rest-client)* |
|
443
|
+
| Sequel | `sequel` | `>= 3.41` | `>= 3.41` | *[Link](#sequel)* | *[Link](https://github.com/jeremyevans/sequel)* |
|
444
|
+
| Shoryuken | `shoryuken` | `>= 3.2` | `>= 3.2` | *[Link](#shoryuken)* | *[Link](https://github.com/phstc/shoryuken)* |
|
445
|
+
| Sidekiq | `sidekiq` | `>= 3.5.4` | `>= 3.5.4` | *[Link](#sidekiq)* | *[Link](https://github.com/mperham/sidekiq)* |
|
446
|
+
| Sinatra | `sinatra` | `>= 1.4` | `>= 1.4` | *[Link](#sinatra)* | *[Link](https://github.com/sinatra/sinatra)* |
|
447
|
+
| Sneakers | `sneakers` | `>= 2.12.0` | `>= 2.12.0` | *[Link](#sneakers)* | *[Link](https://github.com/jondot/sneakers)* |
|
448
|
+
| Sucker Punch | `sucker_punch` | `>= 2.0` | `>= 2.0` | *[Link](#sucker-punch)* | *[Link](https://github.com/brandonhilkert/sucker_punch)* |
|
449
|
+
|
450
|
+
#### CI Visibility
|
451
|
+
|
452
|
+
For Datadog CI Visibility, library instrumentation can be activated and configured by using the following `Datadog.configure` API:
|
452
453
|
|
453
454
|
```ruby
|
454
|
-
require 'ddtrace'
|
455
|
-
|
456
455
|
Datadog.configure do |c|
|
457
|
-
|
456
|
+
# Activates and configures an integration
|
457
|
+
c.ci.instrument :integration_name, options
|
458
458
|
end
|
459
459
|
```
|
460
460
|
|
461
|
-
|
461
|
+
`options` is a `Hash` of integration-specific configuration settings.
|
462
462
|
|
463
|
-
|
464
|
-
| --- | ----------- | ------- |
|
465
|
-
| `service_name` | Service name used for `action_cable` instrumentation | `'action_cable'` |
|
463
|
+
These are the available CI Visibility integrations:
|
466
464
|
|
467
|
-
|
465
|
+
| Name | Key | Versions Supported: MRI | Versions Supported: JRuby | How to configure | Gem source |
|
466
|
+
|-----------|------------|-------------------------|---------------------------|---------------------|-----------------------------------------------------|
|
467
|
+
| Cucumber | `cucumber` | `>= 3.0` | `>= 1.7.16` | *[Link](#cucumber)* | *[Link](https://github.com/cucumber/cucumber-ruby)* |
|
468
|
+
| RSpec | `rspec` | `>= 3.0.0` | `>= 3.0.0` | *[Link](#rspec)* | *[Link](https://github.com/rspec/rspec)* |
|
468
469
|
|
469
|
-
|
470
|
+
### Action Cable
|
471
|
+
|
472
|
+
The Action Cable integration traces broadcast messages and channel actions.
|
473
|
+
|
474
|
+
You can enable it through `Datadog.configure`:
|
470
475
|
|
471
476
|
```ruby
|
472
|
-
require 'actionview'
|
473
477
|
require 'ddtrace'
|
474
478
|
|
475
479
|
Datadog.configure do |c|
|
476
|
-
c.
|
480
|
+
c.tracing.instrument :action_cable
|
477
481
|
end
|
478
482
|
```
|
479
483
|
|
480
|
-
Where `options` is an optional `Hash` that accepts the following parameters:
|
481
|
-
|
482
|
-
| Key | Description | Default |
|
483
|
-
| ---| --- | --- |
|
484
|
-
| `service_name` | Service name used for rendering instrumentation. | `action_view` |
|
485
|
-
| `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/'` |
|
486
|
-
|
487
484
|
### Action Mailer
|
488
485
|
|
489
486
|
The Action Mailer integration provides tracing for Rails 5 ActionMailer actions.
|
@@ -492,8 +489,8 @@ You can enable it through `Datadog.configure`:
|
|
492
489
|
|
493
490
|
```ruby
|
494
491
|
require 'ddtrace'
|
495
|
-
|
496
|
-
c.
|
492
|
+
Datadog.configure do |c|
|
493
|
+
c.tracing.instrument :action_mailer, options
|
497
494
|
end
|
498
495
|
```
|
499
496
|
|
@@ -502,39 +499,31 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
502
499
|
| Key | Description | Default |
|
503
500
|
| --- | ----------- | ------- |
|
504
501
|
| `analytics_enabled` | Enable analytics for spans produced by this integration. `true` for on, `nil` to defer to global setting, `false` for off. | `false` |
|
505
|
-
| `service_name` | Service name used for `action_mailer` instrumentation | `'action_mailer'` |
|
506
502
|
| `email_data` | Whether or not to append additional email payload metadata to `action_mailer.deliver` spans. Fields include `['subject', 'to', 'from', 'bcc', 'cc', 'date', 'perform_deliveries']`. | `false` |
|
507
503
|
|
508
|
-
###
|
504
|
+
### Action Pack
|
509
505
|
|
510
|
-
|
506
|
+
Most of the time, Action Pack is set up as part of Rails, but it can be activated separately:
|
511
507
|
|
512
508
|
```ruby
|
513
|
-
require '
|
509
|
+
require 'actionpack'
|
514
510
|
require 'ddtrace'
|
515
511
|
|
516
512
|
Datadog.configure do |c|
|
517
|
-
c.
|
513
|
+
c.tracing.instrument :action_pack
|
518
514
|
end
|
519
|
-
|
520
|
-
my_object = MyModel.new(name: 'my object')
|
521
|
-
ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
|
522
515
|
```
|
523
516
|
|
524
|
-
|
525
|
-
| --- | ----------- | ------- |
|
526
|
-
| `service_name` | Service name used for `active_model_serializers` instrumentation. | `'active_model_serializers'` |
|
527
|
-
|
528
|
-
### Action Pack
|
517
|
+
### Action View
|
529
518
|
|
530
|
-
Most of the time, Action
|
519
|
+
Most of the time, Action View is set up as part of Rails, but it can be activated separately:
|
531
520
|
|
532
521
|
```ruby
|
533
|
-
require '
|
522
|
+
require 'actionview'
|
534
523
|
require 'ddtrace'
|
535
524
|
|
536
525
|
Datadog.configure do |c|
|
537
|
-
c.
|
526
|
+
c.tracing.instrument :action_view, options
|
538
527
|
end
|
539
528
|
```
|
540
529
|
|
@@ -542,7 +531,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
542
531
|
|
543
532
|
| Key | Description | Default |
|
544
533
|
| ---| --- | --- |
|
545
|
-
| `
|
534
|
+
| `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/'` |
|
546
535
|
|
547
536
|
### Active Job
|
548
537
|
|
@@ -553,18 +542,27 @@ require 'active_job'
|
|
553
542
|
require 'ddtrace'
|
554
543
|
|
555
544
|
Datadog.configure do |c|
|
556
|
-
c.
|
545
|
+
c.tracing.instrument :active_job
|
557
546
|
end
|
558
547
|
|
559
548
|
ExampleJob.perform_later
|
560
549
|
```
|
561
550
|
|
562
|
-
|
551
|
+
### Active Model Serializers
|
563
552
|
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
553
|
+
The Active Model Serializers integration traces the `serialize` event for version 0.9+ and the `render` event for version 0.10+.
|
554
|
+
|
555
|
+
```ruby
|
556
|
+
require 'active_model_serializers'
|
557
|
+
require 'ddtrace'
|
558
|
+
|
559
|
+
Datadog.configure do |c|
|
560
|
+
c.tracing.instrument :active_model_serializers
|
561
|
+
end
|
562
|
+
|
563
|
+
my_object = MyModel.new(name: 'my object')
|
564
|
+
ActiveModelSerializers::SerializableResource.new(test_obj).serializable_hash
|
565
|
+
```
|
568
566
|
|
569
567
|
### Active Record
|
570
568
|
|
@@ -577,7 +575,7 @@ require 'active_record'
|
|
577
575
|
require 'ddtrace'
|
578
576
|
|
579
577
|
Datadog.configure do |c|
|
580
|
-
c.
|
578
|
+
c.tracing.instrument :active_record, options
|
581
579
|
end
|
582
580
|
|
583
581
|
Dir::Tmpname.create(['test', '.sqlite']) do |db|
|
@@ -591,7 +589,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
591
589
|
|
592
590
|
| Key | Description | Default |
|
593
591
|
| ---| --- | --- |
|
594
|
-
| `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'`) |
|
595
592
|
| `service_name` | Service name used for database portion of `active_record` instrumentation. | Name of database adapter (e.g. `'mysql2'`) |
|
596
593
|
|
597
594
|
**Configuring trace settings per database**
|
@@ -607,22 +604,22 @@ You can configure trace settings per database connection by using the `describes
|
|
607
604
|
Datadog.configure do |c|
|
608
605
|
# Symbol matching your database connection in config/database.yml
|
609
606
|
# Only available if you are using Rails with ActiveRecord.
|
610
|
-
c.
|
607
|
+
c.tracing.instrument :active_record, describes: :secondary_database, service_name: 'secondary-db'
|
611
608
|
|
612
609
|
# Block configuration pattern.
|
613
|
-
c.
|
610
|
+
c.tracing.instrument :active_record, describes: :secondary_database do |second_db|
|
614
611
|
second_db.service_name = 'secondary-db'
|
615
612
|
end
|
616
613
|
|
617
614
|
# Connection string with the following connection settings:
|
618
615
|
# adapter, username, host, port, database
|
619
616
|
# Other fields are ignored.
|
620
|
-
c.
|
617
|
+
c.tracing.instrument :active_record, describes: 'mysql2://root@127.0.0.1:3306/mysql', service_name: 'secondary-db'
|
621
618
|
|
622
619
|
# Hash with following connection settings:
|
623
620
|
# adapter, username, host, port, database
|
624
621
|
# Other fields are ignored.
|
625
|
-
c.
|
622
|
+
c.tracing.instrument :active_record, describes: {
|
626
623
|
adapter: 'mysql2',
|
627
624
|
host: '127.0.0.1',
|
628
625
|
port: '3306',
|
@@ -632,8 +629,8 @@ Datadog.configure do |c|
|
|
632
629
|
service_name: 'secondary-db'
|
633
630
|
|
634
631
|
# If using the `makara` gem, it's possible to match on connection `role`:
|
635
|
-
c.
|
636
|
-
c.
|
632
|
+
c.tracing.instrument :active_record, describes: { makara_role: 'primary' }, service_name: 'primary-db'
|
633
|
+
c.tracing.instrument :active_record, describes: { makara_role: 'replica' }, service_name: 'secondary-db'
|
637
634
|
end
|
638
635
|
```
|
639
636
|
|
@@ -642,23 +639,23 @@ You can also create configurations based on partial matching of database connect
|
|
642
639
|
```ruby
|
643
640
|
Datadog.configure do |c|
|
644
641
|
# Matches any connection on host `127.0.0.1`.
|
645
|
-
c.
|
642
|
+
c.tracing.instrument :active_record, describes: { host: '127.0.0.1' }, service_name: 'local-db'
|
646
643
|
|
647
644
|
# Matches any `mysql2` connection.
|
648
|
-
c.
|
645
|
+
c.tracing.instrument :active_record, describes: { adapter: 'mysql2'}, service_name: 'mysql-db'
|
649
646
|
|
650
647
|
# Matches any `mysql2` connection to the `reports` database.
|
651
648
|
#
|
652
649
|
# In case of multiple matching `describe` configurations, the latest one applies.
|
653
650
|
# In this case a connection with both adapter `mysql` and database `reports`
|
654
651
|
# will be configured `service_name: 'reports-db'`, not `service_name: 'mysql-db'`.
|
655
|
-
c.
|
652
|
+
c.tracing.instrument :active_record, describes: { adapter: 'mysql2', database: 'reports'}, service_name: 'reports-db'
|
656
653
|
end
|
657
654
|
```
|
658
655
|
|
659
656
|
When multiple `describes` configurations match a connection, the latest configured rule that matches will be applied.
|
660
657
|
|
661
|
-
If ActiveRecord traces an event that uses a connection that matches a key defined by `describes`, it will use the trace settings assigned to that connection. If the connection does not match any of the described connections, it will use default settings defined by `c.
|
658
|
+
If ActiveRecord traces an event that uses a connection that matches a key defined by `describes`, it will use the trace settings assigned to that connection. If the connection does not match any of the described connections, it will use default settings defined by `c.tracing.instrument :active_record` instead.
|
662
659
|
|
663
660
|
### Active Support
|
664
661
|
|
@@ -669,7 +666,7 @@ require 'activesupport'
|
|
669
666
|
require 'ddtrace'
|
670
667
|
|
671
668
|
Datadog.configure do |c|
|
672
|
-
c.
|
669
|
+
c.tracing.instrument :active_support, options
|
673
670
|
end
|
674
671
|
|
675
672
|
cache = ActiveSupport::Cache::MemoryStore.new
|
@@ -691,7 +688,7 @@ require 'aws-sdk'
|
|
691
688
|
require 'ddtrace'
|
692
689
|
|
693
690
|
Datadog.configure do |c|
|
694
|
-
c.
|
691
|
+
c.tracing.instrument :aws, options
|
695
692
|
end
|
696
693
|
|
697
694
|
# Perform traced call
|
@@ -715,21 +712,15 @@ To activate your integration, use the `Datadog.configure` method:
|
|
715
712
|
# Inside Rails initializer or equivalent
|
716
713
|
Datadog.configure do |c|
|
717
714
|
# Patches ::Concurrent::Future to use ExecutorService that propagates context
|
718
|
-
c.
|
715
|
+
c.tracing.instrument :concurrent_ruby
|
719
716
|
end
|
720
717
|
|
721
718
|
# Pass context into code executed within Concurrent::Future
|
722
|
-
Datadog.
|
723
|
-
Concurrent::Future.execute { Datadog.
|
719
|
+
Datadog::Tracing.trace('outer') do
|
720
|
+
Concurrent::Future.execute { Datadog::Tracing.trace('inner') { } }.wait
|
724
721
|
end
|
725
722
|
```
|
726
723
|
|
727
|
-
Where `options` is an optional `Hash` that accepts the following parameters:
|
728
|
-
|
729
|
-
| Key | Description | Default |
|
730
|
-
| --- | ----------- | ------- |
|
731
|
-
| `service_name` | Service name used for `concurrent-ruby` instrumentation | `'concurrent-ruby'` |
|
732
|
-
|
733
724
|
### Cucumber
|
734
725
|
|
735
726
|
Cucumber integration will trace all executions of scenarios and steps when using `cucumber` framework.
|
@@ -742,7 +733,7 @@ require 'ddtrace'
|
|
742
733
|
|
743
734
|
# Configure default Cucumber integration
|
744
735
|
Datadog.configure do |c|
|
745
|
-
c.
|
736
|
+
c.ci.instrument :cucumber, options
|
746
737
|
end
|
747
738
|
|
748
739
|
# Example of how to attach tags from scenario to active span
|
@@ -775,7 +766,7 @@ require 'ddtrace'
|
|
775
766
|
|
776
767
|
# Configure default Dalli tracing behavior
|
777
768
|
Datadog.configure do |c|
|
778
|
-
c.
|
769
|
+
c.tracing.instrument :dalli, options
|
779
770
|
end
|
780
771
|
|
781
772
|
# Configure Dalli tracing behavior for single client
|
@@ -799,7 +790,7 @@ You can enable it through `Datadog.configure`:
|
|
799
790
|
require 'ddtrace'
|
800
791
|
|
801
792
|
Datadog.configure do |c|
|
802
|
-
c.
|
793
|
+
c.tracing.instrument :delayed_job, options
|
803
794
|
end
|
804
795
|
```
|
805
796
|
|
@@ -807,8 +798,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
807
798
|
|
808
799
|
| Key | Description | Default |
|
809
800
|
| --- | ----------- | ------- |
|
810
|
-
| `service_name` | Service name used for `DelayedJob` instrumentation | `'delayed_job'` |
|
811
|
-
| `client_service_name` | Service name used for client-side `DelayedJob` instrumentation | `'delayed_job-client'` |
|
812
801
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
813
802
|
|
814
803
|
### Elasticsearch
|
@@ -820,7 +809,7 @@ require 'elasticsearch/transport'
|
|
820
809
|
require 'ddtrace'
|
821
810
|
|
822
811
|
Datadog.configure do |c|
|
823
|
-
c.
|
812
|
+
c.tracing.instrument :elasticsearch, options
|
824
813
|
end
|
825
814
|
|
826
815
|
# Perform a query to Elasticsearch
|
@@ -843,10 +832,10 @@ The `ethon` integration will trace any HTTP request through `Easy` or `Multi` ob
|
|
843
832
|
require 'ddtrace'
|
844
833
|
|
845
834
|
Datadog.configure do |c|
|
846
|
-
c.
|
835
|
+
c.tracing.instrument :ethon, options
|
847
836
|
|
848
837
|
# optionally, specify a different service name for hostnames matching a regex
|
849
|
-
c.
|
838
|
+
c.tracing.instrument :ethon, describes: /user-[^.]+\.example\.com/ do |ethon|
|
850
839
|
ethon.service_name = 'user.example.com'
|
851
840
|
ethon.split_by_domain = false # Only necessary if split_by_domain is true by default
|
852
841
|
end
|
@@ -871,10 +860,10 @@ require 'ddtrace'
|
|
871
860
|
|
872
861
|
# Configure default Excon tracing behavior
|
873
862
|
Datadog.configure do |c|
|
874
|
-
c.
|
863
|
+
c.tracing.instrument :excon, options
|
875
864
|
|
876
865
|
# optionally, specify a different service name for hostnames matching a regex
|
877
|
-
c.
|
866
|
+
c.tracing.instrument :excon, describes: /user-[^.]+\.example\.com/ do |excon|
|
878
867
|
excon.service_name = 'user.example.com'
|
879
868
|
excon.split_by_domain = false # Only necessary if split_by_domain is true by default
|
880
869
|
end
|
@@ -901,7 +890,7 @@ If you use multiple connections with Excon, you can give each of them different
|
|
901
890
|
# Wrap the Datadog tracing middleware around the default middleware stack
|
902
891
|
Excon.new(
|
903
892
|
'http://example.com',
|
904
|
-
middlewares: Datadog::Contrib::Excon::Middleware.with(options).around_default_stack
|
893
|
+
middlewares: Datadog::Tracing::Contrib::Excon::Middleware.with(options).around_default_stack
|
905
894
|
)
|
906
895
|
|
907
896
|
# Insert the middleware into a custom middleware stack.
|
@@ -910,7 +899,7 @@ Excon.new(
|
|
910
899
|
'http://example.com',
|
911
900
|
middlewares: [
|
912
901
|
Excon::Middleware::ResponseParser,
|
913
|
-
Datadog::Contrib::Excon::Middleware.with(options),
|
902
|
+
Datadog::Tracing::Contrib::Excon::Middleware.with(options),
|
914
903
|
Excon::Middleware::Idempotent
|
915
904
|
]
|
916
905
|
)
|
@@ -928,10 +917,10 @@ require 'ddtrace'
|
|
928
917
|
|
929
918
|
# Configure default Faraday tracing behavior
|
930
919
|
Datadog.configure do |c|
|
931
|
-
c.
|
920
|
+
c.tracing.instrument :faraday, options
|
932
921
|
|
933
922
|
# optionally, specify a different service name for hostnames matching a regex
|
934
|
-
c.
|
923
|
+
c.tracing.instrument :faraday, describes: /user-[^.]+\.example\.com/ do |faraday|
|
935
924
|
faraday.service_name = 'user.example.com'
|
936
925
|
faraday.split_by_domain = false # Only necessary if split_by_domain is true by default
|
937
926
|
end
|
@@ -967,7 +956,7 @@ require 'grape'
|
|
967
956
|
require 'ddtrace'
|
968
957
|
|
969
958
|
Datadog.configure do |c|
|
970
|
-
c.
|
959
|
+
c.tracing.instrument :grape, options
|
971
960
|
end
|
972
961
|
|
973
962
|
# Then define your application
|
@@ -984,7 +973,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
984
973
|
| Key | Description | Default |
|
985
974
|
| --- | ----------- | ------- |
|
986
975
|
| `enabled` | Defines whether Grape should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
987
|
-
| `service_name` | Service name used for `grape` instrumentation | `'grape'` |
|
988
976
|
| `error_statuses`| Defines a status code or range of status codes which should be marked as errors. `'404,405,500-599'` or `[404,405,'500-599']` | `nil` |
|
989
977
|
|
990
978
|
### GraphQL
|
@@ -996,7 +984,7 @@ To activate your integration, use the `Datadog.configure` method:
|
|
996
984
|
```ruby
|
997
985
|
# Inside Rails initializer or equivalent
|
998
986
|
Datadog.configure do |c|
|
999
|
-
c.
|
987
|
+
c.tracing.instrument :graphql, schemas: [YourSchema], options
|
1000
988
|
end
|
1001
989
|
|
1002
990
|
# Then run a GraphQL query
|
@@ -1007,7 +995,6 @@ The `use :graphql` method accepts the following parameters. Additional options c
|
|
1007
995
|
|
1008
996
|
| Key | Description | Default |
|
1009
997
|
| --- | ----------- | ------- |
|
1010
|
-
| `service_name` | Service name used for `graphql` instrumentation | `'ruby-graphql'` |
|
1011
998
|
| `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. | `[]` |
|
1012
999
|
|
1013
1000
|
**Manually configuring GraphQL schemas**
|
@@ -1067,7 +1054,7 @@ require 'grpc'
|
|
1067
1054
|
require 'ddtrace'
|
1068
1055
|
|
1069
1056
|
Datadog.configure do |c|
|
1070
|
-
c.
|
1057
|
+
c.tracing.instrument :grpc, options
|
1071
1058
|
end
|
1072
1059
|
|
1073
1060
|
# Server side
|
@@ -1093,7 +1080,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1093
1080
|
In situations where you have multiple clients calling multiple distinct services, you may pass the Datadog interceptor directly, like so
|
1094
1081
|
|
1095
1082
|
```ruby
|
1096
|
-
configured_interceptor = Datadog::Contrib::GRPC::DatadogInterceptor::Client.new do |c|
|
1083
|
+
configured_interceptor = Datadog::Tracing::Contrib::GRPC::DatadogInterceptor::Client.new do |c|
|
1097
1084
|
c.service_name = "Alternate"
|
1098
1085
|
end
|
1099
1086
|
|
@@ -1114,9 +1101,9 @@ The http.rb integration will trace any HTTP call using the Http.rb gem.
|
|
1114
1101
|
require 'http'
|
1115
1102
|
require 'ddtrace'
|
1116
1103
|
Datadog.configure do |c|
|
1117
|
-
c.
|
1104
|
+
c.tracing.instrument :httprb, options
|
1118
1105
|
# optionally, specify a different service name for hostnames matching a regex
|
1119
|
-
c.
|
1106
|
+
c.tracing.instrument :httprb, describes: /user-[^.]+\.example\.com/ do |httprb|
|
1120
1107
|
httprb.service_name = 'user.example.com'
|
1121
1108
|
httprb.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1122
1109
|
end
|
@@ -1139,9 +1126,9 @@ The httpclient integration will trace any HTTP call using the httpclient gem.
|
|
1139
1126
|
require 'httpclient'
|
1140
1127
|
require 'ddtrace'
|
1141
1128
|
Datadog.configure do |c|
|
1142
|
-
c.
|
1129
|
+
c.tracing.instrument :httpclient, options
|
1143
1130
|
# optionally, specify a different service name for hostnames matching a regex
|
1144
|
-
c.
|
1131
|
+
c.tracing.instrument :httpclient, describes: /user-[^.]+\.example\.com/ do |httpclient|
|
1145
1132
|
httpclient.service_name = 'user.example.com'
|
1146
1133
|
httpclient.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1147
1134
|
end
|
@@ -1165,10 +1152,10 @@ require "ddtrace"
|
|
1165
1152
|
require "httpx/adapters/datadog"
|
1166
1153
|
|
1167
1154
|
Datadog.configure do |c|
|
1168
|
-
c.
|
1155
|
+
c.tracing.instrument :httpx
|
1169
1156
|
|
1170
1157
|
# optionally, specify a different service name for hostnames matching a regex
|
1171
|
-
c.
|
1158
|
+
c.tracing.instrument :httpx, describes: /user-[^.]+\.example\.com/ do |http|
|
1172
1159
|
http.service_name = 'user.example.com'
|
1173
1160
|
http.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1174
1161
|
end
|
@@ -1187,17 +1174,10 @@ require 'kafka'
|
|
1187
1174
|
require 'ddtrace'
|
1188
1175
|
|
1189
1176
|
Datadog.configure do |c|
|
1190
|
-
c.
|
1177
|
+
c.tracing.instrument :kafka
|
1191
1178
|
end
|
1192
1179
|
```
|
1193
1180
|
|
1194
|
-
Where `options` is an optional `Hash` that accepts the following parameters:
|
1195
|
-
|
1196
|
-
| Key | Description | Default |
|
1197
|
-
| --- | ----------- | ------- |
|
1198
|
-
| `service_name` | Service name used for `kafka` instrumentation | `'kafka'` |
|
1199
|
-
| `tracer` | `Datadog::Tracer` used to perform instrumentation. Usually you don't need to set this. | `Datadog.tracer` |
|
1200
|
-
|
1201
1181
|
### MongoDB
|
1202
1182
|
|
1203
1183
|
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:
|
@@ -1207,7 +1187,7 @@ require 'mongo'
|
|
1207
1187
|
require 'ddtrace'
|
1208
1188
|
|
1209
1189
|
Datadog.configure do |c|
|
1210
|
-
c.
|
1190
|
+
c.tracing.instrument :mongo, options
|
1211
1191
|
end
|
1212
1192
|
|
1213
1193
|
# Create a MongoDB client and use it as usual
|
@@ -1216,7 +1196,7 @@ collection = client[:people]
|
|
1216
1196
|
collection.insert_one({ name: 'Steve' })
|
1217
1197
|
|
1218
1198
|
# In case you want to override the global configuration for a certain client instance
|
1219
|
-
Datadog.
|
1199
|
+
Datadog.configure_onto(client, **options)
|
1220
1200
|
```
|
1221
1201
|
|
1222
1202
|
Where `options` is an optional `Hash` that accepts the following parameters:
|
@@ -1238,10 +1218,10 @@ You can configure trace settings per connection by using the `describes` option:
|
|
1238
1218
|
|
1239
1219
|
Datadog.configure do |c|
|
1240
1220
|
# Network connection string
|
1241
|
-
c.
|
1221
|
+
c.tracing.instrument :mongo, describes: '127.0.0.1:27017', service_name: 'mongo-primary'
|
1242
1222
|
|
1243
1223
|
# Network connection regular expression
|
1244
|
-
c.
|
1224
|
+
c.tracing.instrument :mongo, describes: /localhost.*/, service_name: 'mongo-secondary'
|
1245
1225
|
end
|
1246
1226
|
|
1247
1227
|
client = Mongo::Client.new([ '127.0.0.1:27017' ], :database => 'artists')
|
@@ -1266,7 +1246,7 @@ require 'mysql2'
|
|
1266
1246
|
require 'ddtrace'
|
1267
1247
|
|
1268
1248
|
Datadog.configure do |c|
|
1269
|
-
c.
|
1249
|
+
c.tracing.instrument :mysql2, options
|
1270
1250
|
end
|
1271
1251
|
|
1272
1252
|
client = Mysql2::Client.new(:host => "localhost", :username => "root")
|
@@ -1288,10 +1268,10 @@ require 'net/http'
|
|
1288
1268
|
require 'ddtrace'
|
1289
1269
|
|
1290
1270
|
Datadog.configure do |c|
|
1291
|
-
c.
|
1271
|
+
c.tracing.instrument :http, options
|
1292
1272
|
|
1293
1273
|
# optionally, specify a different service name for hostnames matching a regex
|
1294
|
-
c.
|
1274
|
+
c.tracing.instrument :http, describes: /user-[^.]+\.example\.com/ do |http|
|
1295
1275
|
http.service_name = 'user.example.com'
|
1296
1276
|
http.split_by_domain = false # Only necessary if split_by_domain is true by default
|
1297
1277
|
end
|
@@ -1313,11 +1293,11 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1313
1293
|
| `service_name` | Service name used for `http` instrumentation | `'net/http'` |
|
1314
1294
|
| `split_by_domain` | Uses the request domain as the service name when set to `true`. | `false` |
|
1315
1295
|
|
1316
|
-
If you wish to configure each connection object individually, you may use the `Datadog.
|
1296
|
+
If you wish to configure each connection object individually, you may use the `Datadog.configure_onto` as it follows:
|
1317
1297
|
|
1318
1298
|
```ruby
|
1319
1299
|
client = Net::HTTP.new(host, port)
|
1320
|
-
Datadog.
|
1300
|
+
Datadog.configure_onto(client, **options)
|
1321
1301
|
```
|
1322
1302
|
|
1323
1303
|
### Presto
|
@@ -1329,7 +1309,7 @@ require 'presto-client'
|
|
1329
1309
|
require 'ddtrace'
|
1330
1310
|
|
1331
1311
|
Datadog.configure do |c|
|
1332
|
-
c.
|
1312
|
+
c.tracing.instrument :presto, options
|
1333
1313
|
end
|
1334
1314
|
|
1335
1315
|
client = Presto::Client.new(
|
@@ -1361,7 +1341,7 @@ To add tracing to a Qless job:
|
|
1361
1341
|
require 'ddtrace'
|
1362
1342
|
|
1363
1343
|
Datadog.configure do |c|
|
1364
|
-
c.
|
1344
|
+
c.tracing.instrument :qless, options
|
1365
1345
|
end
|
1366
1346
|
```
|
1367
1347
|
|
@@ -1369,7 +1349,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1369
1349
|
|
1370
1350
|
| Key | Description | Default |
|
1371
1351
|
| --- | ----------- | ------- |
|
1372
|
-
| `service_name` | Service name used for `qless` instrumentation | `'qless'` |
|
1373
1352
|
| `tag_job_data` | Enable tagging with job arguments. true for on, false for off. | `false` |
|
1374
1353
|
| `tag_job_tags` | Enable tagging with job tags. true for on, false for off. | `false` |
|
1375
1354
|
|
@@ -1383,7 +1362,7 @@ You can enable it through `Datadog.configure`:
|
|
1383
1362
|
require 'ddtrace'
|
1384
1363
|
|
1385
1364
|
Datadog.configure do |c|
|
1386
|
-
c.
|
1365
|
+
c.tracing.instrument :que, options
|
1387
1366
|
end
|
1388
1367
|
```
|
1389
1368
|
|
@@ -1392,7 +1371,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1392
1371
|
| Key | Description | Default |
|
1393
1372
|
| --- | ----------- | ------- |
|
1394
1373
|
| `enabled` | Defines whether Que should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1395
|
-
| `service_name` | Service name used for `que` instrumentation | `'que'` |
|
1396
1374
|
| `tag_args` | Enable tagging of a job's args field. `true` for on, `false` for off. | `false` |
|
1397
1375
|
| `tag_data` | Enable tagging of a job's data field. `true` for on, `false` for off. | `false` |
|
1398
1376
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
@@ -1407,7 +1385,7 @@ You can enable it through `Datadog.configure`:
|
|
1407
1385
|
require 'ddtrace'
|
1408
1386
|
|
1409
1387
|
Datadog.configure do |c|
|
1410
|
-
c.
|
1388
|
+
c.tracing.instrument :racecar, options
|
1411
1389
|
end
|
1412
1390
|
```
|
1413
1391
|
|
@@ -1428,10 +1406,10 @@ This integration is automatically activated with web frameworks like Rails. If y
|
|
1428
1406
|
require 'ddtrace'
|
1429
1407
|
|
1430
1408
|
Datadog.configure do |c|
|
1431
|
-
c.
|
1409
|
+
c.tracing.instrument :rack, options
|
1432
1410
|
end
|
1433
1411
|
|
1434
|
-
use Datadog::Contrib::Rack::TraceMiddleware
|
1412
|
+
use Datadog::Tracing::Contrib::Rack::TraceMiddleware
|
1435
1413
|
|
1436
1414
|
app = proc do |env|
|
1437
1415
|
[ 200, {'Content-Type' => 'text/plain'}, ['OK'] ]
|
@@ -1454,7 +1432,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1454
1432
|
| `quantize.query.exclude` | Defines which values should be removed entirely. Excludes nothing by default. May be an Array of strings, or `:all` to remove the query string entirely. Option must be nested inside the `query` option. | `nil` |
|
1455
1433
|
| `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` |
|
1456
1434
|
| `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` |
|
1457
|
-
| `service_name` | Service name used for `rack` instrumentation | `'rack'` |
|
1458
1435
|
| `web_service_name` | Service name for frontend server request queuing spans. (e.g. `'nginx'`) | `'web-server'` |
|
1459
1436
|
|
1460
1437
|
**Configuring URL quantization behavior**
|
@@ -1467,23 +1444,23 @@ Datadog.configure do |c|
|
|
1467
1444
|
|
1468
1445
|
# Show values for any query string parameter matching 'category_id' exactly
|
1469
1446
|
# http://example.com/path?category_id=1&sort_by=asc#featured --> http://example.com/path?category_id=1&sort_by
|
1470
|
-
c.
|
1447
|
+
c.tracing.instrument :rack, quantize: { query: { show: ['category_id'] } }
|
1471
1448
|
|
1472
1449
|
# Show all values for all query string parameters
|
1473
1450
|
# http://example.com/path?category_id=1&sort_by=asc#featured --> http://example.com/path?category_id=1&sort_by=asc
|
1474
|
-
c.
|
1451
|
+
c.tracing.instrument :rack, quantize: { query: { show: :all } }
|
1475
1452
|
|
1476
1453
|
# Totally exclude any query string parameter matching 'sort_by' exactly
|
1477
1454
|
# http://example.com/path?category_id=1&sort_by=asc#featured --> http://example.com/path?category_id
|
1478
|
-
c.
|
1455
|
+
c.tracing.instrument :rack, quantize: { query: { exclude: ['sort_by'] } }
|
1479
1456
|
|
1480
1457
|
# Remove the query string entirely
|
1481
1458
|
# http://example.com/path?category_id=1&sort_by=asc#featured --> http://example.com/path
|
1482
|
-
c.
|
1459
|
+
c.tracing.instrument :rack, quantize: { query: { exclude: :all } }
|
1483
1460
|
|
1484
1461
|
# Show URL fragments
|
1485
1462
|
# http://example.com/path?category_id=1&sort_by=asc#featured --> http://example.com/path?category_id&sort_by#featured
|
1486
|
-
c.
|
1463
|
+
c.tracing.instrument :rack, quantize: { fragment: :show }
|
1487
1464
|
end
|
1488
1465
|
```
|
1489
1466
|
|
@@ -1498,7 +1475,7 @@ To enable the Rails instrumentation, create an initializer file in your `config/
|
|
1498
1475
|
require 'ddtrace'
|
1499
1476
|
|
1500
1477
|
Datadog.configure do |c|
|
1501
|
-
c.
|
1478
|
+
c.tracing.instrument :rails, options
|
1502
1479
|
end
|
1503
1480
|
```
|
1504
1481
|
|
@@ -1507,23 +1484,20 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1507
1484
|
| Key | Description | Default |
|
1508
1485
|
| --- | ----------- | ------- |
|
1509
1486
|
| `cache_service` | Cache service name used when tracing cache activity | `'<app_name>-cache'` |
|
1510
|
-
| `controller_service` | Service name used when tracing a Rails action controller | `'<app_name>'` |
|
1511
1487
|
| `database_service` | Database service name used when tracing database activity | `'<app_name>-<adapter_name>'` |
|
1512
1488
|
| `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` |
|
1513
1489
|
| `exception_controller` | Class or Module which identifies a custom exception controller class. Tracer provides improved error behavior when it can identify custom exception controllers. By default, without this option, it 'guesses' what a custom exception controller looks like. Providing this option aids this identification. | `nil` |
|
1514
|
-
| `job_service` | Service name used when tracing ActiveJob activity. | `<app_name>-active_job` |
|
1515
1490
|
| `middleware` | Add the trace middleware to the Rails application. Set to `false` if you don't want the middleware to load. | `true` |
|
1516
1491
|
| `middleware_names` | Enables any short-circuited middleware requests to display the middleware name as a resource for the trace. | `false` |
|
1517
1492
|
| `service_name` | Service name used when tracing application requests (on the `rack` level) | `'<app_name>'` (inferred from your Rails application namespace) |
|
1518
1493
|
| `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/'` |
|
1519
|
-
| `log_injection` | Automatically enables injection [Trace Correlation](#trace-correlation) information, such as `dd.trace_id`, into Rails logs. Supports the default logger (`ActiveSupport::TaggedLogging`) and `Lograge`. Details on the format of Trace Correlation information can be found in the [Trace Correlation](#trace-correlation) section. | `false` |
|
1520
1494
|
|
1521
1495
|
**Supported versions**
|
1522
1496
|
|
1523
1497
|
| MRI Versions | JRuby Versions | Rails Versions |
|
1524
1498
|
| ------------- | -------------- | -------------- |
|
1525
|
-
| 2.1 | | 3.
|
1526
|
-
| 2.2 - 2.3 | | 3.
|
1499
|
+
| 2.1 | | 3.2 - 4.2 |
|
1500
|
+
| 2.2 - 2.3 | | 3.2 - 5.2 |
|
1527
1501
|
| 2.4 | | 4.2.8 - 5.2 |
|
1528
1502
|
| 2.5 | | 4.2.8 - 6.1 |
|
1529
1503
|
| 2.6 - 2.7 | 9.2 | 5.0 - 6.1 |
|
@@ -1541,7 +1515,7 @@ require 'rake'
|
|
1541
1515
|
require 'ddtrace'
|
1542
1516
|
|
1543
1517
|
Datadog.configure do |c|
|
1544
|
-
c.
|
1518
|
+
c.tracing.instrument :rake, options
|
1545
1519
|
end
|
1546
1520
|
|
1547
1521
|
task :my_task do
|
@@ -1557,7 +1531,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1557
1531
|
| --- | ----------- | ------- |
|
1558
1532
|
| `enabled` | Defines whether Rake tasks should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1559
1533
|
| `quantize` | Hash containing options for quantization of task arguments. See below for more details and examples. | `{}` |
|
1560
|
-
| `service_name` | Service name used for `rake` instrumentation | `'rake'` |
|
1561
1534
|
|
1562
1535
|
**Configuring task quantization behavior**
|
1563
1536
|
|
@@ -1569,27 +1542,27 @@ Datadog.configure do |c|
|
|
1569
1542
|
# Default behavior: all arguments are quantized.
|
1570
1543
|
# `rake.invoke.args` tag --> ['?']
|
1571
1544
|
# `rake.execute.args` tag --> { one: '?', two: '?', three: '?' }
|
1572
|
-
c.
|
1545
|
+
c.tracing.instrument :rake
|
1573
1546
|
|
1574
1547
|
# Show values for any argument matching :two exactly
|
1575
1548
|
# `rake.invoke.args` tag --> ['?']
|
1576
1549
|
# `rake.execute.args` tag --> { one: '?', two: 'bar', three: '?' }
|
1577
|
-
c.
|
1550
|
+
c.tracing.instrument :rake, quantize: { args: { show: [:two] } }
|
1578
1551
|
|
1579
1552
|
# Show all values for all arguments.
|
1580
1553
|
# `rake.invoke.args` tag --> ['foo', 'bar', 'baz']
|
1581
1554
|
# `rake.execute.args` tag --> { one: 'foo', two: 'bar', three: 'baz' }
|
1582
|
-
c.
|
1555
|
+
c.tracing.instrument :rake, quantize: { args: { show: :all } }
|
1583
1556
|
|
1584
1557
|
# Totally exclude any argument matching :three exactly
|
1585
1558
|
# `rake.invoke.args` tag --> ['?']
|
1586
1559
|
# `rake.execute.args` tag --> { one: '?', two: '?' }
|
1587
|
-
c.
|
1560
|
+
c.tracing.instrument :rake, quantize: { args: { exclude: [:three] } }
|
1588
1561
|
|
1589
1562
|
# Remove the arguments entirely
|
1590
1563
|
# `rake.invoke.args` tag --> ['?']
|
1591
1564
|
# `rake.execute.args` tag --> {}
|
1592
|
-
c.
|
1565
|
+
c.tracing.instrument :rake, quantize: { args: { exclude: :all } }
|
1593
1566
|
end
|
1594
1567
|
```
|
1595
1568
|
|
@@ -1602,7 +1575,7 @@ require 'redis'
|
|
1602
1575
|
require 'ddtrace'
|
1603
1576
|
|
1604
1577
|
Datadog.configure do |c|
|
1605
|
-
c.
|
1578
|
+
c.tracing.instrument :redis, options
|
1606
1579
|
end
|
1607
1580
|
|
1608
1581
|
# Perform Redis commands
|
@@ -1624,14 +1597,14 @@ require 'redis'
|
|
1624
1597
|
require 'ddtrace'
|
1625
1598
|
|
1626
1599
|
Datadog.configure do |c|
|
1627
|
-
c.
|
1600
|
+
c.tracing.instrument :redis # Enabling integration instrumentation is still required
|
1628
1601
|
end
|
1629
1602
|
|
1630
1603
|
customer_cache = Redis.new
|
1631
1604
|
invoice_cache = Redis.new
|
1632
1605
|
|
1633
|
-
Datadog.
|
1634
|
-
Datadog.
|
1606
|
+
Datadog.configure_onto(customer_cache, service_name: 'customer-cache')
|
1607
|
+
Datadog.configure_onto(invoice_cache, service_name: 'invoice-cache')
|
1635
1608
|
|
1636
1609
|
# Traced call will belong to `customer-cache` service
|
1637
1610
|
customer_cache.get(...)
|
@@ -1651,23 +1624,23 @@ You can configure trace settings per connection by using the `describes` option:
|
|
1651
1624
|
|
1652
1625
|
Datadog.configure do |c|
|
1653
1626
|
# The default configuration for any redis client
|
1654
|
-
c.
|
1627
|
+
c.tracing.instrument :redis, service_name: 'redis-default'
|
1655
1628
|
|
1656
1629
|
# The configuration matching a given unix socket.
|
1657
|
-
c.
|
1630
|
+
c.tracing.instrument :redis, describes: { url: 'unix://path/to/file' }, service_name: 'redis-unix'
|
1658
1631
|
|
1659
1632
|
# For network connections, only these fields are considered during matching:
|
1660
1633
|
# scheme, host, port, db
|
1661
1634
|
# Other fields are ignored.
|
1662
1635
|
|
1663
1636
|
# Network connection string
|
1664
|
-
c.
|
1665
|
-
c.
|
1637
|
+
c.tracing.instrument :redis, describes: 'redis://127.0.0.1:6379/0', service_name: 'redis-connection-string'
|
1638
|
+
c.tracing.instrument :redis, describes: { url: 'redis://127.0.0.1:6379/1' }, service_name: 'redis-connection-url'
|
1666
1639
|
# Network client hash
|
1667
|
-
c.
|
1640
|
+
c.tracing.instrument :redis, describes: { host: 'my-host.com', port: 6379, db: 1, scheme: 'redis' }, service_name: 'redis-connection-hash'
|
1668
1641
|
# Only a subset of the connection hash
|
1669
|
-
c.
|
1670
|
-
c.
|
1642
|
+
c.tracing.instrument :redis, describes: { host: ENV['APP_CACHE_HOST'], port: ENV['APP_CACHE_PORT'] }, service_name: 'redis-cache'
|
1643
|
+
c.tracing.instrument :redis, describes: { host: ENV['SIDEKIQ_CACHE_HOST'] }, service_name: 'redis-sidekiq'
|
1671
1644
|
end
|
1672
1645
|
```
|
1673
1646
|
|
@@ -1684,7 +1657,7 @@ require 'resque'
|
|
1684
1657
|
require 'ddtrace'
|
1685
1658
|
|
1686
1659
|
Datadog.configure do |c|
|
1687
|
-
c.
|
1660
|
+
c.tracing.instrument :resque, **options
|
1688
1661
|
end
|
1689
1662
|
```
|
1690
1663
|
|
@@ -1692,9 +1665,7 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1692
1665
|
|
1693
1666
|
| Key | Description | Default |
|
1694
1667
|
| --- | ----------- | ------- |
|
1695
|
-
| `service_name` | Service name used for `resque` instrumentation | `'resque'` |
|
1696
1668
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
1697
|
-
| `workers` | **[DEPRECATED]** Limits instrumented worker classes to only the ones specified in an array (e.g. `[MyJob]`). If not provided, instruments all workers. | `nil` |
|
1698
1669
|
|
1699
1670
|
### Rest Client
|
1700
1671
|
|
@@ -1705,7 +1676,7 @@ require 'rest_client'
|
|
1705
1676
|
require 'ddtrace'
|
1706
1677
|
|
1707
1678
|
Datadog.configure do |c|
|
1708
|
-
c.
|
1679
|
+
c.tracing.instrument :rest_client, options
|
1709
1680
|
end
|
1710
1681
|
```
|
1711
1682
|
|
@@ -1728,7 +1699,7 @@ require 'ddtrace'
|
|
1728
1699
|
|
1729
1700
|
# Configure default RSpec integration
|
1730
1701
|
Datadog.configure do |c|
|
1731
|
-
c.
|
1702
|
+
c.ci.instrument :rspec, options
|
1732
1703
|
end
|
1733
1704
|
```
|
1734
1705
|
|
@@ -1758,7 +1729,7 @@ database.create_table :articles do
|
|
1758
1729
|
end
|
1759
1730
|
|
1760
1731
|
Datadog.configure do |c|
|
1761
|
-
c.
|
1732
|
+
c.tracing.instrument :sequel, options
|
1762
1733
|
end
|
1763
1734
|
|
1764
1735
|
# Perform a query
|
@@ -1781,8 +1752,8 @@ sqlite_database = Sequel.sqlite
|
|
1781
1752
|
postgres_database = Sequel.connect('postgres://user:password@host:port/database_name')
|
1782
1753
|
|
1783
1754
|
# Configure each database with different service names
|
1784
|
-
Datadog.
|
1785
|
-
Datadog.
|
1755
|
+
Datadog.configure_onto(sqlite_database, service_name: 'my-sqlite-db')
|
1756
|
+
Datadog.configure_onto(postgres_database, service_name: 'my-postgres-db')
|
1786
1757
|
```
|
1787
1758
|
|
1788
1759
|
### Shoryuken
|
@@ -1795,7 +1766,7 @@ You can enable it through `Datadog.configure`:
|
|
1795
1766
|
require 'ddtrace'
|
1796
1767
|
|
1797
1768
|
Datadog.configure do |c|
|
1798
|
-
c.
|
1769
|
+
c.tracing.instrument :shoryuken, options
|
1799
1770
|
end
|
1800
1771
|
```
|
1801
1772
|
|
@@ -1803,7 +1774,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1803
1774
|
|
1804
1775
|
| Key | Description | Default |
|
1805
1776
|
| --- | ----------- | ------- |
|
1806
|
-
| `service_name` | Service name used for `shoryuken` instrumentation | `'shoryuken'` |
|
1807
1777
|
| `tag_body` | Tag spans with the SQS message body `true` or `false` | `false` |
|
1808
1778
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
1809
1779
|
|
@@ -1817,7 +1787,7 @@ You can enable it through `Datadog.configure`:
|
|
1817
1787
|
require 'ddtrace'
|
1818
1788
|
|
1819
1789
|
Datadog.configure do |c|
|
1820
|
-
c.
|
1790
|
+
c.tracing.instrument :sidekiq, options
|
1821
1791
|
end
|
1822
1792
|
```
|
1823
1793
|
|
@@ -1825,8 +1795,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1825
1795
|
|
1826
1796
|
| Key | Description | Default |
|
1827
1797
|
| --- | ----------- | ------- |
|
1828
|
-
| `client_service_name` | Service name used for client-side `sidekiq` instrumentation | `'sidekiq-client'` |
|
1829
|
-
| `service_name` | Service name used for server-side `sidekiq` instrumentation | `'sidekiq'` |
|
1830
1798
|
| `tag_args` | Enable tagging of job arguments. `true` for on, `false` for off. | `false` |
|
1831
1799
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
1832
1800
|
|
@@ -1843,7 +1811,7 @@ require 'sinatra'
|
|
1843
1811
|
require 'ddtrace'
|
1844
1812
|
|
1845
1813
|
Datadog.configure do |c|
|
1846
|
-
c.
|
1814
|
+
c.tracing.instrument :sinatra, options
|
1847
1815
|
end
|
1848
1816
|
|
1849
1817
|
get '/' do
|
@@ -1858,11 +1826,11 @@ require 'sinatra/base'
|
|
1858
1826
|
require 'ddtrace'
|
1859
1827
|
|
1860
1828
|
Datadog.configure do |c|
|
1861
|
-
c.
|
1829
|
+
c.tracing.instrument :sinatra, options
|
1862
1830
|
end
|
1863
1831
|
|
1864
1832
|
class NestedApp < Sinatra::Base
|
1865
|
-
register Datadog::Contrib::Sinatra::Tracer
|
1833
|
+
register Datadog::Tracing::Contrib::Sinatra::Tracer
|
1866
1834
|
|
1867
1835
|
get '/nested' do
|
1868
1836
|
'Hello from nested app!'
|
@@ -1870,7 +1838,7 @@ class NestedApp < Sinatra::Base
|
|
1870
1838
|
end
|
1871
1839
|
|
1872
1840
|
class App < Sinatra::Base
|
1873
|
-
register Datadog::Contrib::Sinatra::Tracer
|
1841
|
+
register Datadog::Tracing::Contrib::Sinatra::Tracer
|
1874
1842
|
|
1875
1843
|
use NestedApp
|
1876
1844
|
|
@@ -1880,7 +1848,7 @@ class App < Sinatra::Base
|
|
1880
1848
|
end
|
1881
1849
|
```
|
1882
1850
|
|
1883
|
-
Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before you mount your nested applications.
|
1851
|
+
Ensure you register `Datadog::Tracing::Contrib::Sinatra::Tracer` as a middleware before you mount your nested applications.
|
1884
1852
|
|
1885
1853
|
#### Instrumentation options
|
1886
1854
|
|
@@ -1891,7 +1859,6 @@ Ensure you register `Datadog::Contrib::Sinatra::Tracer` as a middleware before y
|
|
1891
1859
|
| `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` |
|
1892
1860
|
| `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'] }` |
|
1893
1861
|
| `resource_script_names` | Prepend resource names with script name | `false` |
|
1894
|
-
| `service_name` | Service name used for `sinatra` instrumentation | `'sinatra'` |
|
1895
1862
|
|
1896
1863
|
### Sneakers
|
1897
1864
|
|
@@ -1903,7 +1870,7 @@ You can enable it through `Datadog.configure`:
|
|
1903
1870
|
require 'ddtrace'
|
1904
1871
|
|
1905
1872
|
Datadog.configure do |c|
|
1906
|
-
c.
|
1873
|
+
c.tracing.instrument :sneakers, options
|
1907
1874
|
end
|
1908
1875
|
```
|
1909
1876
|
|
@@ -1912,7 +1879,6 @@ Where `options` is an optional `Hash` that accepts the following parameters:
|
|
1912
1879
|
| Key | Description | Default |
|
1913
1880
|
| --- | ----------- | ------- |
|
1914
1881
|
| `enabled` | Defines whether Sneakers should be traced. Useful for temporarily disabling tracing. `true` or `false` | `true` |
|
1915
|
-
| `service_name` | Service name used for `sneakers` instrumentation | `'sneakers'` |
|
1916
1882
|
| `tag_body` | Enable tagging of job message. `true` for on, `false` for off. | `false` |
|
1917
1883
|
| `error_handler` | Custom error handler invoked when a job raises an error. Provided `span` and `error` as arguments. Sets error on the span by default. Useful for ignoring transient errors. | `proc { |span, error| span.set_error(error) unless span.nil? }` |
|
1918
1884
|
|
@@ -1924,63 +1890,48 @@ The `sucker_punch` integration traces all scheduled jobs:
|
|
1924
1890
|
require 'ddtrace'
|
1925
1891
|
|
1926
1892
|
Datadog.configure do |c|
|
1927
|
-
c.
|
1893
|
+
c.tracing.instrument :sucker_punch
|
1928
1894
|
end
|
1929
1895
|
|
1930
1896
|
# Execution of this job is traced
|
1931
1897
|
LogJob.perform_async('login')
|
1932
1898
|
```
|
1933
1899
|
|
1934
|
-
Where `options` is an optional `Hash` that accepts the following parameters:
|
1935
|
-
|
1936
|
-
| Key | Description | Default |
|
1937
|
-
| --- | ----------- | ------- |
|
1938
|
-
| `service_name` | Service name used for `sucker_punch` instrumentation | `'sucker_punch'` |
|
1939
|
-
|
1940
1900
|
## Advanced configuration
|
1941
1901
|
|
1942
|
-
###
|
1902
|
+
### Environment variables
|
1943
1903
|
|
1944
|
-
|
1904
|
+
- `DD_AGENT_HOST`: Hostname of agent to where traces will be sent. See [Tracer settings](#tracer-settings) for more details.
|
1905
|
+
- `DD_ENV`: Your application environment. See [Environment and tags](#environment-and-tags) for more details.
|
1906
|
+
- `DD_LOGS_INJECTION`: Injects [Trace Correlation](#trace-correlation) information into Rails logs, if present. Supports the default logger (`ActiveSupport::TaggedLogging`), `lograge`, and `semantic_logger`. Valid values are: `true` (default) or `false`. e.g. `DD_LOGS_INJECTION=false`.
|
1907
|
+
- `DD_PROPAGATION_STYLE_EXTRACT`: Distributed tracing header formats to extract. See [Distributed Tracing](#distributed-tracing) for more details.
|
1908
|
+
- `DD_PROPAGATION_STYLE_INJECT`: Distributed tracing header formats to inject. See [Distributed Tracing](#distributed-tracing) for more details.
|
1909
|
+
- `DD_SERVICE`: Your application's default service name. See [Environment and tags](#environment-and-tags) for more details.
|
1910
|
+
- `DD_TAGS`: Custom tags for telemetry produced by your application. See [Environment and tags](#environment-and-tags) for more details.
|
1911
|
+
- `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.tracing.instrument :integration }`).on code. This environment variable can only be used to disable an integration.
|
1912
|
+
- `DD_TRACE_AGENT_PORT`: Port to where traces will be sent. See [Tracer settings](#tracer-settings) for more details.
|
1913
|
+
- `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`.
|
1914
|
+
- `DD_TRACE_ANALYTICS_ENABLED`: Enables or disables trace analytics. See [Sampling](#sampling) for more details.
|
1915
|
+
- `DD_TRACE_RATE_LIMIT`: Sets a rate limit for sampling. See [Sampling](#sampling) for more details.
|
1916
|
+
- `DD_TRACE_REPORT_HOSTNAME`: Enables ot disables hostname tags on traces.
|
1917
|
+
- `DD_TRACE_SAMPLE_RATE`: Sets the trace sampling rate between `0.0` (0%) and `1.0` (100%, recommended). `1.0` or Tracing without Limits™, allows you to send all of your traffic and retention can be [configured within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/). When this configuration is not set, the Datadog agent will keep an intelligent assortment of diverse traces.
|
1918
|
+
- `DD_TRACE_TEST_MODE_ENABLED`: Enables or disables test mode, for use of tracing in test suites.
|
1919
|
+
- `DD_VERSION`: Your application version. See [Environment and tags](#environment-and-tags) for more details.
|
1920
|
+
|
1921
|
+
### Global settings
|
1945
1922
|
|
1946
1923
|
```ruby
|
1947
1924
|
# config/initializers/datadog-tracer.rb
|
1948
|
-
|
1949
1925
|
Datadog.configure do |c|
|
1950
|
-
c.
|
1951
|
-
c.
|
1952
|
-
c.tracer.port = 8126
|
1953
|
-
|
1954
|
-
# Ensure all traces are ingested by Datadog
|
1955
|
-
c.sampling.default_rate = 1.0 # Recommended
|
1956
|
-
c.sampling.rate_limit = 200
|
1957
|
-
# or provide a custom implementation (overrides c.sampling settings)
|
1958
|
-
c.tracer.sampler = Datadog::AllSampler.new
|
1959
|
-
|
1960
|
-
# Breaks down very large traces into smaller batches
|
1961
|
-
c.tracer.partial_flush.enabled = false
|
1962
|
-
|
1963
|
-
# You can specify your own tracer
|
1964
|
-
c.tracer.instance = Datadog::Tracer.new
|
1965
|
-
|
1966
|
-
# To enable debug mode
|
1967
|
-
c.diagnostics.debug = true
|
1926
|
+
c.agent.host = 'custom-agent-host'
|
1927
|
+
c.agent.port = 8126
|
1968
1928
|
end
|
1969
1929
|
```
|
1970
1930
|
|
1971
1931
|
Available options are:
|
1972
1932
|
|
1973
|
-
|
1974
|
-
|
1975
|
-
- `instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
|
1976
|
-
- `partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
|
1977
|
-
- `port`: set the port the trace agent is listening on.
|
1978
|
-
- `sampling.default_rate`: default tracer sampling rate, between `0.0` (0%) and `1.0` (100%, recommended). `1.0` or Tracing without Limits™, allows you to send all of your traffic and retention can be [configured within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/). When this configuration is not set, the Datadog agent will keep an intelligent assortment of diverse traces.
|
1979
|
-
- `sampling.rate_limit`: maximum number of traces per second to sample. Defaults to 100 per second.
|
1980
|
-
- `sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
1981
|
-
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
1982
|
-
- `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
|
1983
|
-
- `time_now_provider`: when testing, it might be helpful to use a different time provider. For Timecop, for example, `->{ Time.now_without_mock_time }` allows the tracer to use the real wall time. Span duration calculation will still use the system monotonic clock when available, thus not being affected by this setting. Defaults to `->{ Time.now }`.
|
1933
|
+
- `agent.host`: set the hostname of the trace agent. Defaults to `127.0.0.1`.
|
1934
|
+
- `agent.port`: set the APM TCP port the Datadog Agent listening on. Defaults to `8126`.
|
1984
1935
|
|
1985
1936
|
#### Custom logging
|
1986
1937
|
|
@@ -1993,14 +1944,14 @@ Additionally, it is possible to override the default logger and replace it by a
|
|
1993
1944
|
```ruby
|
1994
1945
|
f = File.new("my-custom.log", "w+") # Log messages should go there
|
1995
1946
|
Datadog.configure do |c|
|
1996
|
-
c.logger = Logger.new(f) # Overriding the default logger
|
1947
|
+
c.logger.instance = Logger.new(f) # Overriding the default logger
|
1997
1948
|
c.logger.level = ::Logger::INFO
|
1998
1949
|
end
|
1999
1950
|
|
2000
1951
|
Datadog.logger.info { "this is typically called by tracing code" }
|
2001
1952
|
```
|
2002
1953
|
|
2003
|
-
|
1954
|
+
#### Environment and tags
|
2004
1955
|
|
2005
1956
|
By default, the trace agent (not this library, but the program running in the background collecting data from various clients) uses the tags set in the agent config file, see our [environments tutorial](https://app.datadoghq.com/apm/docs/tutorials/environments) for details.
|
2006
1957
|
|
@@ -2028,14 +1979,59 @@ This enables you to set this value on a per application basis, so you can have f
|
|
2028
1979
|
|
2029
1980
|
Tags can also be set directly on individual spans, which will supersede any conflicting tags defined at the application level.
|
2030
1981
|
|
2031
|
-
|
1982
|
+
#### Debugging and diagnostics
|
2032
1983
|
|
2033
|
-
|
1984
|
+
You can activate debugging features by using `Datadog.configure`:
|
2034
1985
|
|
2035
|
-
|
2036
|
-
-
|
2037
|
-
|
2038
|
-
|
1986
|
+
```ruby
|
1987
|
+
# config/initializers/datadog-tracer.rb
|
1988
|
+
|
1989
|
+
# Global settings are set here:
|
1990
|
+
Datadog.configure do |c|
|
1991
|
+
# To enable debug mode
|
1992
|
+
c.diagnostics.debug = true
|
1993
|
+
end
|
1994
|
+
```
|
1995
|
+
|
1996
|
+
Available options are:
|
1997
|
+
|
1998
|
+
- `diagnostics.debug`: set to true to enable debug logging. Can be configured through the `DD_TRACE_DEBUG` environment variable. Defaults to `false`.
|
1999
|
+
- `diagnostics.startup_logs.enabled`: Startup configuration and diagnostic log. Defaults to `true`. Can be configured through the `DD_TRACE_STARTUP_LOGS` environment variable.
|
2000
|
+
- `time_now_provider`: when testing, it might be helpful to use a different time provider. For Timecop, for example, `->{ Time.now_without_mock_time }` allows the tracer to use the real wall time. Span duration calculation will still use the system monotonic clock when available, thus not being affected by this setting. Defaults to `->{ Time.now }`.
|
2001
|
+
|
2002
|
+
### Tracer settings
|
2003
|
+
|
2004
|
+
To change the default behavior of the Datadog tracer, you can provide custom options inside the `Datadog.configure` block as in:
|
2005
|
+
|
2006
|
+
```ruby
|
2007
|
+
# config/initializers/datadog-tracer.rb
|
2008
|
+
# Tracer settings are set here:
|
2009
|
+
Datadog.configure do |c|
|
2010
|
+
c.tracing.enabled = true
|
2011
|
+
|
2012
|
+
# Ensure all traces are ingested by Datadog
|
2013
|
+
c.tracing.sampling.default_rate = 1.0 # Recommended
|
2014
|
+
c.tracing.sampling.rate_limit = 200
|
2015
|
+
# or provide a custom implementation (overrides c.tracing.sampling settings)
|
2016
|
+
c.tracing.sampler = Datadog::Tracing::Sampling::AllSampler.new
|
2017
|
+
|
2018
|
+
# Breaks down very large traces into smaller batches
|
2019
|
+
c.tracing.partial_flush.enabled = false
|
2020
|
+
|
2021
|
+
# You can specify your own tracer
|
2022
|
+
c.tracing.instance = Datadog::Tracing::Tracer.new
|
2023
|
+
end
|
2024
|
+
```
|
2025
|
+
|
2026
|
+
Available options are:
|
2027
|
+
|
2028
|
+
- `tracing.log_injection`: Injects [Trace Correlation](#trace-correlation) information into Rails logs, if present. Defaults to `true`.
|
2029
|
+
- `sampling.default_rate`: default tracer sampling rate, between `0.0` (0%) and `1.0` (100%, recommended). `1.0` or Tracing without Limits™, allows you to send all of your traffic and retention can be [configured within the Datadog app](https://docs.datadoghq.com/tracing/trace_retention_and_ingestion/). When this configuration is not set, the Datadog agent will keep an intelligent assortment of diverse traces.
|
2030
|
+
- `sampling.rate_limit`: maximum number of traces per second to sample. Defaults to 100 per second.
|
2031
|
+
- `tracing.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`.
|
2032
|
+
- `tracing.instance`: set to a custom `Datadog::Tracer` instance. If provided, other trace settings are ignored (you must configure it manually.)
|
2033
|
+
- `tracing.partial_flush.enabled`: set to `true` to enable partial trace flushing (for long running traces.) Disabled by default. *Experimental.*
|
2034
|
+
- `tracing.sampler`: set to a custom `Datadog::Sampler` instance. If provided, the tracer will use this sampler to determine sampling behavior.
|
2039
2035
|
|
2040
2036
|
### Sampling
|
2041
2037
|
|
@@ -2043,7 +2039,7 @@ Datadog's Tracing without Limits™ allows you to send all of your traffic and [
|
|
2043
2039
|
|
2044
2040
|
We recommend setting the environment variable `DD_TRACE_SAMPLE_RATE=1.0` in all new applications using `ddtrace`.
|
2045
2041
|
|
2046
|
-
App Analytics, previously configured with the `
|
2042
|
+
App Analytics, previously configured with the `tracing.analytics.enabled` setting, is deprecated in favor of Tracing without Limits™. Documentation for this [deprecated configuration is still available](https://docs.datadoghq.com/tracing/legacy_app_analytics/).
|
2047
2043
|
|
2048
2044
|
#### Application-side sampling
|
2049
2045
|
|
@@ -2051,14 +2047,14 @@ While the trace agent can sample traces to reduce bandwidth usage, application-s
|
|
2051
2047
|
|
2052
2048
|
This will **reduce visibility and is not recommended**. See [DD_TRACE_SAMPLE_RATE](#environment-variables) for the recommended sampling approach.
|
2053
2049
|
|
2054
|
-
`Datadog::RateSampler` samples a ratio of the traces. For example:
|
2050
|
+
`Datadog::Tracing::Sampling::RateSampler` samples a ratio of the traces. For example:
|
2055
2051
|
|
2056
2052
|
```ruby
|
2057
2053
|
# Sample rate is between 0 (nothing sampled) to 1 (everything sampled).
|
2058
|
-
sampler = Datadog::RateSampler.new(0.5) # sample 50% of the traces
|
2054
|
+
sampler = Datadog::Tracing::Sampling::RateSampler.new(0.5) # sample 50% of the traces
|
2059
2055
|
|
2060
2056
|
Datadog.configure do |c|
|
2061
|
-
c.
|
2057
|
+
c.tracing.sampler = sampler
|
2062
2058
|
end
|
2063
2059
|
```
|
2064
2060
|
|
@@ -2068,29 +2064,43 @@ Priority sampling decides whether to keep a trace by using a priority attribute
|
|
2068
2064
|
|
2069
2065
|
The sampler can set the priority to the following values:
|
2070
2066
|
|
2071
|
-
- `Datadog::Ext::Priority::AUTO_REJECT`: the sampler automatically decided to reject the trace.
|
2072
|
-
- `Datadog::Ext::Priority::AUTO_KEEP`: the sampler automatically decided to keep the trace.
|
2067
|
+
- `Datadog::Tracing::Sampling::Ext::Priority::AUTO_REJECT`: the sampler automatically decided to reject the trace.
|
2068
|
+
- `Datadog::Tracing::Sampling::Ext::Priority::AUTO_KEEP`: the sampler automatically decided to keep the trace.
|
2073
2069
|
|
2074
2070
|
Priority sampling is enabled by default. Enabling it ensures that your sampled distributed traces will be complete. Once enabled, the sampler will automatically assign a priority of 0 or 1 to traces, depending on their service and volume.
|
2075
2071
|
|
2076
|
-
You can also set this priority manually to either drop a non-interesting trace or to keep an important one. For that, set the `
|
2072
|
+
You can also set this priority manually to either drop a non-interesting trace or to keep an important one. For that, set the `TraceOperation#sampling_priority` to:
|
2077
2073
|
|
2078
|
-
- `Datadog::Ext::Priority::USER_REJECT`: the user asked to reject the trace.
|
2079
|
-
- `Datadog::Ext::Priority::USER_KEEP`: the user asked to keep the trace.
|
2074
|
+
- `Datadog::Tracing::Sampling::Ext::Priority::USER_REJECT`: the user asked to reject the trace.
|
2075
|
+
- `Datadog::Tracing::Sampling::Ext::Priority::USER_KEEP`: the user asked to keep the trace.
|
2080
2076
|
|
2081
2077
|
When not using [distributed tracing](#distributed-tracing), you may change the priority at any time, as long as the trace incomplete. But it has to be done before any context propagation (fork, RPC calls) to be useful in a distributed context. Changing the priority after the context has been propagated causes different parts of a distributed trace to use different priorities. Some parts might be kept, some parts might be rejected, and this can cause the trace to be partially stored and remain incomplete.
|
2082
2078
|
|
2083
|
-
|
2079
|
+
For this reason, if you change the priority, we recommend you do it as early as possible.
|
2080
|
+
|
2081
|
+
To change the sampling priority, you can use the following methods:
|
2082
|
+
|
2083
|
+
```ruby
|
2084
|
+
# Rejects the active trace
|
2085
|
+
Datadog::Tracing.reject!
|
2086
|
+
|
2087
|
+
# Keeps the active trace
|
2088
|
+
Datadog::Tracing.keep!
|
2089
|
+
```
|
2090
|
+
|
2091
|
+
It's safe to use `Datadog::Tracing.reject!` and `Datadog::Tracing.keep!` when no trace is active.
|
2092
|
+
|
2093
|
+
You can also reject a specific trace instance:
|
2084
2094
|
|
2085
2095
|
```ruby
|
2086
2096
|
# First, grab the active span
|
2087
|
-
|
2097
|
+
trace = Datadog::Tracing.active_trace
|
2088
2098
|
|
2089
|
-
#
|
2090
|
-
|
2099
|
+
# Rejects the trace
|
2100
|
+
trace.reject!
|
2091
2101
|
|
2092
|
-
#
|
2093
|
-
|
2102
|
+
# Keeps the trace
|
2103
|
+
trace.keep!
|
2094
2104
|
```
|
2095
2105
|
|
2096
2106
|
### Distributed Tracing
|
@@ -2195,6 +2205,33 @@ Service C:
|
|
2195
2205
|
Priority: 1
|
2196
2206
|
```
|
2197
2207
|
|
2208
|
+
**Distributed header formats**
|
2209
|
+
|
2210
|
+
Tracing supports the following distributed trace formats:
|
2211
|
+
|
2212
|
+
- `Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG` (Default)
|
2213
|
+
- `Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3`
|
2214
|
+
- `Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER`
|
2215
|
+
|
2216
|
+
You can enable/disable the use of these formats via `Datadog.configure`:
|
2217
|
+
|
2218
|
+
```ruby
|
2219
|
+
Datadog.configure do |c|
|
2220
|
+
# List of header formats that should be extracted
|
2221
|
+
c.tracing.distributed_tracing.propagation_extract_style = [
|
2222
|
+
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG,
|
2223
|
+
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3,
|
2224
|
+
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER
|
2225
|
+
|
2226
|
+
]
|
2227
|
+
|
2228
|
+
# List of header formats that should be injected
|
2229
|
+
c.tracing.distributed_tracing.propagation_inject_style = [
|
2230
|
+
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG
|
2231
|
+
]
|
2232
|
+
end
|
2233
|
+
```
|
2234
|
+
|
2198
2235
|
**Activating distributed tracing for integrations**
|
2199
2236
|
|
2200
2237
|
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.
|
@@ -2218,24 +2255,24 @@ For more details on how to activate distributed tracing for integrations, see th
|
|
2218
2255
|
|
2219
2256
|
**Using the HTTP propagator**
|
2220
2257
|
|
2221
|
-
To make the process of propagating this metadata easier, you can use the `Datadog::
|
2258
|
+
To make the process of propagating this metadata easier, you can use the `Datadog::Tracing::Propagation::HTTP` module.
|
2222
2259
|
|
2223
2260
|
On the client:
|
2224
2261
|
|
2225
2262
|
```ruby
|
2226
|
-
Datadog.
|
2227
|
-
# Inject
|
2228
|
-
Datadog::
|
2263
|
+
Datadog::Tracing.trace('web.call') do |span, trace|
|
2264
|
+
# Inject trace headers into request headers (`env` must be a Hash)
|
2265
|
+
Datadog::Tracing::Propagation::HTTP.inject!(trace.to_digest, env)
|
2229
2266
|
end
|
2230
2267
|
```
|
2231
2268
|
|
2232
2269
|
On the server:
|
2233
2270
|
|
2234
2271
|
```ruby
|
2235
|
-
Datadog.
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2272
|
+
trace_digest = Datadog::Tracing::Propagation::HTTP.extract(request.env)
|
2273
|
+
|
2274
|
+
Datadog::Tracing.trace('web.work', continue_from: trace_digest) do |span|
|
2275
|
+
# Do web work...
|
2239
2276
|
end
|
2240
2277
|
```
|
2241
2278
|
|
@@ -2261,147 +2298,87 @@ Then you must enable the request queuing feature, by setting `request_queuing: t
|
|
2261
2298
|
|
2262
2299
|
### Processing Pipeline
|
2263
2300
|
|
2264
|
-
Some applications might require that traces be altered or filtered out before they are sent
|
2265
|
-
|
2266
|
-
Processors can be any object that responds to `#call` accepting `trace` as an argument (which is an `Array` of `Datadog::Span`s.)
|
2267
|
-
|
2268
|
-
For example:
|
2269
|
-
|
2270
|
-
```ruby
|
2271
|
-
lambda_processor = ->(trace) do
|
2272
|
-
# Processing logic...
|
2273
|
-
trace
|
2274
|
-
end
|
2275
|
-
|
2276
|
-
class MyCustomProcessor
|
2277
|
-
def call(trace)
|
2278
|
-
# Processing logic...
|
2279
|
-
trace
|
2280
|
-
end
|
2281
|
-
end
|
2282
|
-
custom_processor = MyFancyProcessor.new
|
2283
|
-
```
|
2284
|
-
|
2285
|
-
`#call` blocks of processors *must* return the `trace` object; this return value will be passed to the next processor in the pipeline.
|
2286
|
-
|
2287
|
-
These processors must then be added to the pipeline via `Datadog::Pipeline.before_flush`:
|
2288
|
-
|
2289
|
-
```ruby
|
2290
|
-
Datadog::Pipeline.before_flush(lambda_processor, custom_processor)
|
2291
|
-
```
|
2292
|
-
|
2293
|
-
You can also define processors using the short-hand block syntax for `Datadog::Pipeline.before_flush`:
|
2294
|
-
|
2295
|
-
```ruby
|
2296
|
-
Datadog::Pipeline.before_flush do |trace|
|
2297
|
-
trace.delete_if { |span| span.name =~ /forbidden/ }
|
2298
|
-
end
|
2299
|
-
```
|
2301
|
+
Some applications might require that traces be altered or filtered out before they are sent to Datadog. The processing pipeline allows you to create *processors* to define such behavior.
|
2300
2302
|
|
2301
2303
|
#### Filtering
|
2302
2304
|
|
2303
|
-
You can use the `Datadog::Pipeline::SpanFilter` processor to remove spans, when the block evaluates as truthy:
|
2305
|
+
You can use the `Datadog::Tracing::Pipeline::SpanFilter` processor to remove spans, when the block evaluates as truthy:
|
2304
2306
|
|
2305
2307
|
```ruby
|
2306
|
-
Datadog::
|
2308
|
+
Datadog::Tracing.before_flush(
|
2307
2309
|
# Remove spans that match a particular resource
|
2308
|
-
Datadog::Pipeline::SpanFilter.new { |span| span.resource =~ /PingController/ },
|
2310
|
+
Datadog::Tracing::Pipeline::SpanFilter.new { |span| span.resource =~ /PingController/ },
|
2309
2311
|
# Remove spans that are trafficked to localhost
|
2310
|
-
Datadog::Pipeline::SpanFilter.new { |span| span.get_tag('host') == 'localhost' }
|
2312
|
+
Datadog::Tracing::Pipeline::SpanFilter.new { |span| span.get_tag('host') == 'localhost' }
|
2311
2313
|
)
|
2312
2314
|
```
|
2313
2315
|
|
2314
2316
|
#### Processing
|
2315
2317
|
|
2316
|
-
You can use the `Datadog::Pipeline::SpanProcessor` processor to modify spans:
|
2318
|
+
You can use the `Datadog::Tracing::Pipeline::SpanProcessor` processor to modify spans:
|
2317
2319
|
|
2318
2320
|
```ruby
|
2319
|
-
Datadog::
|
2321
|
+
Datadog::Tracing.before_flush(
|
2320
2322
|
# Strip matching text from the resource field
|
2321
|
-
Datadog::Pipeline::SpanProcessor.new { |span| span.resource.gsub!(/password=.*/, '') }
|
2323
|
+
Datadog::Tracing::Pipeline::SpanProcessor.new { |span| span.resource.gsub!(/password=.*/, '') }
|
2322
2324
|
)
|
2323
2325
|
```
|
2324
2326
|
|
2325
|
-
|
2326
|
-
|
2327
|
-
In many cases, such as logging, it may be useful to correlate trace IDs to other events or data streams, for easier cross-referencing.
|
2327
|
+
#### Custom processor
|
2328
2328
|
|
2329
|
-
|
2330
|
-
|
2331
|
-
##### Automatic
|
2329
|
+
Processors can be any object that responds to `#call` accepting `trace` as an argument (which is an `Array` of `Datadog::Span`s.)
|
2332
2330
|
|
2333
|
-
For
|
2331
|
+
For example, using the short-hand block syntax:
|
2334
2332
|
|
2335
2333
|
```ruby
|
2336
|
-
|
2337
|
-
|
2338
|
-
|
2339
|
-
Datadog.configure do |c|
|
2340
|
-
c.use :rails, log_injection: true
|
2334
|
+
Datadog::Tracing.before_flush do |trace|
|
2335
|
+
# Processing logic...
|
2336
|
+
trace
|
2341
2337
|
end
|
2342
2338
|
```
|
2343
2339
|
|
2344
|
-
|
2345
|
-
|
2346
|
-
After [setting up Lograge in a Rails application](https://docs.datadoghq.com/logs/log_collection/ruby/), manually modify the `custom_options` block in your environment configuration file (e.g. `config/environments/production.rb`) to add the trace IDs.
|
2340
|
+
For a custom processor class:
|
2347
2341
|
|
2348
2342
|
```ruby
|
2349
|
-
|
2350
|
-
|
2351
|
-
|
2352
|
-
|
2353
|
-
|
2354
|
-
# Adds IDs as tags to log output
|
2355
|
-
:dd => {
|
2356
|
-
# To preserve precision during JSON serialization, use strings for large numbers
|
2357
|
-
:trace_id => correlation.trace_id.to_s,
|
2358
|
-
:span_id => correlation.span_id.to_s,
|
2359
|
-
:env => correlation.env.to_s,
|
2360
|
-
:service => correlation.service.to_s,
|
2361
|
-
:version => correlation.version.to_s
|
2362
|
-
},
|
2363
|
-
:ddsource => ["ruby"],
|
2364
|
-
:params => event.payload[:params].reject { |k| %w(controller action).include? k }
|
2365
|
-
}
|
2343
|
+
class MyCustomProcessor
|
2344
|
+
def call(trace)
|
2345
|
+
# Processing logic...
|
2346
|
+
trace
|
2347
|
+
end
|
2366
2348
|
end
|
2349
|
+
|
2350
|
+
Datadog::Tracing.before_flush(MyCustomProcessor.new)
|
2367
2351
|
```
|
2368
2352
|
|
2369
|
-
|
2353
|
+
In both cases, the processor method *must* return the `trace` object; this return value will be passed to the next processor in the pipeline.
|
2370
2354
|
|
2371
|
-
|
2355
|
+
### Trace correlation
|
2372
2356
|
|
2373
|
-
|
2374
|
-
Rails.application.configure do
|
2375
|
-
config.log_tags = [proc { Datadog.tracer.active_correlation.to_s }]
|
2376
|
-
end
|
2357
|
+
In many cases, such as logging, it may be useful to correlate trace IDs to other events or data streams, for easier cross-referencing.
|
2377
2358
|
|
2378
|
-
|
2379
|
-
# DD_ENV = 'production' (The name of the environment your application is running in.)
|
2380
|
-
# DD_SERVICE = 'billing-api' (Default service name of your application.)
|
2381
|
-
# DD_VERSION = '2.5.17' (The version of your application.)
|
2359
|
+
#### For logging in Rails applications
|
2382
2360
|
|
2383
|
-
|
2384
|
-
|
2385
|
-
|
2386
|
-
|
2387
|
-
|
2388
|
-
```
|
2361
|
+
##### Automatic
|
2362
|
+
|
2363
|
+
For Rails applications using the default logger (`ActiveSupport::TaggedLogging`), `lograge` or `semantic_logger`, trace correlation injection is enabled by default.
|
2364
|
+
|
2365
|
+
It can be disabled by setting the environment variable `DD_LOGS_INJECTION=false`.
|
2389
2366
|
|
2390
2367
|
#### For logging in Ruby applications
|
2391
2368
|
|
2392
|
-
To add correlation IDs to your logger, add a log formatter which retrieves the correlation IDs with `Datadog.
|
2369
|
+
To add correlation IDs to your logger, add a log formatter which retrieves the correlation IDs with `Datadog::Tracing.correlation`, then add them to the message.
|
2393
2370
|
|
2394
2371
|
To properly correlate with Datadog logging, be sure the following is present in the log message, in order as they appear:
|
2395
2372
|
|
2396
|
-
- `dd.env=<ENV>`: Where `<ENV>` is equal to `Datadog.
|
2397
|
-
- `dd.service=<SERVICE>`: Where `<SERVICE>` is equal to `Datadog.
|
2398
|
-
- `dd.version=<VERSION>`: Where `<VERSION>` is equal to `Datadog.
|
2399
|
-
- `dd.trace_id=<TRACE_ID>`: Where `<TRACE_ID>` is equal to `Datadog.
|
2400
|
-
- `dd.span_id=<SPAN_ID>`: Where `<SPAN_ID>` is equal to `Datadog.
|
2373
|
+
- `dd.env=<ENV>`: Where `<ENV>` is equal to `Datadog::Tracing.correlation.env`. Omit if no environment is configured.
|
2374
|
+
- `dd.service=<SERVICE>`: Where `<SERVICE>` is equal to `Datadog::Tracing.correlation.service`. Omit if no default service name is configured.
|
2375
|
+
- `dd.version=<VERSION>`: Where `<VERSION>` is equal to `Datadog::Tracing.correlation.version`. Omit if no application version is configured.
|
2376
|
+
- `dd.trace_id=<TRACE_ID>`: Where `<TRACE_ID>` is equal to `Datadog::Tracing.correlation.trace_id` or `0` if no trace is active during logging.
|
2377
|
+
- `dd.span_id=<SPAN_ID>`: Where `<SPAN_ID>` is equal to `Datadog::Tracing.correlation.span_id` or `0` if no trace is active during logging.
|
2401
2378
|
|
2402
|
-
|
2379
|
+
`Datadog::Tracing.log_correlation` will return `dd.env=<ENV> dd.service=<SERVICE> dd.version=<VERSION> dd.trace_id=<TRACE_ID> dd.span_id=<SPAN_ID>`.
|
2403
2380
|
|
2404
|
-
If a trace is not active and the application environment & version is not configured, it will return `dd.
|
2381
|
+
If a trace is not active and the application environment & version is not configured, it will return `dd.env= dd.service= dd.version= dd.trace_id=0 dd.span_id=0`.
|
2405
2382
|
|
2406
2383
|
An example of this in practice:
|
2407
2384
|
|
@@ -2416,7 +2393,7 @@ ENV['DD_VERSION'] = '2.5.17'
|
|
2416
2393
|
logger = Logger.new(STDOUT)
|
2417
2394
|
logger.progname = 'my_app'
|
2418
2395
|
logger.formatter = proc do |severity, datetime, progname, msg|
|
2419
|
-
"[#{datetime}][#{progname}][#{severity}][#{Datadog.
|
2396
|
+
"[#{datetime}][#{progname}][#{severity}][#{Datadog::Tracing.log_correlation}] #{msg}\n"
|
2420
2397
|
end
|
2421
2398
|
|
2422
2399
|
# When no trace is active
|
@@ -2424,7 +2401,7 @@ logger.warn('This is an untraced operation.')
|
|
2424
2401
|
# [2019-01-16 18:38:41 +0000][my_app][WARN][dd.env=production dd.service=billing-api dd.version=2.5.17 dd.trace_id=0 dd.span_id=0] This is an untraced operation.
|
2425
2402
|
|
2426
2403
|
# When a trace is active
|
2427
|
-
Datadog.
|
2404
|
+
Datadog::Tracing.trace('my.operation') { logger.warn('This is a traced operation.') }
|
2428
2405
|
# [2019-01-16 18:38:41 +0000][my_app][WARN][dd.env=production dd.service=billing-api dd.version=2.5.17 dd.trace_id=8545847825299552251 dd.span_id=3711755234730770098] This is a traced operation.
|
2429
2406
|
```
|
2430
2407
|
|
@@ -2442,7 +2419,7 @@ The `Net` adapter submits traces using `Net::HTTP` over TCP. It is the default t
|
|
2442
2419
|
|
2443
2420
|
```ruby
|
2444
2421
|
Datadog.configure do |c|
|
2445
|
-
c.
|
2422
|
+
c.tracing.transport_options = proc { |t|
|
2446
2423
|
# Hostname, port, and additional options. :timeout is in seconds.
|
2447
2424
|
t.adapter :net_http, '127.0.0.1', 8126, { timeout: 1 }
|
2448
2425
|
}
|
@@ -2457,7 +2434,7 @@ To use, first configure your trace agent to listen by Unix socket, then configur
|
|
2457
2434
|
|
2458
2435
|
```ruby
|
2459
2436
|
Datadog.configure do |c|
|
2460
|
-
c.
|
2437
|
+
c.tracing.transport_options = proc { |t|
|
2461
2438
|
# Provide local path to trace agent Unix socket
|
2462
2439
|
t.adapter :unix, '/tmp/ddagent/trace.sock'
|
2463
2440
|
}
|
@@ -2470,7 +2447,7 @@ The `Test` adapter is a no-op transport that can optionally buffer requests. For
|
|
2470
2447
|
|
2471
2448
|
```ruby
|
2472
2449
|
Datadog.configure do |c|
|
2473
|
-
c.
|
2450
|
+
c.tracing.transport_options = proc { |t|
|
2474
2451
|
# Set transport to no-op mode. Does not retain traces.
|
2475
2452
|
t.adapter :test
|
2476
2453
|
|
@@ -2487,7 +2464,7 @@ Custom adapters can be configured with:
|
|
2487
2464
|
|
2488
2465
|
```ruby
|
2489
2466
|
Datadog.configure do |c|
|
2490
|
-
c.
|
2467
|
+
c.tracing.transport_options = proc { |t|
|
2491
2468
|
# Initialize and pass an instance of the adapter
|
2492
2469
|
custom_adapter = CustomAdapter.new
|
2493
2470
|
t.adapter custom_adapter
|
@@ -2556,7 +2533,7 @@ The underlying Datadog tracer can be configured by passing options (which match
|
|
2556
2533
|
|
2557
2534
|
```ruby
|
2558
2535
|
# Where `options` is a Hash of options provided to Datadog::Tracer
|
2559
|
-
OpenTracing.global_tracer = Datadog::OpenTracer::Tracer.new(options)
|
2536
|
+
OpenTracing.global_tracer = Datadog::OpenTracer::Tracer.new(**options)
|
2560
2537
|
```
|
2561
2538
|
|
2562
2539
|
It can also be configured by using `Datadog.configure` described in the [Tracer settings](#tracer-settings) section.
|