-
Notifications
You must be signed in to change notification settings - Fork 377
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 Use :return/:b_return trace points to target 'end' line of methods and blocks with line probes #4109
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p-datadog
changed the title
DEBUG-2334 Use :return trace point to target 'end' line of methods with line probes
DEBUG-2334 Use :return/:b_return trace points to target 'end' line of methods and blocks with line probes
Nov 13, 2024
p-datadog
force-pushed
the
di-end-instrumentation
branch
from
November 13, 2024 15:44
8c0d362
to
dd7a7dd
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4109 +/- ##
==========================================
- Coverage 97.77% 97.77% -0.01%
==========================================
Files 1350 1350
Lines 81079 81150 +71
Branches 4085 4087 +2
==========================================
+ Hits 79273 79342 +69
- Misses 1806 1808 +2 ☔ View full report in Codecov by Sentry. |
TonyCTHsu
approved these changes
Nov 14, 2024
p-datadog
pushed a commit
that referenced
this pull request
Nov 15, 2024
* origin/di-virtual: (30 commits) DEBUG-2334 Ruby 2 compatibility for dynamic instrumentation (#4120) Fix CI flakiness by adding dockerhub login Update filter with splitted gemfile and task [🤖] Lock Dependency: https://github.com/DataDog/dd-trace-rb/actions/runs/11846139851 Lock sqlite3 Lock ActiveRecord Fix deprecation behavior Fix trilogy/patcher_spec Update 3.4_relational_db.gemfile Update Ruby 3.4 Gemfile Add 3.4 to circleci DEBUG-2334 Use :return/:b_return trace points to target 'end' line of methods and blocks with line probes (#4109) Temporarily disable asan ruby job Update developement guide Lint Fix release_gem_spec.rb Gemfile migration Update usage Appraisal group generation replacement DEBUG-2334 remove unused method stubs from DI test suite (#4107) ...
p-datadog
added
the
dev/internal
Other internal work that does not need to be included in the changelog
label
Nov 19, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR adds
return
andb_return
trace point types to theline
trace point, permitting targetingend
lines of blocks and methods with line probes.Motivation:
Initial DI implementation for Ruby.
Change log entry
None
Additional Notes:
The
return
trace point types have the unfortunate side effect of always installing even if the target line has no executable ruby code (e.g. a comment line). This means users will not be getting notified when they try to instrument non-executable code lines. I think it is worthwhile to permit instrumentingend
lines even if it means no diagnostics when trying to instrument non-instrumentable lines, in other words, it is better to make more use cases work at the expense of worse diagnostics when something that wouldn't work is attempted.How to test the change?
Integration tests are included.