ddtrace 1.9.0 → 1.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +77 -1
- data/LICENSE-3rdparty.csv +1 -0
- data/ext/ddtrace_profiling_loader/extconf.rb +0 -2
- data/ext/ddtrace_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +81 -36
- data/ext/ddtrace_profiling_native_extension/collectors_idle_sampling_helper.c +3 -3
- data/ext/ddtrace_profiling_native_extension/collectors_stack.c +37 -48
- data/ext/ddtrace_profiling_native_extension/collectors_stack.h +3 -1
- data/ext/ddtrace_profiling_native_extension/{collectors_cpu_and_wall_time.c → collectors_thread_context.c} +222 -143
- data/ext/ddtrace_profiling_native_extension/collectors_thread_context.h +14 -0
- data/ext/ddtrace_profiling_native_extension/extconf.rb +7 -18
- data/ext/ddtrace_profiling_native_extension/http_transport.c +25 -32
- data/ext/ddtrace_profiling_native_extension/libdatadog_helpers.h +9 -2
- data/ext/ddtrace_profiling_native_extension/native_extension_helpers.rb +9 -9
- data/ext/ddtrace_profiling_native_extension/private_vm_api_access.c +7 -121
- data/ext/ddtrace_profiling_native_extension/private_vm_api_access.h +1 -1
- data/ext/ddtrace_profiling_native_extension/profiling.c +2 -2
- data/ext/ddtrace_profiling_native_extension/ruby_helpers.c +2 -2
- data/ext/ddtrace_profiling_native_extension/ruby_helpers.h +1 -1
- data/ext/ddtrace_profiling_native_extension/stack_recorder.c +125 -21
- data/ext/ddtrace_profiling_native_extension/stack_recorder.h +9 -34
- data/lib/datadog/appsec/assets/waf_rules/recommended.json +321 -185
- data/lib/datadog/appsec/assets/waf_rules/strict.json +59 -2
- data/lib/datadog/appsec/assets.rb +0 -2
- data/lib/datadog/appsec/autoload.rb +4 -11
- data/lib/datadog/appsec/component.rb +41 -0
- data/lib/datadog/appsec/configuration/settings.rb +8 -3
- data/lib/datadog/appsec/configuration.rb +4 -2
- data/lib/datadog/appsec/contrib/auto_instrument.rb +0 -2
- data/lib/datadog/appsec/contrib/configuration/settings.rb +0 -2
- data/lib/datadog/appsec/contrib/integration.rb +0 -2
- data/lib/datadog/appsec/contrib/patcher.rb +0 -2
- data/lib/datadog/appsec/contrib/rack/configuration/settings.rb +0 -2
- data/lib/datadog/appsec/contrib/rack/ext.rb +0 -2
- data/lib/datadog/appsec/contrib/rack/gateway/request.rb +97 -0
- data/lib/datadog/appsec/contrib/rack/gateway/response.rb +30 -0
- data/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +111 -109
- data/lib/datadog/appsec/contrib/rack/integration.rb +0 -2
- data/lib/datadog/appsec/contrib/rack/patcher.rb +2 -2
- data/lib/datadog/appsec/contrib/rack/reactive/request.rb +18 -21
- data/lib/datadog/appsec/contrib/rack/reactive/request_body.rb +10 -11
- data/lib/datadog/appsec/contrib/rack/reactive/response.rb +10 -11
- data/lib/datadog/appsec/contrib/rack/request_body_middleware.rb +6 -4
- data/lib/datadog/appsec/contrib/rack/request_middleware.rb +40 -26
- data/lib/datadog/appsec/contrib/rails/configuration/settings.rb +0 -2
- data/lib/datadog/appsec/contrib/rails/ext.rb +0 -2
- data/lib/datadog/appsec/contrib/rails/framework.rb +0 -2
- data/lib/datadog/appsec/contrib/rails/gateway/request.rb +67 -0
- data/lib/datadog/appsec/contrib/rails/gateway/watcher.rb +41 -37
- data/lib/datadog/appsec/contrib/rails/integration.rb +0 -2
- data/lib/datadog/appsec/contrib/rails/patcher.rb +3 -3
- data/lib/datadog/appsec/contrib/rails/reactive/action.rb +12 -11
- data/lib/datadog/appsec/contrib/rails/request.rb +0 -2
- data/lib/datadog/appsec/contrib/rails/request_middleware.rb +0 -2
- data/lib/datadog/appsec/contrib/sinatra/configuration/settings.rb +0 -2
- data/lib/datadog/appsec/contrib/sinatra/ext.rb +0 -2
- data/lib/datadog/appsec/contrib/sinatra/framework.rb +0 -2
- data/lib/datadog/appsec/contrib/sinatra/gateway/request.rb +17 -0
- data/lib/datadog/appsec/contrib/sinatra/gateway/route_params.rb +23 -0
- data/lib/datadog/appsec/contrib/sinatra/gateway/watcher.rb +76 -71
- data/lib/datadog/appsec/contrib/sinatra/integration.rb +0 -2
- data/lib/datadog/appsec/contrib/sinatra/patcher.rb +12 -4
- data/lib/datadog/appsec/contrib/sinatra/reactive/routed.rb +10 -9
- data/lib/datadog/appsec/contrib/sinatra/request_middleware.rb +0 -2
- data/lib/datadog/appsec/event.rb +4 -8
- data/lib/datadog/appsec/ext.rb +9 -0
- data/lib/datadog/appsec/extensions.rb +10 -2
- data/lib/datadog/appsec/instrumentation/gateway/argument.rb +24 -0
- data/lib/datadog/appsec/instrumentation/gateway.rb +11 -5
- data/lib/datadog/appsec/instrumentation.rb +9 -0
- data/lib/datadog/appsec/monitor/gateway/watcher.rb +86 -0
- data/lib/datadog/appsec/monitor/reactive/set_user.rb +61 -0
- data/lib/datadog/appsec/monitor.rb +11 -0
- data/lib/datadog/appsec/processor.rb +74 -25
- data/lib/datadog/appsec/rate_limiter.rb +0 -2
- data/lib/datadog/appsec/reactive/address_hash.rb +6 -2
- data/lib/datadog/appsec/reactive/engine.rb +10 -7
- data/lib/datadog/appsec/reactive/operation.rb +19 -2
- data/lib/datadog/appsec/reactive/subscriber.rb +2 -1
- data/lib/datadog/appsec/response.rb +0 -2
- data/lib/datadog/appsec/utils/http/media_range.rb +0 -2
- data/lib/datadog/appsec/utils/http/media_type.rb +0 -2
- data/lib/datadog/appsec.rb +20 -2
- data/lib/datadog/ci/configuration/components.rb +0 -2
- data/lib/datadog/ci/configuration/settings.rb +0 -2
- data/lib/datadog/ci/contrib/cucumber/configuration/settings.rb +0 -2
- data/lib/datadog/ci/contrib/cucumber/ext.rb +0 -2
- data/lib/datadog/ci/contrib/cucumber/formatter.rb +0 -2
- data/lib/datadog/ci/contrib/cucumber/instrumentation.rb +0 -2
- data/lib/datadog/ci/contrib/cucumber/integration.rb +0 -2
- data/lib/datadog/ci/contrib/cucumber/patcher.rb +0 -2
- data/lib/datadog/ci/contrib/rspec/configuration/settings.rb +0 -2
- data/lib/datadog/ci/contrib/rspec/example.rb +0 -2
- data/lib/datadog/ci/contrib/rspec/ext.rb +0 -2
- data/lib/datadog/ci/contrib/rspec/integration.rb +0 -2
- data/lib/datadog/ci/contrib/rspec/patcher.rb +0 -2
- data/lib/datadog/ci/ext/app_types.rb +0 -2
- data/lib/datadog/ci/ext/environment.rb +2 -24
- data/lib/datadog/ci/ext/settings.rb +0 -2
- data/lib/datadog/ci/ext/test.rb +0 -2
- data/lib/datadog/ci/extensions.rb +0 -2
- data/lib/datadog/ci/flush.rb +0 -2
- data/lib/datadog/ci/test.rb +0 -2
- data/lib/datadog/ci.rb +0 -2
- data/lib/datadog/core/buffer/cruby.rb +0 -2
- data/lib/datadog/core/buffer/random.rb +0 -2
- data/lib/datadog/core/buffer/thread_safe.rb +0 -2
- data/lib/datadog/core/chunker.rb +0 -2
- data/lib/datadog/core/configuration/agent_settings_resolver.rb +0 -17
- data/lib/datadog/core/configuration/base.rb +0 -2
- data/lib/datadog/core/configuration/components.rb +14 -318
- data/lib/datadog/core/configuration/dependency_resolver.rb +0 -2
- data/lib/datadog/core/configuration/ext.rb +0 -2
- data/lib/datadog/core/configuration/option.rb +0 -2
- data/lib/datadog/core/configuration/option_definition.rb +0 -2
- data/lib/datadog/core/configuration/option_definition_set.rb +0 -2
- data/lib/datadog/core/configuration/option_set.rb +0 -2
- data/lib/datadog/core/configuration/options.rb +0 -2
- data/lib/datadog/core/configuration/settings.rb +14 -5
- data/lib/datadog/core/configuration.rb +0 -4
- data/lib/datadog/core/diagnostics/environment_logger.rb +0 -2
- data/lib/datadog/core/diagnostics/health.rb +0 -2
- data/lib/datadog/core/encoding.rb +0 -4
- data/lib/datadog/core/environment/cgroup.rb +0 -4
- data/lib/datadog/core/environment/class_count.rb +0 -2
- data/lib/datadog/core/environment/container.rb +0 -4
- data/lib/datadog/core/environment/ext.rb +0 -2
- data/lib/datadog/core/environment/gc.rb +0 -2
- data/lib/datadog/core/environment/identity.rb +0 -2
- data/lib/datadog/core/environment/platform.rb +0 -2
- data/lib/datadog/core/environment/socket.rb +0 -2
- data/lib/datadog/core/environment/thread_count.rb +0 -2
- data/lib/datadog/core/environment/variable_helpers.rb +0 -2
- data/lib/datadog/core/environment/vm_cache.rb +17 -2
- data/lib/datadog/core/error.rb +0 -2
- data/lib/datadog/core/extensions.rb +0 -2
- data/lib/datadog/core/git/ext.rb +0 -2
- data/lib/datadog/core/logger.rb +0 -2
- data/lib/datadog/core/metrics/client.rb +0 -2
- data/lib/datadog/core/metrics/ext.rb +0 -2
- data/lib/datadog/core/metrics/helpers.rb +0 -2
- data/lib/datadog/core/metrics/logging.rb +0 -2
- data/lib/datadog/core/metrics/metric.rb +0 -2
- data/lib/datadog/core/metrics/options.rb +0 -2
- data/lib/datadog/core/pin.rb +0 -2
- data/lib/datadog/core/runtime/ext.rb +2 -2
- data/lib/datadog/core/runtime/metrics.rb +21 -7
- data/lib/datadog/core/telemetry/client.rb +0 -2
- data/lib/datadog/core/telemetry/collector.rb +0 -2
- data/lib/datadog/core/telemetry/emitter.rb +0 -2
- data/lib/datadog/core/telemetry/event.rb +0 -4
- data/lib/datadog/core/telemetry/ext.rb +0 -2
- data/lib/datadog/core/telemetry/heartbeat.rb +0 -2
- data/lib/datadog/core/telemetry/http/adapters/net.rb +0 -2
- data/lib/datadog/core/telemetry/http/env.rb +0 -2
- data/lib/datadog/core/telemetry/http/response.rb +0 -4
- data/lib/datadog/core/telemetry/http/transport.rb +0 -2
- data/lib/datadog/core/telemetry/v1/app_event.rb +0 -2
- data/lib/datadog/core/utils/compression.rb +0 -2
- data/lib/datadog/core/utils/forking.rb +0 -2
- data/lib/datadog/core/utils/network.rb +140 -0
- data/lib/datadog/core/utils/object_set.rb +0 -2
- data/lib/datadog/core/utils/only_once.rb +0 -2
- data/lib/datadog/core/utils/safe_dup.rb +0 -2
- data/lib/datadog/core/utils/sequence.rb +0 -2
- data/lib/datadog/core/utils/string_table.rb +0 -2
- data/lib/datadog/core/utils/time.rb +0 -4
- data/lib/datadog/core/utils.rb +0 -2
- data/lib/datadog/core/vendor/ipaddr.rb +78 -0
- data/lib/datadog/core/vendor/multipart-post/multipart/post/composite_read_io.rb +0 -2
- data/lib/datadog/core/vendor/multipart-post/multipart/post/multipartable.rb +0 -2
- data/lib/datadog/core/vendor/multipart-post/multipart/post/parts.rb +0 -2
- data/lib/datadog/core/vendor/multipart-post/multipart/post/version.rb +0 -2
- data/lib/datadog/core/vendor/multipart-post/multipart/post.rb +0 -2
- data/lib/datadog/core/vendor/multipart-post/multipart.rb +0 -2
- data/lib/datadog/core/vendor/multipart-post/net/http/post/multipart.rb +0 -2
- data/lib/datadog/core/worker.rb +0 -2
- data/lib/datadog/core/workers/async.rb +0 -2
- data/lib/datadog/core/workers/interval_loop.rb +0 -2
- data/lib/datadog/core/workers/polling.rb +0 -2
- data/lib/datadog/core/workers/queue.rb +0 -2
- data/lib/datadog/core/workers/runtime_metrics.rb +0 -2
- data/lib/datadog/core.rb +0 -1
- data/lib/datadog/kit/appsec/events.rb +1 -2
- data/lib/datadog/kit/enable_core_dumps.rb +5 -6
- data/lib/datadog/kit/identity.rb +7 -1
- data/lib/datadog/kit.rb +0 -2
- data/lib/datadog/opentelemetry/api/context.rb +0 -1
- data/lib/datadog/opentelemetry/api/trace/span.rb +0 -1
- data/lib/datadog/opentelemetry/sdk/configurator.rb +0 -1
- data/lib/datadog/opentelemetry/sdk/id_generator.rb +0 -1
- data/lib/datadog/opentelemetry/sdk/propagator.rb +0 -1
- data/lib/datadog/opentelemetry/sdk/span_processor.rb +0 -1
- data/lib/datadog/opentelemetry.rb +0 -1
- data/lib/datadog/opentracer/binary_propagator.rb +0 -2
- data/lib/datadog/opentracer/carrier.rb +0 -2
- data/lib/datadog/opentracer/distributed_headers.rb +0 -2
- data/lib/datadog/opentracer/global_tracer.rb +0 -2
- data/lib/datadog/opentracer/propagator.rb +0 -2
- data/lib/datadog/opentracer/rack_propagator.rb +0 -2
- data/lib/datadog/opentracer/scope.rb +0 -2
- data/lib/datadog/opentracer/scope_manager.rb +0 -2
- data/lib/datadog/opentracer/span.rb +0 -2
- data/lib/datadog/opentracer/span_context.rb +0 -2
- data/lib/datadog/opentracer/span_context_factory.rb +0 -2
- data/lib/datadog/opentracer/text_map_propagator.rb +0 -2
- data/lib/datadog/opentracer/thread_local_scope.rb +0 -2
- data/lib/datadog/opentracer/thread_local_scope_manager.rb +0 -2
- data/lib/datadog/opentracer/tracer.rb +0 -2
- data/lib/datadog/opentracer.rb +0 -2
- data/lib/datadog/profiling/backtrace_location.rb +0 -2
- data/lib/datadog/profiling/buffer.rb +0 -2
- data/lib/datadog/profiling/collectors/code_provenance.rb +0 -2
- data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +12 -7
- data/lib/datadog/profiling/collectors/dynamic_sampling_rate.rb +0 -2
- data/lib/datadog/profiling/collectors/idle_sampling_helper.rb +1 -3
- data/lib/datadog/profiling/collectors/old_stack.rb +1 -5
- data/lib/datadog/profiling/collectors/stack.rb +0 -2
- data/lib/datadog/profiling/collectors/{cpu_and_wall_time.rb → thread_context.rb} +8 -5
- data/lib/datadog/profiling/component.rb +161 -0
- data/lib/datadog/profiling/encoding/profile.rb +0 -2
- data/lib/datadog/profiling/event.rb +0 -2
- data/lib/datadog/profiling/events/stack.rb +0 -2
- data/lib/datadog/profiling/exporter.rb +0 -2
- data/lib/datadog/profiling/ext/forking.rb +0 -2
- data/lib/datadog/profiling/ext.rb +0 -2
- data/lib/datadog/profiling/flush.rb +0 -2
- data/lib/datadog/profiling/http_transport.rb +0 -2
- data/lib/datadog/profiling/load_native_extension.rb +0 -2
- data/lib/datadog/profiling/native_extension.rb +0 -2
- data/lib/datadog/profiling/old_recorder.rb +0 -2
- data/lib/datadog/profiling/pprof/builder.rb +0 -2
- data/lib/datadog/profiling/pprof/converter.rb +0 -2
- data/lib/datadog/profiling/pprof/message_set.rb +0 -2
- data/lib/datadog/profiling/pprof/payload.rb +0 -2
- data/lib/datadog/profiling/pprof/pprof_pb.rb +0 -2
- data/lib/datadog/profiling/pprof/stack_sample.rb +0 -2
- data/lib/datadog/profiling/pprof/string_table.rb +0 -2
- data/lib/datadog/profiling/pprof/template.rb +0 -2
- data/lib/datadog/profiling/preload.rb +0 -2
- data/lib/datadog/profiling/profiler.rb +0 -2
- data/lib/datadog/profiling/scheduler.rb +0 -2
- data/lib/datadog/profiling/stack_recorder.rb +3 -8
- data/lib/datadog/profiling/tag_builder.rb +0 -2
- data/lib/datadog/profiling/tasks/exec.rb +0 -2
- data/lib/datadog/profiling/tasks/help.rb +0 -2
- data/lib/datadog/profiling/tasks/setup.rb +0 -2
- data/lib/datadog/profiling/trace_identifiers/ddtrace.rb +0 -2
- data/lib/datadog/profiling/trace_identifiers/helper.rb +0 -2
- data/lib/datadog/profiling.rb +44 -7
- data/lib/datadog/tracing/analytics.rb +0 -2
- data/lib/datadog/tracing/buffer.rb +0 -4
- data/lib/datadog/tracing/client_ip.rb +38 -141
- data/lib/datadog/tracing/component.rb +176 -0
- data/lib/datadog/tracing/configuration/ext.rb +2 -2
- data/lib/datadog/tracing/configuration/settings.rb +20 -2
- data/lib/datadog/tracing/context.rb +0 -2
- data/lib/datadog/tracing/context_provider.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/event.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/events/broadcast.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/events/perform_action.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/events/transmit.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/events.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/action_cable/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/event.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/events/deliver.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/events/process.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/events.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/action_mailer/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/action_pack/action_controller/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/action_pack/action_controller/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/action_pack/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/action_pack/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/action_pack/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/action_pack/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/action_pack/utils.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/event.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/events/render_partial.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/events/render_template.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/events.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/instrumentation/partial_renderer.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/instrumentation/template_renderer.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/action_view/utils.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/event.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/events/discard.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/events/enqueue.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/events/enqueue_at.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/events/enqueue_retry.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/events/perform.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/events/retry_stopped.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/events.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/log_injection.rb +0 -2
- data/lib/datadog/tracing/contrib/active_job/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/event.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/events/render.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/events.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/active_model_serializers/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/configuration/makara_resolver.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/configuration/resolver.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/event.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/events/instantiation.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/events/sql.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/events.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/utils.rb +0 -2
- data/lib/datadog/tracing/contrib/active_record/vendor/connection_specification.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/cache/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/cache/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/cache/redis.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/notifications/event.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/notifications/subscriber.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/notifications/subscription.rb +0 -2
- data/lib/datadog/tracing/contrib/active_support/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/analytics.rb +0 -2
- data/lib/datadog/tracing/contrib/auto_instrument.rb +0 -2
- data/lib/datadog/tracing/contrib/aws/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/aws/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/aws/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/aws/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/aws/parsed_context.rb +0 -2
- data/lib/datadog/tracing/contrib/aws/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/aws/services.rb +0 -2
- data/lib/datadog/tracing/contrib/concurrent_ruby/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/concurrent_ruby/context_composite_executor_service.rb +0 -2
- data/lib/datadog/tracing/contrib/concurrent_ruby/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/concurrent_ruby/future_patch.rb +0 -2
- data/lib/datadog/tracing/contrib/concurrent_ruby/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/concurrent_ruby/patcher.rb +0 -3
- data/lib/datadog/tracing/contrib/configurable.rb +0 -2
- data/lib/datadog/tracing/contrib/configuration/resolver.rb +0 -2
- data/lib/datadog/tracing/contrib/configuration/resolvers/pattern_resolver.rb +0 -2
- data/lib/datadog/tracing/contrib/configuration/settings.rb +0 -4
- data/lib/datadog/tracing/contrib/dalli/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/dalli/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/dalli/instrumentation.rb +2 -2
- data/lib/datadog/tracing/contrib/dalli/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/dalli/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/dalli/quantize.rb +0 -2
- data/lib/datadog/tracing/contrib/delayed_job/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/delayed_job/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/delayed_job/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/delayed_job/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/delayed_job/plugin.rb +4 -2
- data/lib/datadog/tracing/contrib/delayed_job/server_internal_tracer/worker.rb +2 -2
- data/lib/datadog/tracing/contrib/elasticsearch/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/elasticsearch/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/elasticsearch/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/elasticsearch/patcher.rb +3 -4
- data/lib/datadog/tracing/contrib/elasticsearch/quantize.rb +0 -4
- data/lib/datadog/tracing/contrib/ethon/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/ethon/easy_patch.rb +0 -2
- data/lib/datadog/tracing/contrib/ethon/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/ethon/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/ethon/multi_patch.rb +0 -2
- data/lib/datadog/tracing/contrib/ethon/patcher.rb +0 -3
- data/lib/datadog/tracing/contrib/excon/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/excon/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/excon/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/excon/middleware.rb +0 -2
- data/lib/datadog/tracing/contrib/excon/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/ext.rb +5 -0
- data/lib/datadog/tracing/contrib/extensions.rb +0 -2
- data/lib/datadog/tracing/contrib/faraday/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/faraday/connection.rb +0 -2
- data/lib/datadog/tracing/contrib/faraday/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/faraday/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/faraday/middleware.rb +0 -2
- data/lib/datadog/tracing/contrib/faraday/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/faraday/rack_builder.rb +0 -2
- data/lib/datadog/tracing/contrib/grape/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/grape/endpoint.rb +0 -2
- data/lib/datadog/tracing/contrib/grape/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/grape/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/grape/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/grape/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/graphql/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/graphql/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/graphql/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/graphql/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/grpc/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/client.rb +0 -2
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/server.rb +0 -2
- data/lib/datadog/tracing/contrib/grpc/datadog_interceptor.rb +0 -2
- data/lib/datadog/tracing/contrib/grpc/distributed/fetcher.rb +0 -1
- data/lib/datadog/tracing/contrib/grpc/distributed/propagation.rb +0 -1
- data/lib/datadog/tracing/contrib/grpc/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/grpc/integration.rb +8 -3
- data/lib/datadog/tracing/contrib/grpc/intercept_with_datadog.rb +0 -2
- data/lib/datadog/tracing/contrib/grpc/patcher.rb +0 -3
- data/lib/datadog/tracing/contrib/hanami/action_tracer.rb +0 -2
- data/lib/datadog/tracing/contrib/hanami/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/hanami/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/hanami/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/hanami/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/hanami/plugin.rb +0 -2
- data/lib/datadog/tracing/contrib/hanami/renderer_policy_tracing.rb +0 -2
- data/lib/datadog/tracing/contrib/hanami/router_tracing.rb +0 -2
- data/lib/datadog/tracing/contrib/http/circuit_breaker.rb +0 -2
- data/lib/datadog/tracing/contrib/http/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/http/distributed/fetcher.rb +0 -1
- data/lib/datadog/tracing/contrib/http/distributed/propagation.rb +0 -1
- data/lib/datadog/tracing/contrib/http/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/http/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/http/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/http/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/http_annotation_helper.rb +0 -2
- data/lib/datadog/tracing/contrib/httpclient/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/httpclient/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/httpclient/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/httpclient/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/httprb/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/httprb/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/httprb/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/httprb/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/consumer_event.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/consumer_group_event.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/event.rb +1 -2
- data/lib/datadog/tracing/contrib/kafka/events/connection/request.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/consumer/process_batch.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/consumer/process_message.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/heartbeat.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/join_group.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/leave_group.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/consumer_group/sync_group.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/produce_operation/send_messages.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events/producer/deliver_messages.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/events.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/ext.rb +1 -2
- data/lib/datadog/tracing/contrib/kafka/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/kafka/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/lograge/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/lograge/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/lograge/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/lograge/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/lograge/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/mongodb/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/mongodb/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/mongodb/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/mongodb/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/mongodb/parsers.rb +0 -2
- data/lib/datadog/tracing/contrib/mongodb/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +0 -2
- data/lib/datadog/tracing/contrib/mysql2/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/mysql2/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/mysql2/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/mysql2/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/mysql2/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/patchable.rb +0 -2
- data/lib/datadog/tracing/contrib/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/pg/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/pg/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/pg/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/pg/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/pg/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/presto/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/presto/ext.rb +1 -2
- data/lib/datadog/tracing/contrib/presto/instrumentation.rb +3 -2
- data/lib/datadog/tracing/contrib/presto/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/presto/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/propagation/sql_comment/comment.rb +0 -2
- data/lib/datadog/tracing/contrib/propagation/sql_comment/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/propagation/sql_comment/mode.rb +0 -2
- data/lib/datadog/tracing/contrib/propagation/sql_comment.rb +0 -2
- data/lib/datadog/tracing/contrib/qless/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/qless/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/qless/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/qless/patcher.rb +0 -3
- data/lib/datadog/tracing/contrib/qless/qless_job.rb +3 -2
- data/lib/datadog/tracing/contrib/qless/tracer_cleaner.rb +0 -2
- data/lib/datadog/tracing/contrib/que/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/que/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/que/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/que/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/que/tracer.rb +2 -2
- data/lib/datadog/tracing/contrib/racecar/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/racecar/event.rb +1 -2
- data/lib/datadog/tracing/contrib/racecar/events/batch.rb +0 -2
- data/lib/datadog/tracing/contrib/racecar/events/consume.rb +0 -2
- data/lib/datadog/tracing/contrib/racecar/events/message.rb +0 -2
- data/lib/datadog/tracing/contrib/racecar/events.rb +0 -2
- data/lib/datadog/tracing/contrib/racecar/ext.rb +1 -2
- data/lib/datadog/tracing/contrib/racecar/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/racecar/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/rack/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/rack/ext.rb +5 -2
- data/lib/datadog/tracing/contrib/rack/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/rack/middlewares.rb +42 -18
- data/lib/datadog/tracing/contrib/rack/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/rack/request_queue.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/auto_instrument_railtie.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/framework.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/log_injection.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/middlewares.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/railtie.rb +0 -2
- data/lib/datadog/tracing/contrib/rails/utils.rb +0 -2
- data/lib/datadog/tracing/contrib/rake/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/rake/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/rake/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/rake/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/rake/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/configuration/resolver.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/quantize.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/tags.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/trace_middleware.rb +0 -2
- data/lib/datadog/tracing/contrib/redis/vendor/resolver.rb +0 -2
- data/lib/datadog/tracing/contrib/registerable.rb +0 -2
- data/lib/datadog/tracing/contrib/registry.rb +0 -2
- data/lib/datadog/tracing/contrib/resque/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/resque/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/resque/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/resque/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/resque/resque_job.rb +2 -2
- data/lib/datadog/tracing/contrib/rest_client/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/rest_client/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/rest_client/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/rest_client/patcher.rb +0 -3
- data/lib/datadog/tracing/contrib/rest_client/request_patch.rb +0 -2
- data/lib/datadog/tracing/contrib/semantic_logger/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/semantic_logger/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/semantic_logger/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/semantic_logger/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/semantic_logger/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/sequel/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/sequel/database.rb +0 -2
- data/lib/datadog/tracing/contrib/sequel/dataset.rb +0 -2
- data/lib/datadog/tracing/contrib/sequel/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/sequel/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/sequel/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/sequel/utils.rb +0 -2
- data/lib/datadog/tracing/contrib/shoryuken/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/shoryuken/ext.rb +1 -2
- data/lib/datadog/tracing/contrib/shoryuken/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/shoryuken/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/shoryuken/tracer.rb +2 -2
- data/lib/datadog/tracing/contrib/sidekiq/client_tracer.rb +2 -2
- data/lib/datadog/tracing/contrib/sidekiq/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/sidekiq/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/sidekiq/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/sidekiq/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/heartbeat.rb +4 -2
- data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/job_fetch.rb +2 -2
- data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/redis_info.rb +2 -2
- data/lib/datadog/tracing/contrib/sidekiq/server_internal_tracer/scheduled_poller.rb +4 -2
- data/lib/datadog/tracing/contrib/sidekiq/server_tracer.rb +2 -2
- data/lib/datadog/tracing/contrib/sidekiq/tracing.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/env.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/framework.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/headers.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/patcher.rb +0 -3
- data/lib/datadog/tracing/contrib/sinatra/tracer.rb +0 -2
- data/lib/datadog/tracing/contrib/sinatra/tracer_middleware.rb +0 -2
- data/lib/datadog/tracing/contrib/sneakers/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/sneakers/ext.rb +1 -2
- data/lib/datadog/tracing/contrib/sneakers/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/sneakers/patcher.rb +0 -2
- data/lib/datadog/tracing/contrib/sneakers/tracer.rb +3 -2
- data/lib/datadog/tracing/contrib/status_code_matcher.rb +0 -2
- data/lib/datadog/tracing/contrib/stripe/patcher.rb +0 -1
- data/lib/datadog/tracing/contrib/sucker_punch/configuration/settings.rb +0 -2
- data/lib/datadog/tracing/contrib/sucker_punch/exception_handler.rb +0 -2
- data/lib/datadog/tracing/contrib/sucker_punch/ext.rb +0 -2
- data/lib/datadog/tracing/contrib/sucker_punch/instrumentation.rb +0 -2
- data/lib/datadog/tracing/contrib/sucker_punch/integration.rb +0 -2
- data/lib/datadog/tracing/contrib/sucker_punch/patcher.rb +0 -3
- data/lib/datadog/tracing/contrib/utils/database.rb +0 -2
- data/lib/datadog/tracing/contrib/utils/quantization/hash.rb +0 -2
- data/lib/datadog/tracing/contrib/utils/quantization/http.rb +0 -4
- data/lib/datadog/tracing/contrib.rb +0 -2
- data/lib/datadog/tracing/correlation.rb +15 -3
- data/lib/datadog/tracing/diagnostics/ext.rb +0 -2
- data/lib/datadog/tracing/diagnostics/health.rb +0 -2
- data/lib/datadog/tracing/distributed/b3_multi.rb +12 -6
- data/lib/datadog/tracing/distributed/b3_single.rb +8 -6
- data/lib/datadog/tracing/distributed/datadog.rb +58 -11
- data/lib/datadog/tracing/distributed/datadog_tags_codec.rb +0 -1
- data/lib/datadog/tracing/distributed/fetcher.rb +0 -9
- data/lib/datadog/tracing/distributed/headers/ext.rb +0 -1
- data/lib/datadog/tracing/distributed/helpers.rb +21 -36
- data/lib/datadog/tracing/distributed/none.rb +0 -1
- data/lib/datadog/tracing/distributed/propagation.rb +0 -1
- data/lib/datadog/tracing/distributed/trace_context.rb +8 -13
- data/lib/datadog/tracing/event.rb +0 -2
- data/lib/datadog/tracing/flush.rb +0 -2
- data/lib/datadog/tracing/metadata/analytics.rb +0 -2
- data/lib/datadog/tracing/metadata/errors.rb +0 -2
- data/lib/datadog/tracing/metadata/ext.rb +6 -2
- data/lib/datadog/tracing/metadata/tagging.rb +0 -2
- data/lib/datadog/tracing/metadata.rb +0 -2
- data/lib/datadog/tracing/pipeline/span_filter.rb +0 -2
- data/lib/datadog/tracing/pipeline/span_processor.rb +0 -2
- data/lib/datadog/tracing/pipeline.rb +0 -2
- data/lib/datadog/tracing/propagation/http.rb +0 -2
- data/lib/datadog/tracing/runtime/metrics.rb +0 -2
- data/lib/datadog/tracing/sampling/all_sampler.rb +0 -2
- data/lib/datadog/tracing/sampling/ext.rb +0 -2
- data/lib/datadog/tracing/sampling/matcher.rb +0 -2
- data/lib/datadog/tracing/sampling/priority_sampler.rb +0 -2
- data/lib/datadog/tracing/sampling/rate_by_key_sampler.rb +0 -2
- data/lib/datadog/tracing/sampling/rate_by_service_sampler.rb +0 -2
- data/lib/datadog/tracing/sampling/rate_limiter.rb +0 -2
- data/lib/datadog/tracing/sampling/rate_sampler.rb +0 -2
- data/lib/datadog/tracing/sampling/rule.rb +0 -2
- data/lib/datadog/tracing/sampling/rule_sampler.rb +0 -2
- data/lib/datadog/tracing/sampling/sampler.rb +0 -2
- data/lib/datadog/tracing/span.rb +0 -2
- data/lib/datadog/tracing/span_operation.rb +1 -3
- data/lib/datadog/tracing/sync_writer.rb +0 -2
- data/lib/datadog/tracing/trace_digest.rb +0 -2
- data/lib/datadog/tracing/trace_operation.rb +1 -3
- data/lib/datadog/tracing/trace_segment.rb +7 -2
- data/lib/datadog/tracing/tracer.rb +0 -2
- data/lib/datadog/tracing/utils.rb +33 -2
- data/lib/datadog/tracing/workers/trace_writer.rb +0 -2
- data/lib/datadog/tracing/workers.rb +0 -2
- data/lib/datadog/tracing/writer.rb +0 -2
- data/lib/datadog/tracing.rb +0 -2
- data/lib/ddtrace/auto_instrument.rb +0 -2
- data/lib/ddtrace/auto_instrument_base.rb +0 -2
- data/lib/ddtrace/profiling/preload.rb +0 -2
- data/lib/ddtrace/transport/ext.rb +0 -2
- data/lib/ddtrace/transport/http/adapters/net.rb +0 -2
- data/lib/ddtrace/transport/http/adapters/registry.rb +0 -2
- data/lib/ddtrace/transport/http/adapters/test.rb +0 -2
- data/lib/ddtrace/transport/http/adapters/unix_socket.rb +0 -2
- data/lib/ddtrace/transport/http/api/endpoint.rb +0 -2
- data/lib/ddtrace/transport/http/api/fallbacks.rb +0 -2
- data/lib/ddtrace/transport/http/api/instance.rb +0 -2
- data/lib/ddtrace/transport/http/api/map.rb +0 -2
- data/lib/ddtrace/transport/http/api/spec.rb +0 -2
- data/lib/ddtrace/transport/http/api.rb +0 -2
- data/lib/ddtrace/transport/http/builder.rb +0 -2
- data/lib/ddtrace/transport/http/client.rb +0 -2
- data/lib/ddtrace/transport/http/env.rb +0 -2
- data/lib/ddtrace/transport/http/response.rb +0 -2
- data/lib/ddtrace/transport/http/statistics.rb +0 -2
- data/lib/ddtrace/transport/http/traces.rb +1 -3
- data/lib/ddtrace/transport/http.rb +0 -4
- data/lib/ddtrace/transport/io/client.rb +0 -2
- data/lib/ddtrace/transport/io/response.rb +0 -2
- data/lib/ddtrace/transport/io/traces.rb +0 -4
- data/lib/ddtrace/transport/io.rb +0 -2
- data/lib/ddtrace/transport/parcel.rb +0 -4
- data/lib/ddtrace/transport/request.rb +0 -2
- data/lib/ddtrace/transport/response.rb +0 -2
- data/lib/ddtrace/transport/serializable_trace.rb +9 -5
- data/lib/ddtrace/transport/statistics.rb +0 -2
- data/lib/ddtrace/transport/trace_formatter.rb +7 -2
- data/lib/ddtrace/transport/traces.rb +1 -3
- data/lib/ddtrace/version.rb +2 -4
- data/lib/ddtrace.rb +1 -5
- metadata +26 -13
- data/ext/ddtrace_profiling_native_extension/collectors_cpu_and_wall_time.h +0 -9
- data/lib/datadog/appsec/assets/waf_rules/risky.json +0 -1499
- data/lib/datadog/appsec/contrib/rack/request.rb +0 -78
- data/lib/datadog/appsec/contrib/rack/response.rb +0 -24
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": "2.2",
|
3
3
|
"metadata": {
|
4
|
-
"rules_version": "1.
|
4
|
+
"rules_version": "1.5.2"
|
5
5
|
},
|
6
6
|
"rules": [
|
7
7
|
{
|
@@ -158,6 +158,33 @@
|
|
158
158
|
"lowercase"
|
159
159
|
]
|
160
160
|
},
|
161
|
+
{
|
162
|
+
"id": "crs-921-140",
|
163
|
+
"name": "HTTP Header Injection Attack via headers",
|
164
|
+
"tags": {
|
165
|
+
"type": "http_protocol_violation",
|
166
|
+
"crs_id": "921140",
|
167
|
+
"category": "attack_attempt"
|
168
|
+
},
|
169
|
+
"conditions": [
|
170
|
+
{
|
171
|
+
"parameters": {
|
172
|
+
"inputs": [
|
173
|
+
{
|
174
|
+
"address": "server.request.headers.no_cookies"
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"regex": "[\\n\\r]",
|
178
|
+
"options": {
|
179
|
+
"case_sensitive": true,
|
180
|
+
"min_length": 1
|
181
|
+
}
|
182
|
+
},
|
183
|
+
"operator": "match_regex"
|
184
|
+
}
|
185
|
+
],
|
186
|
+
"transformers": []
|
187
|
+
},
|
161
188
|
{
|
162
189
|
"id": "crs-932-100",
|
163
190
|
"name": "Remote Command Execution: Unix Command Injection",
|
@@ -1498,6 +1525,36 @@
|
|
1498
1525
|
"removeNulls"
|
1499
1526
|
]
|
1500
1527
|
},
|
1528
|
+
{
|
1529
|
+
"id": "sqr-000-007",
|
1530
|
+
"name": "NoSQL: Detect common exploitation strategy",
|
1531
|
+
"tags": {
|
1532
|
+
"type": "nosql_injection",
|
1533
|
+
"category": "attack_attempt"
|
1534
|
+
},
|
1535
|
+
"conditions": [
|
1536
|
+
{
|
1537
|
+
"parameters": {
|
1538
|
+
"inputs": [
|
1539
|
+
{
|
1540
|
+
"address": "server.request.query"
|
1541
|
+
},
|
1542
|
+
{
|
1543
|
+
"address": "server.request.body"
|
1544
|
+
},
|
1545
|
+
{
|
1546
|
+
"address": "server.request.path_params"
|
1547
|
+
}
|
1548
|
+
],
|
1549
|
+
"regex": "^\\$(eq|ne|(l|g)te?|n?in|not|(n|x|)or|and|regex|where|expr|exists)$"
|
1550
|
+
},
|
1551
|
+
"operator": "match_regex"
|
1552
|
+
}
|
1553
|
+
],
|
1554
|
+
"transformers": [
|
1555
|
+
"keys_only"
|
1556
|
+
]
|
1557
|
+
},
|
1501
1558
|
{
|
1502
1559
|
"id": "sqr-000-011",
|
1503
1560
|
"name": "Node.js: Prototype pollution",
|
@@ -1530,4 +1587,4 @@
|
|
1530
1587
|
"transformers": []
|
1531
1588
|
}
|
1532
1589
|
]
|
1533
|
-
}
|
1590
|
+
}
|
@@ -1,18 +1,11 @@
|
|
1
|
-
# typed: ignore
|
2
|
-
|
3
1
|
if %w[1 true].include?((ENV['DD_APPSEC_ENABLED'] || '').downcase)
|
4
|
-
require_relative '../../ddtrace'
|
5
|
-
|
6
|
-
begin
|
7
|
-
require_relative '../appsec'
|
8
|
-
rescue StandardError => e
|
9
|
-
puts "AppSec failed to load. No security check will be performed. error: #{e.class.name} #{e.message}"
|
10
|
-
end
|
11
|
-
|
12
2
|
begin
|
13
3
|
require_relative 'contrib/auto_instrument'
|
14
4
|
Datadog::AppSec::Contrib::AutoInstrument.patch_all
|
15
5
|
rescue StandardError => e
|
16
|
-
|
6
|
+
Kernel.warn(
|
7
|
+
'[ddtrace] AppSec failed to instrument. No security check will be performed. error: ' \
|
8
|
+
" #{e.class.name} #{e.message}"
|
9
|
+
)
|
17
10
|
end
|
18
11
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'processor'
|
4
|
+
|
5
|
+
module Datadog
|
6
|
+
module AppSec
|
7
|
+
# Core-pluggable component for AppSec
|
8
|
+
class Component
|
9
|
+
class << self
|
10
|
+
def build_appsec_component(settings)
|
11
|
+
return unless settings.respond_to?(:appsec) && settings.appsec.enabled
|
12
|
+
|
13
|
+
processor = create_processor
|
14
|
+
new(processor: processor)
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def create_processor
|
20
|
+
processor = Processor.new
|
21
|
+
return nil unless processor.ready?
|
22
|
+
|
23
|
+
processor
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
attr_reader :processor
|
28
|
+
|
29
|
+
def initialize(processor:)
|
30
|
+
@processor = processor
|
31
|
+
end
|
32
|
+
|
33
|
+
def shutdown!
|
34
|
+
if processor && processor.ready?
|
35
|
+
processor.finalize
|
36
|
+
@processor = nil
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# typed: ignore
|
2
|
-
|
3
1
|
module Datadog
|
4
2
|
module AppSec
|
5
3
|
module Configuration
|
@@ -139,7 +137,14 @@ module Datadog
|
|
139
137
|
# is very useful for testing. It may change at any point in time.
|
140
138
|
def ip_denylist
|
141
139
|
# Cast for Steep
|
142
|
-
_ = @options[:ip_denylist]
|
140
|
+
_ = @options[:ip_denylist] || []
|
141
|
+
end
|
142
|
+
|
143
|
+
# EXPERIMENTAL: This configurable is not meant to be publicly used, but
|
144
|
+
# is very useful for testing. It may change at any point in time.
|
145
|
+
def user_id_denylist
|
146
|
+
# Cast for Steep
|
147
|
+
_ = @options[:user_id_denylist] || []
|
143
148
|
end
|
144
149
|
|
145
150
|
def waf_timeout
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# typed: ignore
|
2
|
-
|
3
1
|
require_relative 'configuration/settings'
|
4
2
|
|
5
3
|
module Datadog
|
@@ -40,6 +38,10 @@ module Datadog
|
|
40
38
|
options[:ip_denylist] = value
|
41
39
|
end
|
42
40
|
|
41
|
+
def user_id_denylist=(value)
|
42
|
+
options[:user_id_denylist] = value
|
43
|
+
end
|
44
|
+
|
43
45
|
# in microseconds
|
44
46
|
def waf_timeout=(value)
|
45
47
|
options[:waf_timeout] = value
|
@@ -0,0 +1,97 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../instrumentation/gateway/argument'
|
4
|
+
require_relative '../../../../core/header_collection'
|
5
|
+
require_relative '../../../../tracing/client_ip'
|
6
|
+
|
7
|
+
module Datadog
|
8
|
+
module AppSec
|
9
|
+
module Contrib
|
10
|
+
module Rack
|
11
|
+
module Gateway
|
12
|
+
# Gateway Request argument. Normalized extration of data from Rack::Request
|
13
|
+
class Request < Instrumentation::Gateway::Argument
|
14
|
+
attr_reader :env
|
15
|
+
|
16
|
+
def initialize(env)
|
17
|
+
super
|
18
|
+
@env = env
|
19
|
+
end
|
20
|
+
|
21
|
+
def request
|
22
|
+
@request ||= ::Rack::Request.new(env)
|
23
|
+
end
|
24
|
+
|
25
|
+
def query
|
26
|
+
# Downstream libddwaf expects keys and values to be extractable
|
27
|
+
# separately so we can't use [[k, v], ...]. We also want to allow
|
28
|
+
# duplicate keys, so we use [{k, v}, ...] instead.
|
29
|
+
request.query_string.split('&').map do |e|
|
30
|
+
k, v = e.split('=').map { |s| CGI.unescape(s) }
|
31
|
+
|
32
|
+
{ k => v }
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
# Rack < 2.0 does not have :each_header
|
37
|
+
# TODO: We need access to Rack here. We must make sure we are able to load AppSec without Rack,
|
38
|
+
# TODO: while still ensure correctness in ths code path.
|
39
|
+
if defined?(::Rack) && ::Rack::Request.instance_methods.include?(:each_header)
|
40
|
+
def headers
|
41
|
+
request.each_header.each_with_object({}) do |(k, v), h|
|
42
|
+
h[k.gsub(/^HTTP_/, '').downcase.tr('_', '-')] = v if k =~ /^HTTP_/
|
43
|
+
end
|
44
|
+
end
|
45
|
+
else
|
46
|
+
def headers
|
47
|
+
request.env.each_with_object({}) do |(k, v), h|
|
48
|
+
h[k.gsub(/^HTTP_/, '').downcase.tr('_', '-')] = v if k =~ /^HTTP_/
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def body
|
54
|
+
request.body.read.tap { request.body.rewind }
|
55
|
+
end
|
56
|
+
|
57
|
+
def url
|
58
|
+
request.url
|
59
|
+
end
|
60
|
+
|
61
|
+
def cookies
|
62
|
+
request.cookies
|
63
|
+
end
|
64
|
+
|
65
|
+
def host
|
66
|
+
request.host
|
67
|
+
end
|
68
|
+
|
69
|
+
def user_agent
|
70
|
+
request.user_agent
|
71
|
+
end
|
72
|
+
|
73
|
+
def remote_addr
|
74
|
+
env['REMOTE_ADDR']
|
75
|
+
end
|
76
|
+
|
77
|
+
def form_hash
|
78
|
+
# force form data processing
|
79
|
+
request.POST if request.form_data?
|
80
|
+
|
81
|
+
# usually Hash<String,String> but can be a more complex
|
82
|
+
# Hash<String,String||Array||Hash> when e.g coming from JSON
|
83
|
+
env['rack.request.form_hash']
|
84
|
+
end
|
85
|
+
|
86
|
+
def client_ip
|
87
|
+
remote_ip = remote_addr
|
88
|
+
header_collection = Datadog::Core::HeaderCollection.from_hash(headers)
|
89
|
+
|
90
|
+
Datadog::Tracing::ClientIp.extract_client_ip(header_collection, remote_ip)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative '../../../instrumentation/gateway/argument'
|
4
|
+
|
5
|
+
module Datadog
|
6
|
+
module AppSec
|
7
|
+
module Contrib
|
8
|
+
module Rack
|
9
|
+
module Gateway
|
10
|
+
# Gateway Response argument.
|
11
|
+
class Response < Instrumentation::Gateway::Argument
|
12
|
+
attr_reader :body, :status, :headers, :active_context
|
13
|
+
|
14
|
+
def initialize(body, status, headers, active_context:)
|
15
|
+
super
|
16
|
+
@body = body
|
17
|
+
@status = status
|
18
|
+
@headers = headers.each_with_object({}) { |(k, v), h| h[k.downcase] = v }
|
19
|
+
@active_context = active_context
|
20
|
+
end
|
21
|
+
|
22
|
+
def response
|
23
|
+
@response ||= ::Rack::Response.new(body, status, headers)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
# typed: ignore
|
2
|
-
|
3
1
|
require_relative '../../../instrumentation/gateway'
|
4
2
|
require_relative '../../../reactive/operation'
|
5
3
|
require_relative '../reactive/request'
|
@@ -14,140 +12,144 @@ module Datadog
|
|
14
12
|
module Gateway
|
15
13
|
# Watcher for Rack gateway events
|
16
14
|
module Watcher
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
15
|
+
class << self
|
16
|
+
def watch
|
17
|
+
gateway = Instrumentation.gateway
|
18
|
+
|
19
|
+
watch_request(gateway)
|
20
|
+
watch_response(gateway)
|
21
|
+
watch_request_body(gateway)
|
22
|
+
end
|
23
|
+
|
24
|
+
def watch_request(gateway = Instrumentation.gateway)
|
25
|
+
gateway.watch('rack.request', :appsec) do |stack, gateway_request|
|
26
|
+
block = false
|
27
|
+
event = nil
|
28
|
+
waf_context = gateway_request.env['datadog.waf.context']
|
29
|
+
|
30
|
+
AppSec::Reactive::Operation.new('rack.request') do |op|
|
31
|
+
trace = active_trace
|
32
|
+
span = active_span
|
33
|
+
|
34
|
+
Rack::Reactive::Request.subscribe(op, waf_context) do |result, _block|
|
35
|
+
if result.status == :match
|
36
|
+
# TODO: should this hash be an Event instance instead?
|
37
|
+
event = {
|
38
|
+
waf_result: result,
|
39
|
+
trace: trace,
|
40
|
+
span: span,
|
41
|
+
request: gateway_request,
|
42
|
+
actions: result.actions
|
43
|
+
}
|
44
|
+
|
45
|
+
span.set_tag('appsec.event', 'true') if span
|
46
|
+
|
47
|
+
waf_context.events << event
|
48
|
+
end
|
45
49
|
end
|
50
|
+
|
51
|
+
_result, block = Rack::Reactive::Request.publish(op, gateway_request)
|
46
52
|
end
|
47
53
|
|
48
|
-
|
49
|
-
end
|
54
|
+
next [nil, [[:block, event]]] if block
|
50
55
|
|
51
|
-
|
56
|
+
ret, res = stack.call(gateway_request.request)
|
52
57
|
|
53
|
-
|
58
|
+
if event
|
59
|
+
res ||= []
|
60
|
+
res << [:monitor, event]
|
61
|
+
end
|
54
62
|
|
55
|
-
|
56
|
-
res ||= []
|
57
|
-
res << [:monitor, event]
|
63
|
+
[ret, res]
|
58
64
|
end
|
59
|
-
|
60
|
-
[ret, res]
|
61
65
|
end
|
62
66
|
|
63
|
-
Instrumentation.gateway
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
67
|
+
def watch_response(gateway = Instrumentation.gateway)
|
68
|
+
gateway.watch('rack.response', :appsec) do |stack, gateway_response|
|
69
|
+
block = false
|
70
|
+
event = nil
|
71
|
+
waf_context = gateway_response.active_context
|
72
|
+
|
73
|
+
AppSec::Reactive::Operation.new('rack.response') do |op|
|
74
|
+
trace = active_trace
|
75
|
+
span = active_span
|
76
|
+
|
77
|
+
Rack::Reactive::Response.subscribe(op, waf_context) do |result, _block|
|
78
|
+
if result.status == :match
|
79
|
+
# TODO: should this hash be an Event instance instead?
|
80
|
+
event = {
|
81
|
+
waf_result: result,
|
82
|
+
trace: trace,
|
83
|
+
span: span,
|
84
|
+
response: gateway_response,
|
85
|
+
actions: result.actions
|
86
|
+
}
|
87
|
+
|
88
|
+
span.set_tag('appsec.event', 'true') if span
|
89
|
+
|
90
|
+
waf_context.events << event
|
91
|
+
end
|
86
92
|
end
|
93
|
+
|
94
|
+
_result, block = Rack::Reactive::Response.publish(op, gateway_response)
|
87
95
|
end
|
88
96
|
|
89
|
-
|
90
|
-
end
|
97
|
+
next [nil, [[:block, event]]] if block
|
91
98
|
|
92
|
-
|
99
|
+
ret, res = stack.call(gateway_response.response)
|
93
100
|
|
94
|
-
|
101
|
+
if event
|
102
|
+
res ||= []
|
103
|
+
res << [:monitor, event]
|
104
|
+
end
|
95
105
|
|
96
|
-
|
97
|
-
res ||= []
|
98
|
-
res << [:monitor, event]
|
106
|
+
[ret, res]
|
99
107
|
end
|
100
|
-
|
101
|
-
[ret, res]
|
102
108
|
end
|
103
109
|
|
104
|
-
Instrumentation.gateway
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
110
|
+
def watch_request_body(gateway = Instrumentation.gateway)
|
111
|
+
gateway.watch('rack.request.body', :appsec) do |stack, gateway_request|
|
112
|
+
block = false
|
113
|
+
event = nil
|
114
|
+
waf_context = gateway_request.env['datadog.waf.context']
|
115
|
+
|
116
|
+
AppSec::Reactive::Operation.new('rack.request.body') do |op|
|
117
|
+
trace = active_trace
|
118
|
+
span = active_span
|
119
|
+
|
120
|
+
Rack::Reactive::RequestBody.subscribe(op, waf_context) do |result, _block|
|
121
|
+
if result.status == :match
|
122
|
+
# TODO: should this hash be an Event instance instead?
|
123
|
+
event = {
|
124
|
+
waf_result: result,
|
125
|
+
trace: trace,
|
126
|
+
span: span,
|
127
|
+
request: gateway_request,
|
128
|
+
actions: result.actions
|
129
|
+
}
|
130
|
+
|
131
|
+
span.set_tag('appsec.event', 'true') if span
|
132
|
+
|
133
|
+
waf_context.events << event
|
134
|
+
end
|
127
135
|
end
|
136
|
+
|
137
|
+
_result, block = Rack::Reactive::RequestBody.publish(op, gateway_request)
|
128
138
|
end
|
129
139
|
|
130
|
-
|
131
|
-
end
|
140
|
+
next [nil, [[:block, event]]] if block
|
132
141
|
|
133
|
-
|
142
|
+
ret, res = stack.call(gateway_request.request)
|
134
143
|
|
135
|
-
|
144
|
+
if event
|
145
|
+
res ||= []
|
146
|
+
res << [:monitor, event]
|
147
|
+
end
|
136
148
|
|
137
|
-
|
138
|
-
res ||= []
|
139
|
-
res << [:monitor, event]
|
149
|
+
[ret, res]
|
140
150
|
end
|
141
|
-
|
142
|
-
[ret, res]
|
143
151
|
end
|
144
|
-
end
|
145
|
-
# rubocop:enable Metrics/CyclomaticComplexity
|
146
|
-
# rubocop:enable Metrics/PerceivedComplexity
|
147
|
-
# rubocop:enable Metrics/MethodLength
|
148
|
-
# rubocop:enable Metrics/AbcSize
|
149
152
|
|
150
|
-
class << self
|
151
153
|
private
|
152
154
|
|
153
155
|
def active_trace
|
@@ -1,6 +1,5 @@
|
|
1
|
-
# typed: ignore
|
2
|
-
|
3
1
|
require_relative '../patcher'
|
2
|
+
require_relative '../../monitor'
|
4
3
|
require_relative 'gateway/watcher'
|
5
4
|
|
6
5
|
module Datadog
|
@@ -22,6 +21,7 @@ module Datadog
|
|
22
21
|
end
|
23
22
|
|
24
23
|
def patch
|
24
|
+
Monitor::Gateway::Watcher.watch
|
25
25
|
Gateway::Watcher.watch
|
26
26
|
Patcher.instance_variable_set(:@patched, true)
|
27
27
|
end
|