dd-trace-rb icon indicating copy to clipboard operation
dd-trace-rb copied to clipboard

DEBUG-2334 dynamic instrumentation instrumenter component

Open p-datadog opened this issue 4 months ago • 3 comments

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!

p-datadog avatar Oct 17 '24 18:10 p-datadog