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 remaining dynamic instrumentation code #4098

Draft
wants to merge 28 commits into
base: master
Choose a base branch
from
Draft

Conversation

p-datadog
Copy link
Contributor

What does this PR do?

  • Adds DI Remote and integrates DI into remote config processing
  • Integration test starting from remote config parsing, through instrumentation to snapshot sending to backend
  • DI is now enabled by default
  • DI code tracking is now enabled by default (script_compiled trace point)

Motivation:

Initial DI implementation in Ruby

Change log entry
Dynamic instrumentation is now available in Ruby. Currently only log probes are implemented, but they can be set on both methods and lines.

Additional Notes:

Replaces #4063

How to test the change?

@p-datadog p-datadog requested a review from a team as a code owner November 11, 2024 13:16
@github-actions github-actions bot added the core Involves Datadog core libraries label Nov 11, 2024
@p-datadog p-datadog marked this pull request as draft November 11, 2024 13:16
lib/datadog/di/serializer.rb Outdated Show resolved Hide resolved
spec/datadog/di/serializer_helper.rb Outdated Show resolved Hide resolved
spec/datadog/di/integration/instrumentation_spec.rb Outdated Show resolved Hide resolved
spec/datadog/di/serializer_spec.rb Outdated Show resolved Hide resolved
spec/datadog/di/serializer_helper.rb Outdated Show resolved Hide resolved
lib/datadog/di/probe_manager.rb Outdated Show resolved Hide resolved
lib/datadog/di/serializer.rb Outdated Show resolved Hide resolved
lib/datadog/di/code_tracker.rb Outdated Show resolved Hide resolved
spec/datadog/di/serializer_spec.rb Outdated Show resolved Hide resolved
@pr-commenter
Copy link

pr-commenter bot commented Nov 11, 2024

Benchmarks

Benchmark execution time: 2024-11-13 17:07:56

Comparing candidate commit 210b795 in PR branch di-rest-2 with baseline commit 494abac in branch master.

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

scenario:library - Gem loading

  • 🟥 throughput [-2.105op/s; -2.100op/s] or [-74.580%; -74.431%]

scenario:method instrumentation

  • 🟥 throughput [-25341.741op/s; -24358.525op/s] or [-11.110%; -10.679%]

scenario:profiler - Major GC runs (profiling disabled)

  • 🟥 throughput [-10.737op/s; -10.175op/s] or [-9.043%; -8.571%]

scenario:profiler - sample timeline=false

  • 🟥 throughput [-1.300op/s; -1.275op/s] or [-18.936%; -18.580%]

@p-datadog p-datadog force-pushed the di-rest-2 branch 2 times, most recently from b7e93a0 to 288d1d8 Compare November 12, 2024 15:57
@p-datadog p-datadog force-pushed the di-rest-2 branch 4 times, most recently from 5408cbb to 79e1ff8 Compare November 13, 2024 01:09
…rtual' into HEAD

* di-end-instrumentation:
  test else and end of a conditional
  also handle end lines of blocks via b_return trace point
  check line probes on non-executable lines
  DEBUG-2334 Use :return trace point to target 'end' line of methods with line probes
  Deny `rubygems-update` injection

* di-unused-stubs:
  DEBUG-2334 remove unused method stubs from DI test suite

* di-virtual:
  DEBUG-2334 repair instrumentation of virtual and later-defined methods
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Involves Datadog core libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants