ddtrace 1.11.0 → 1.12.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +85 -1
  3. data/ext/ddtrace_profiling_native_extension/NativeExtensionDesign.md +6 -4
  4. data/ext/ddtrace_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +34 -16
  5. data/ext/ddtrace_profiling_native_extension/extconf.rb +19 -3
  6. data/ext/ddtrace_profiling_native_extension/native_extension_helpers.rb +2 -2
  7. data/ext/ddtrace_profiling_native_extension/private_vm_api_access.c +38 -4
  8. data/lib/datadog/appsec/assets/blocked.html +1 -1
  9. data/lib/datadog/appsec/assets/waf_rules/recommended.json +489 -133
  10. data/lib/datadog/appsec/assets/waf_rules/strict.json +2 -47
  11. data/lib/datadog/appsec/configuration/settings.rb +2 -10
  12. data/lib/datadog/appsec/configuration.rb +3 -9
  13. data/lib/datadog/appsec/contrib/rack/ext.rb +0 -1
  14. data/lib/datadog/appsec/contrib/rack/gateway/request.rb +17 -3
  15. data/lib/datadog/appsec/contrib/rack/gateway/response.rb +3 -3
  16. data/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +27 -45
  17. data/lib/datadog/appsec/contrib/rack/integration.rb +0 -5
  18. data/lib/datadog/appsec/contrib/rack/reactive/request.rb +7 -1
  19. data/lib/datadog/appsec/contrib/rack/request_body_middleware.rb +1 -1
  20. data/lib/datadog/appsec/contrib/rack/request_middleware.rb +34 -26
  21. data/lib/datadog/appsec/contrib/rails/ext.rb +0 -1
  22. data/lib/datadog/appsec/contrib/rails/framework.rb +1 -13
  23. data/lib/datadog/appsec/contrib/rails/gateway/watcher.rb +9 -27
  24. data/lib/datadog/appsec/contrib/rails/integration.rb +0 -5
  25. data/lib/datadog/appsec/contrib/rails/patcher.rb +1 -1
  26. data/lib/datadog/appsec/contrib/sinatra/ext.rb +0 -1
  27. data/lib/datadog/appsec/contrib/sinatra/framework.rb +1 -13
  28. data/lib/datadog/appsec/contrib/sinatra/gateway/watcher.rb +18 -36
  29. data/lib/datadog/appsec/contrib/sinatra/integration.rb +0 -5
  30. data/lib/datadog/appsec/contrib/sinatra/patcher.rb +5 -4
  31. data/lib/datadog/appsec/event.rb +37 -37
  32. data/lib/datadog/appsec/ext.rb +1 -0
  33. data/lib/datadog/appsec/extensions.rb +2 -6
  34. data/lib/datadog/appsec/monitor/gateway/watcher.rb +9 -28
  35. data/lib/datadog/appsec/processor/rule_loader.rb +3 -3
  36. data/lib/datadog/appsec/processor/rule_merger.rb +15 -29
  37. data/lib/datadog/appsec/processor.rb +0 -45
  38. data/lib/datadog/appsec/remote.rb +10 -8
  39. data/lib/datadog/appsec/response.rb +23 -11
  40. data/lib/datadog/appsec/scope.rb +61 -0
  41. data/lib/datadog/appsec.rb +6 -0
  42. data/lib/datadog/ci/ext/environment.rb +40 -4
  43. data/lib/datadog/core/configuration/components.rb +9 -3
  44. data/lib/datadog/core/configuration/settings.rb +74 -14
  45. data/lib/datadog/core/configuration.rb +5 -1
  46. data/lib/datadog/core/remote/client/capabilities.rb +1 -1
  47. data/lib/datadog/core/remote/client.rb +5 -1
  48. data/lib/datadog/core/telemetry/client.rb +1 -1
  49. data/lib/datadog/core/telemetry/collector.rb +2 -1
  50. data/lib/datadog/core/telemetry/http/transport.rb +1 -0
  51. data/lib/datadog/core/telemetry/v1/dependency.rb +2 -1
  52. data/lib/datadog/kit/appsec/events.rb +58 -13
  53. data/lib/datadog/kit/identity.rb +29 -10
  54. data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +2 -0
  55. data/lib/datadog/profiling/component.rb +69 -29
  56. data/lib/datadog/profiling.rb +2 -1
  57. data/lib/datadog/tracing/buffer.rb +0 -1
  58. data/lib/datadog/tracing/contrib/active_support/configuration/settings.rb +9 -1
  59. data/lib/datadog/tracing/contrib/aws/ext.rb +11 -1
  60. data/lib/datadog/tracing/contrib/aws/instrumentation.rb +7 -0
  61. data/lib/datadog/tracing/contrib/aws/parsed_context.rb +4 -0
  62. data/lib/datadog/tracing/contrib/aws/service/base.rb +16 -0
  63. data/lib/datadog/tracing/contrib/aws/service/dynamodb.rb +22 -0
  64. data/lib/datadog/tracing/contrib/aws/service/eventbridge.rb +22 -0
  65. data/lib/datadog/tracing/contrib/aws/service/kinesis.rb +32 -0
  66. data/lib/datadog/tracing/contrib/aws/service/s3.rb +22 -0
  67. data/lib/datadog/tracing/contrib/aws/service/sns.rb +30 -0
  68. data/lib/datadog/tracing/contrib/aws/service/sqs.rb +27 -0
  69. data/lib/datadog/tracing/contrib/aws/service/states.rb +40 -0
  70. data/lib/datadog/tracing/contrib/aws/services.rb +18 -0
  71. data/lib/datadog/tracing/contrib/httpclient/configuration/settings.rb +6 -1
  72. data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +5 -2
  73. data/lib/datadog/tracing/contrib/httprb/configuration/settings.rb +6 -1
  74. data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +4 -2
  75. data/lib/datadog/tracing/contrib/mongodb/configuration/settings.rb +6 -1
  76. data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +5 -2
  77. data/lib/datadog/tracing/contrib/mysql2/configuration/settings.rb +6 -1
  78. data/lib/datadog/tracing/contrib/mysql2/instrumentation.rb +5 -2
  79. data/lib/datadog/tracing/contrib/patcher.rb +0 -1
  80. data/lib/datadog/tracing/contrib/pg/configuration/settings.rb +6 -1
  81. data/lib/datadog/tracing/contrib/pg/instrumentation.rb +5 -2
  82. data/lib/datadog/tracing/contrib/presto/configuration/settings.rb +6 -1
  83. data/lib/datadog/tracing/contrib/presto/instrumentation.rb +4 -2
  84. data/lib/datadog/tracing/contrib/propagation/sql_comment.rb +10 -2
  85. data/lib/datadog/tracing/contrib/racecar/configuration/settings.rb +9 -1
  86. data/lib/datadog/tracing/contrib/racecar/event.rb +3 -1
  87. data/lib/datadog/tracing/contrib/rack/middlewares.rb +3 -1
  88. data/lib/datadog/tracing/contrib/redis/configuration/settings.rb +6 -1
  89. data/lib/datadog/tracing/contrib/redis/tags.rb +4 -1
  90. data/lib/datadog/tracing/contrib/rest_client/configuration/settings.rb +6 -1
  91. data/lib/datadog/tracing/contrib/rest_client/request_patch.rb +4 -1
  92. data/lib/datadog/tracing/contrib/roda/patcher.rb +1 -1
  93. data/lib/datadog/tracing/contrib/sequel/database.rb +4 -1
  94. data/lib/datadog/tracing/contrib/sequel/dataset.rb +4 -1
  95. data/lib/datadog/tracing/contrib/sequel/utils.rb +4 -1
  96. data/lib/datadog/tracing/contrib/status_code_matcher.rb +0 -1
  97. data/lib/datadog/tracing/correlation.rb +0 -1
  98. data/lib/datadog/tracing/distributed/headers/ext.rb +1 -1
  99. data/lib/datadog/tracing/event.rb +0 -2
  100. data/lib/datadog/tracing/pipeline.rb +0 -2
  101. data/lib/datadog/tracing/runtime/metrics.rb +0 -2
  102. data/lib/datadog/tracing/sampling/rate_by_service_sampler.rb +0 -1
  103. data/lib/datadog/tracing/sampling/rate_sampler.rb +0 -2
  104. data/lib/datadog/tracing/sampling/rule.rb +0 -2
  105. data/lib/datadog/tracing/sampling/rule_sampler.rb +0 -2
  106. data/lib/datadog/tracing/span_operation.rb +0 -1
  107. data/lib/datadog/tracing/sync_writer.rb +0 -2
  108. data/lib/datadog/tracing/trace_operation.rb +0 -1
  109. data/lib/datadog/tracing/tracer.rb +0 -1
  110. data/lib/datadog/tracing/workers/trace_writer.rb +0 -1
  111. data/lib/datadog/tracing/workers.rb +0 -2
  112. data/lib/datadog/tracing/writer.rb +0 -2
  113. data/lib/ddtrace/version.rb +2 -2
  114. metadata +17 -18
  115. data/lib/datadog/appsec/contrib/configuration/settings.rb +0 -20
  116. data/lib/datadog/appsec/contrib/rack/configuration/settings.rb +0 -22
  117. data/lib/datadog/appsec/contrib/rails/configuration/settings.rb +0 -22
  118. data/lib/datadog/appsec/contrib/sinatra/configuration/settings.rb +0 -22
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../../../core/configuration/base'
4
-
5
- module Datadog
6
- module AppSec
7
- module Contrib
8
- module Configuration
9
- # Common settings for all integrations
10
- # TODO: move to datadog/appsec/configuration or remove?
11
- class Settings
12
- include Datadog::Core::Configuration::Base
13
-
14
- option :enabled, default: true
15
- option :service_name
16
- end
17
- end
18
- end
19
- end
20
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../../configuration/settings'
4
- require_relative '../ext'
5
-
6
- module Datadog
7
- module AppSec
8
- module Contrib
9
- module Rack
10
- module Configuration
11
- # Custom settings for the Rack integration
12
- class Settings < Datadog::AppSec::Contrib::Configuration::Settings
13
- option :enabled do |o|
14
- o.default { env_to_bool(Ext::ENV_ENABLED, true) }
15
- o.lazy
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../../configuration/settings'
4
- require_relative '../ext'
5
-
6
- module Datadog
7
- module AppSec
8
- module Contrib
9
- module Rails
10
- module Configuration
11
- # Custom settings for the Rack integration
12
- class Settings < Datadog::AppSec::Contrib::Configuration::Settings
13
- option :enabled do |o|
14
- o.default { env_to_bool(Ext::ENV_ENABLED, true) }
15
- o.lazy
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end
@@ -1,22 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../../configuration/settings'
4
- require_relative '../ext'
5
-
6
- module Datadog
7
- module AppSec
8
- module Contrib
9
- module Sinatra
10
- module Configuration
11
- # Custom settings for the Rack integration
12
- class Settings < Datadog::AppSec::Contrib::Configuration::Settings
13
- option :enabled do |o|
14
- o.default { env_to_bool(Ext::ENV_ENABLED, true) }
15
- o.lazy
16
- end
17
- end
18
- end
19
- end
20
- end
21
- end
22
- end