ddtrace 1.11.1 → 1.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +49 -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 +17 -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/waf_rules/recommended.json +489 -133
  9. data/lib/datadog/appsec/assets/waf_rules/strict.json +2 -47
  10. data/lib/datadog/appsec/configuration/settings.rb +2 -10
  11. data/lib/datadog/appsec/configuration.rb +3 -9
  12. data/lib/datadog/appsec/contrib/rack/ext.rb +0 -1
  13. data/lib/datadog/appsec/contrib/rack/gateway/request.rb +12 -0
  14. data/lib/datadog/appsec/contrib/rack/gateway/response.rb +3 -3
  15. data/lib/datadog/appsec/contrib/rack/gateway/watcher.rb +9 -9
  16. data/lib/datadog/appsec/contrib/rack/integration.rb +0 -5
  17. data/lib/datadog/appsec/contrib/rack/reactive/request.rb +7 -1
  18. data/lib/datadog/appsec/contrib/rack/request_body_middleware.rb +1 -1
  19. data/lib/datadog/appsec/contrib/rack/request_middleware.rb +33 -25
  20. data/lib/datadog/appsec/contrib/rails/ext.rb +0 -1
  21. data/lib/datadog/appsec/contrib/rails/framework.rb +1 -13
  22. data/lib/datadog/appsec/contrib/rails/gateway/watcher.rb +3 -3
  23. data/lib/datadog/appsec/contrib/rails/integration.rb +0 -5
  24. data/lib/datadog/appsec/contrib/rails/patcher.rb +1 -1
  25. data/lib/datadog/appsec/contrib/sinatra/ext.rb +0 -1
  26. data/lib/datadog/appsec/contrib/sinatra/framework.rb +1 -13
  27. data/lib/datadog/appsec/contrib/sinatra/gateway/watcher.rb +6 -6
  28. data/lib/datadog/appsec/contrib/sinatra/integration.rb +0 -5
  29. data/lib/datadog/appsec/contrib/sinatra/patcher.rb +5 -4
  30. data/lib/datadog/appsec/event.rb +5 -5
  31. data/lib/datadog/appsec/ext.rb +1 -0
  32. data/lib/datadog/appsec/extensions.rb +2 -6
  33. data/lib/datadog/appsec/monitor/gateway/watcher.rb +3 -4
  34. data/lib/datadog/appsec/processor/rule_merger.rb +13 -7
  35. data/lib/datadog/appsec/processor.rb +0 -45
  36. data/lib/datadog/appsec/remote.rb +6 -0
  37. data/lib/datadog/appsec/scope.rb +61 -0
  38. data/lib/datadog/appsec.rb +6 -0
  39. data/lib/datadog/ci/ext/environment.rb +40 -4
  40. data/lib/datadog/core/configuration/settings.rb +66 -14
  41. data/lib/datadog/core/configuration.rb +5 -1
  42. data/lib/datadog/core/remote/client/capabilities.rb +1 -1
  43. data/lib/datadog/core/telemetry/collector.rb +2 -1
  44. data/lib/datadog/core/telemetry/v1/dependency.rb +2 -1
  45. data/lib/datadog/kit/appsec/events.rb +58 -13
  46. data/lib/datadog/kit/identity.rb +29 -10
  47. data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +2 -0
  48. data/lib/datadog/profiling/component.rb +54 -29
  49. data/lib/datadog/tracing/buffer.rb +0 -1
  50. data/lib/datadog/tracing/contrib/active_support/configuration/settings.rb +9 -1
  51. data/lib/datadog/tracing/contrib/aws/ext.rb +11 -1
  52. data/lib/datadog/tracing/contrib/aws/instrumentation.rb +7 -0
  53. data/lib/datadog/tracing/contrib/aws/parsed_context.rb +4 -0
  54. data/lib/datadog/tracing/contrib/aws/service/base.rb +16 -0
  55. data/lib/datadog/tracing/contrib/aws/service/dynamodb.rb +19 -0
  56. data/lib/datadog/tracing/contrib/aws/service/eventbridge.rb +19 -0
  57. data/lib/datadog/tracing/contrib/aws/service/kinesis.rb +29 -0
  58. data/lib/datadog/tracing/contrib/aws/service/s3.rb +19 -0
  59. data/lib/datadog/tracing/contrib/aws/service/sns.rb +27 -0
  60. data/lib/datadog/tracing/contrib/aws/service/sqs.rb +24 -0
  61. data/lib/datadog/tracing/contrib/aws/service/stepfunctions.rb +37 -0
  62. data/lib/datadog/tracing/contrib/aws/services.rb +10 -0
  63. data/lib/datadog/tracing/contrib/httpclient/configuration/settings.rb +6 -1
  64. data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +5 -2
  65. data/lib/datadog/tracing/contrib/httprb/configuration/settings.rb +6 -1
  66. data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +4 -2
  67. data/lib/datadog/tracing/contrib/mongodb/configuration/settings.rb +6 -1
  68. data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +5 -2
  69. data/lib/datadog/tracing/contrib/mysql2/configuration/settings.rb +6 -1
  70. data/lib/datadog/tracing/contrib/mysql2/instrumentation.rb +5 -2
  71. data/lib/datadog/tracing/contrib/patcher.rb +0 -1
  72. data/lib/datadog/tracing/contrib/pg/configuration/settings.rb +6 -1
  73. data/lib/datadog/tracing/contrib/pg/instrumentation.rb +5 -2
  74. data/lib/datadog/tracing/contrib/presto/configuration/settings.rb +6 -1
  75. data/lib/datadog/tracing/contrib/presto/instrumentation.rb +4 -2
  76. data/lib/datadog/tracing/contrib/propagation/sql_comment.rb +10 -2
  77. data/lib/datadog/tracing/contrib/racecar/configuration/settings.rb +9 -1
  78. data/lib/datadog/tracing/contrib/racecar/event.rb +3 -1
  79. data/lib/datadog/tracing/contrib/rack/middlewares.rb +3 -1
  80. data/lib/datadog/tracing/contrib/redis/configuration/settings.rb +6 -1
  81. data/lib/datadog/tracing/contrib/redis/tags.rb +4 -1
  82. data/lib/datadog/tracing/contrib/rest_client/configuration/settings.rb +6 -1
  83. data/lib/datadog/tracing/contrib/rest_client/request_patch.rb +4 -1
  84. data/lib/datadog/tracing/contrib/roda/patcher.rb +1 -1
  85. data/lib/datadog/tracing/contrib/sequel/database.rb +4 -1
  86. data/lib/datadog/tracing/contrib/sequel/dataset.rb +4 -1
  87. data/lib/datadog/tracing/contrib/sequel/utils.rb +4 -1
  88. data/lib/datadog/tracing/contrib/status_code_matcher.rb +0 -1
  89. data/lib/datadog/tracing/correlation.rb +0 -1
  90. data/lib/datadog/tracing/distributed/headers/ext.rb +1 -1
  91. data/lib/datadog/tracing/event.rb +0 -2
  92. data/lib/datadog/tracing/pipeline.rb +0 -2
  93. data/lib/datadog/tracing/runtime/metrics.rb +0 -2
  94. data/lib/datadog/tracing/sampling/rate_by_service_sampler.rb +0 -1
  95. data/lib/datadog/tracing/sampling/rate_sampler.rb +0 -2
  96. data/lib/datadog/tracing/sampling/rule.rb +0 -2
  97. data/lib/datadog/tracing/sampling/rule_sampler.rb +0 -2
  98. data/lib/datadog/tracing/span_operation.rb +0 -1
  99. data/lib/datadog/tracing/sync_writer.rb +0 -2
  100. data/lib/datadog/tracing/trace_operation.rb +0 -1
  101. data/lib/datadog/tracing/tracer.rb +0 -1
  102. data/lib/datadog/tracing/workers/trace_writer.rb +0 -1
  103. data/lib/datadog/tracing/workers.rb +0 -2
  104. data/lib/datadog/tracing/writer.rb +0 -2
  105. data/lib/ddtrace/version.rb +2 -2
  106. metadata +18 -19
  107. data/lib/datadog/appsec/contrib/configuration/settings.rb +0 -20
  108. data/lib/datadog/appsec/contrib/rack/configuration/settings.rb +0 -22
  109. data/lib/datadog/appsec/contrib/rails/configuration/settings.rb +0 -22
  110. 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