Skip to content
Open
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
18 changes: 12 additions & 6 deletions manifests/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2062,11 +2062,12 @@ manifest:
tests/debugger/test_debugger_probe_budgets.py::Test_Debugger_Probe_Budgets:
- weblog_declaration:
"*": irrelevant
rails72: missing_feature (feature not implemented)
rails80: missing_feature (feature not implemented)
uds-rails: missing_feature (feature not implemented)
tests/debugger/test_debugger_probe_budgets.py::Test_Debugger_Probe_Budgets::test_log_line_budgets: missing_feature (Not yet implemented)
tests/debugger/test_debugger_probe_budgets.py::Test_Debugger_Probe_Budgets::test_per_trace_budget: missing_feature (per-trace snapshot budget of 1 not implemented)
rails72: v2.49.0
rails80: v2.49.0
uds-rails: v2.49.0
tests/debugger/test_debugger_probe_budgets.py::Test_Debugger_Probe_Budgets::test_log_line_budgets: incomplete_test_app (weblog has no /debugger/budgets endpoint)
tests/debugger/test_debugger_probe_budgets.py::Test_Debugger_Probe_Budgets::test_log_line_capture_expression_budgets: incomplete_test_app (weblog has no /debugger/budgets endpoint)
tests/debugger/test_debugger_probe_budgets.py::Test_Debugger_Probe_Budgets::test_span_probe_expression_budgets: incomplete_test_app (weblog has no /debugger/budgets endpoint)
tests/debugger/test_debugger_probe_snapshot.py::Test_Debugger_Line_Probe_Snaphots:
- weblog_declaration:
"*": irrelevant
Expand Down Expand Up @@ -2137,7 +2138,12 @@ manifest:
rails72: v2.47.0-dev
rails80: v2.47.0-dev
uds-rails: v2.47.0-dev
tests/debugger/test_debugger_snapshot_correlation.py::Test_Debugger_Coordinated_Sampling: missing_feature (no per-trace coordinated sampling; probabilistic per-trace rate not implemented)
tests/debugger/test_debugger_snapshot_correlation.py::Test_Debugger_Coordinated_Sampling:
- weblog_declaration:
"*": irrelevant
rails72: v2.49.0
rails80: v2.49.0
uds-rails: v2.49.0
tests/debugger/test_debugger_snapshot_correlation.py::Test_Debugger_Coordinated_Sampling_Line_Probe: irrelevant (Line-probe variant is only used by Node.js)
tests/debugger/test_debugger_symdb.py::Test_Debugger_SymDb:
- weblog_declaration:
Expand Down
4 changes: 2 additions & 2 deletions tests/debugger/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,8 @@ def method_and_language_to_line_number(self, method: str, language: str) -> list
"Correlation": {"nodejs": [178]},
"CorrelationMiddle": {"nodejs": [184]},
"CorrelationLeaf": {"nodejs": [188]},
"CorrelationLoopBody": {"golang": [144], "nodejs": [194]},
"CorrelationLoopSibling": {"golang": [147], "nodejs": [197]},
"CorrelationLoopBody": {"golang": [144], "nodejs": [194], "ruby": [256]},
"CorrelationLoopSibling": {"golang": [147], "nodejs": [197], "ruby": [259]},
}

return definitions.get(method, {}).get(language, [])
Expand Down
2 changes: 2 additions & 0 deletions utils/build/docker/ruby/rails72/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def call(_env)
%w(operators strings collections null exception).each do |sub|
get "/debugger/expression/#{sub}" => "debugger#expression_#{sub}"
end
get '/debugger/correlation' => 'debugger#correlation'
get '/debugger/correlation/loop/:loops' => 'debugger#correlation_loop'

scope '/rasp' do
get 'sqli' => 'rasp#sqli'
Expand Down
2 changes: 2 additions & 0 deletions utils/build/docker/ruby/rails80/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def call(_env)
%w(operators strings collections null exception).each do |sub|
get "/debugger/expression/#{sub}" => "debugger#expression_#{sub}"
end
get '/debugger/correlation' => 'debugger#correlation'
get '/debugger/correlation/loop/:loops' => 'debugger#correlation_loop'

scope '/rasp' do
get 'sqli' => 'rasp#sqli'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,31 @@ def snapshot_limits
longString = data[:longString]
render inline: 'Capture limits probe' # must be line 233
end

def correlation
result = correlation_middle
sleep 0.4 # space the probed call sites in time
render inline: "Correlation #{result}"
end

def correlation_middle
result = correlation_leaf
sleep 0.4 # space the probed call sites in time
result
end

def correlation_leaf
3
end

def correlation_loop
loops = params[:loops].to_i
total = 0
loops.times do |i|
total += i # correlation loop body line probe
sleep 1
end
after_loop = total # correlation loop sibling line probe
render inline: "Loop #{after_loop}"
end
end
Loading