dd-trace-rb
dd-trace-rb copied to clipboard
DEBUG-2334 dynamic instrumentation instrumenter component
Change log entry
None, DI is not yet customer-visible.
What does this PR do?
This component instruments target code, meaning when target method or target line is invoked, the specified callback will be called with information about the program state at the target point (e.g. method parameters for method probe, local variables for line probe).
Motivation: Initial implementation of Ruby dynamic instrumentation.
Additional Notes: The instrumenter itself is under 300 lines. Most of the diff is in the test suite.
How to test the change? This PR includes unit tests, but a large part of instrumentation is dealing with code that is loaded after the instrumentation is installed (since much Ruby code is lazily loaded) and test coverage for this will be added later since it requires more DI components.
Unsure? Have a question? Request a review!
Benchmarks
Benchmark execution time: 2024-10-17 20:01:02
Comparing candidate commit f904292776cb16d1082e50f06bcce17fa66a8fd5 in PR branch di-instrumenter with baseline commit 60febf8012de92758b85a7de0287342475ef0fb0 in branch master.
Found 0 performance improvements and 1 performance regressions! Performance is the same for 23 metrics, 2 unstable metrics.
scenario:profiler - sample timeline=false
- 🟥
throughput[-0.637op/s; -0.619op/s] or [-9.385%; -9.119%]
This PR has some xit tests, I am planning on reviewing them to either make them work or delete them from the tree.
Codecov Report
Attention: Patch coverage is 92.33716% with 40 lines in your changes missing coverage. Please review.
Project coverage is 97.79%. Comparing base (
e8ef953) to head (8ef0a12). Report is 3 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #4012 +/- ##
==========================================
- Coverage 97.82% 97.79% -0.04%
==========================================
Files 1327 1337 +10
Lines 79698 80212 +514
Branches 3952 4013 +61
==========================================
+ Hits 77968 78441 +473
- Misses 1730 1771 +41
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.