Skip to content

Commit

Permalink
fix line probe stack traces
Browse files Browse the repository at this point in the history
  • Loading branch information
p committed Aug 26, 2024
1 parent 1a79e25 commit d880a21
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/datadog/di/remote_processor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ def process(config)

begin
if probe.line?
hook_manager.hook_line(probe.file, probe.line_nos.first) do |tp|
# TODO Test that stack trace is correct with user code being top entry
hook_manager.hook_line(probe.file, probe.line_nos.first) do |tp, callers:|
puts '*** line probe executed ***'
ProbeNotifier.notify_emitting(probe)
ProbeNotifier.notify_executed(probe, tracepoint: tp, callers: caller)
ProbeNotifier.notify_executed(probe, tracepoint: tp, callers: callers)
end
elsif probe.method?
# TODO Test that stack trace is correct with user code being top entry
hook_manager.hook_method_when_defined(probe.type_name, probe.method_name) do |**opts|
puts "*** method probe executed: #{opts} ***"
ProbeNotifier.notify_emitting(probe)
Expand Down

0 comments on commit d880a21

Please sign in to comment.