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

Merged
merged 40 commits into from
Nov 25, 2024
Merged

DEBUG-2334 remaining dynamic instrumentation code #4098

merged 40 commits into from
Nov 25, 2024

Conversation

p-datadog
Copy link
Member

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

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) if DD_DYNAMIC_INSTRUMENTATION_ENABLED is set in environment

Motivation:

Initial DI implementation in Ruby

Change log entry
Dynamic instrumentation is now available in Ruby as a Preview. Currently only log probes are implemented, they can be set on both methods and lines. If you are interested in trying out Dynamic Instrumentation in Ruby, please contact Datadog to be added to the Preview program.

Additional Notes:

Replaces #4063

How to test the change?
Additional unit and integration tests are included + system tests in DataDog/system-tests#3516

@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-25 14:40:34

Comparing candidate commit 5fe2b77 in PR branch di-rest-2 with baseline commit 0d88e2a in branch master.

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

scenario:profiler - sample timeline=false

  • 🟥 throughput [-0.514op/s; -0.501op/s] or [-7.833%; -7.626%]

@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 5 times, most recently from 79e1ff8 to 7d4aedf Compare November 13, 2024 02:52
lib/datadog/di/instrumenter.rb Outdated Show resolved Hide resolved
lib/datadog/di/instrumenter.rb Outdated Show resolved Hide resolved
@p-datadog p-datadog force-pushed the di-rest-2 branch 5 times, most recently from 66546cd to 52034e2 Compare November 18, 2024 15:18
p added 2 commits November 21, 2024 11:23
Maximum capture attribute count can be specified in the probe,
implement support for it in DI.
lib/datadog/di.rb Outdated Show resolved Hide resolved
lib/datadog/di.rb Outdated Show resolved Hide resolved
lib/datadog/di/remote.rb Outdated Show resolved Hide resolved
@p-datadog p-datadog marked this pull request as ready for review November 22, 2024 03:18
@codecov-commenter
Copy link

codecov-commenter commented Nov 24, 2024

Codecov Report

Attention: Patch coverage is 95.32710% with 20 lines in your changes missing coverage. Please review.

Project coverage is 97.78%. Comparing base (0d88e2a) to head (5fe2b77).
Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
lib/datadog/di.rb 57.14% 9 Missing ⚠️
spec/datadog/di/remote_spec.rb 96.99% 4 Missing ⚠️
lib/datadog/di/code_tracker.rb 0.00% 2 Missing ⚠️
lib/datadog/di/remote.rb 95.74% 2 Missing ⚠️
.../integration/everything_from_remote_config_spec.rb 98.38% 2 Missing ⚠️
lib/datadog/core/configuration/components.rb 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #4098    +/-   ##
========================================
  Coverage   97.78%   97.78%            
========================================
  Files        1350     1353     +3     
  Lines       81399    81786   +387     
  Branches     4109     4141    +32     
========================================
+ Hits        79593    79974   +381     
- Misses       1806     1812     +6     

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


🚨 Try these New Features:

@p-datadog p-datadog merged commit 23a33f9 into master Nov 25, 2024
285 checks passed
@p-datadog p-datadog deleted the di-rest-2 branch November 25, 2024 17:32
@github-actions github-actions bot added this to the 2.8.0 milestone Nov 25, 2024
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.

5 participants