Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 1 addition & 29 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2269,35 +2269,7 @@ manifest:
- declaration: missing_feature (app-started not sent)
component_version: <1.22.0
tests/test_telemetry.py::Test_Telemetry::test_telemetry_message_has_datadog_container_id: "irrelevant (cgroup in weblog is 0::/, so this test can't work)"
tests/test_telemetry.py::Test_TelemetryEnhancedConfigReporting: # Modified by easy win activation script
- weblog_declaration:
'*': missing_feature
rails52: '>=2.24.0'
rails80: '>=2.24.0'
uds-rails: '>=2.24.0'
rails61: '>=2.24.0'
uds-sinatra: '>=2.24.0'
rails72: '>=2.24.0'
sinatra41: '>=2.24.0'
sinatra14: '>=2.24.0'
rack: '>=2.24.0'
sinatra32: '>=2.24.0'
sinatra22: '>=2.24.0'
rails42: '>=2.24.0'
tests/test_telemetry.py::Test_TelemetryEnhancedConfigReporting::test_telemetry_enhanced_config_reporting_precedence: # Created by easy win activation script
- weblog_declaration:
rails42: missing_feature
uds-rails: missing_feature
sinatra22: missing_feature
rails72: missing_feature
rails61: missing_feature
rails52: missing_feature
sinatra32: missing_feature
rack: missing_feature
sinatra41: missing_feature
sinatra14: missing_feature
rails80: missing_feature
uds-sinatra: missing_feature
tests/test_telemetry.py::Test_TelemetryEnhancedConfigReporting: missing_feature (Temporarily disabled, will be re-enabled once dd-trace-rb#5483 is merged)
tests/test_telemetry.py::Test_TelemetrySCAEnvVar: missing_feature
tests/test_telemetry.py::Test_TelemetryV2: v1.11
tests/test_telemetry.py::Test_TelemetryV2::test_config_telemetry_completeness: irrelevant (This test causes too many friction. It has been replaced by alerts on slack channels)
Expand Down
8 changes: 8 additions & 0 deletions tests/test_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,14 @@ class Test_TelemetryEnhancedConfigReporting:
{"origin": "env_var", "value": "false"},
],
},
"ruby": {
"name": "DD_LOGS_INJECTION",
"precedence": [
{"origin": "default", "value": True},
{"origin": "env_var", "value": False},
{"origin": "code", "value": True},
],
},
}

def test_telemetry_events_seq_id(self):
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/ruby/rack/config.ru
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require 'datadog/kit/appsec/events/v2'

Datadog.configure do |c|
c.diagnostics.debug = true
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard c.tracing access behind capability check

CONFIG_CHAINING_TEST now triggers c.tracing.log_injection = true unconditionally, but this initializer still explicitly supports legacy tracer config objects right below via c.respond_to?(:tracing). For tracer versions that do not expose c.tracing, enabling this scenario env var causes a boot-time exception before the fallback path can run, so the Ruby weblog fails to start. Please guard this new assignment with the same capability check (and apply the same fix to the other Ruby weblog initializers changed in this commit).

Useful? React with 👍 / 👎.

if c.respond_to?(:tracing)
c.tracing.instrument :rack
else
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Datadog.configure do |c|
c.diagnostics.debug = true
c.appsec.instrument :active_record
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'
end

# Send non-web init event
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Datadog.configure do |c|
c.diagnostics.debug = true
c.appsec.instrument :active_record
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'
end

# Send non-web init event
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Datadog.configure do |c|
c.diagnostics.debug = true
c.appsec.instrument :active_record
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'
end

# Send non-web init event
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Datadog.configure do |c|
c.diagnostics.debug = true
c.appsec.instrument :active_record
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'

# Trace logging should be enabled with general tracer debugging,
# but it seems the tracer debugging is not enabled via the environment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Datadog.configure do |c|
c.diagnostics.debug = true
c.appsec.instrument :active_record
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'

# Trace logging should be enabled with general tracer debugging,
# but it seems the tracer debugging is not enabled via the environment
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/ruby/sinatra14/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

Datadog.configure do |c|
c.diagnostics.debug = true
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'

c.use :sinatra, service_name: ENV.fetch('DD_SERVICE', 'sinatra') unless c.respond_to?(:tracing)
end
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/ruby/sinatra22/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

Datadog.configure do |c|
c.diagnostics.debug = true
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'

c.use :sinatra, service_name: ENV.fetch('DD_SERVICE', 'sinatra') unless c.respond_to?(:tracing)
end
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/ruby/sinatra32/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

Datadog.configure do |c|
c.diagnostics.debug = true
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'

c.use :sinatra, service_name: ENV.fetch('DD_SERVICE', 'sinatra') unless c.respond_to?(:tracing)
end
Expand Down
1 change: 1 addition & 0 deletions utils/build/docker/ruby/sinatra41/app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

Datadog.configure do |c|
c.diagnostics.debug = true
c.tracing.log_injection = true if ENV['CONFIG_CHAINING_TEST'] == 'true'

c.use :sinatra, service_name: ENV.fetch('DD_SERVICE', 'sinatra') unless c.respond_to?(:tracing)
end
Expand Down
Loading