diff --git a/lib/datadog/di/code_tracker.rb b/lib/datadog/di/code_tracker.rb index 9271c0aa638..d041da251aa 100644 --- a/lib/datadog/di/code_tracker.rb +++ b/lib/datadog/di/code_tracker.rb @@ -26,7 +26,7 @@ def start # do nothing if the code tracker has already started. return if @compiled_trace_point - @compiled_trace_point = TracePoint.enable(:script_compiled) do |tp| + @compiled_trace_point = TracePoint.trace(:script_compiled) do |tp| # Useful attributes of the trace point here: # .instruction_sequence # .method_id