Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEBUG-2334 do not try to install pending probes on eval'd code #4166

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

p-datadog
Copy link
Contributor

@p-datadog p-datadog commented Nov 26, 2024

What does this PR do?
Fixes incorrect placement of the call to install pending probes in script_compiled trace point handler. The call should only be made if there is a path corresponding to the code having been compiled (i.e., code was required or loaded but not evaled). Previously the call was outside of the conditional checking if path is present and would be made also for eval'd code, subsequently failing in path suffix matching.

Motivation:
The failure manifested in my local testing with "propagate all exceptions" flag set which I normally have on.

Change log entry
None

Additional Notes:
The existing exception boundaries prevent the issue being repaired in this PR from having customer impact - it would only generate noise in the log. The exception boundary at trace point execution means the trace point execution wouldn't do anything, but it should do nothing for eval'd code.

How to test the change?
Unit tests are included

@p-datadog p-datadog requested a review from a team as a code owner November 26, 2024 17:38
@pr-commenter
Copy link

pr-commenter bot commented Nov 26, 2024

Benchmarks

Benchmark execution time: 2024-11-26 23:02:22

Comparing candidate commit 06825d3 in PR branch di-line-probes-eval with baseline commit ce4393e in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 31 metrics, 2 unstable metrics.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 75.55556% with 11 lines in your changes missing coverage. Please review.

Project coverage is 97.77%. Comparing base (ce4393e) to head (06825d3).

Files with missing lines Patch % Lines
spec/datadog/di/code_tracker_spec.rb 88.88% 4 Missing ⚠️
lib/datadog/di/probe.rb 0.00% 2 Missing ⚠️
lib/datadog/di/probe_manager.rb 0.00% 2 Missing ⚠️
lib/datadog/di/utils.rb 50.00% 2 Missing ⚠️
lib/datadog/di/code_tracker.rb 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4166      +/-   ##
==========================================
- Coverage   97.78%   97.77%   -0.01%     
==========================================
  Files        1353     1353              
  Lines       81817    81857      +40     
  Branches     4145     4153       +8     
==========================================
+ Hits        80001    80037      +36     
- Misses       1816     1820       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@p-datadog p-datadog merged commit 4848ea6 into master Nov 27, 2024
290 checks passed
@p-datadog p-datadog deleted the di-line-probes-eval branch November 27, 2024 15:21
@github-actions github-actions bot added this to the 2.8.0 milestone Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants