-
Notifications
You must be signed in to change notification settings - Fork 398
[PROF-12743] Runtime stack collection callback registration #4984
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
base: master
Are you sure you want to change the base?
Conversation
|
👋 Hey @DataDog/ruby-guild, please fill "Change log entry" section in the pull request description. If changes need to be present in CHANGELOG.md you can state it this way **Change log entry**
Yes. A brief summary to be placed into the CHANGELOG.md(possible answers Yes/Yep/Yeah) Or you can opt out like that **Change log entry**
None.(possible answers No/Nope/None) Visited at: 2025-11-18 21:06:17 UTC |
Typing analysisIgnored filesThis PR introduces 1 ignored file. It decreases the percentage of typed files from 38.32% to 38.21% (-0.11%). Ignored files (+1-0)❌ Introduced:Note: Ignored files are excluded from the next sections. Untyped other declarationsThis PR clears 1 untyped other declaration. It decreases the percentage of typed other declarations from 68.02% to 67.96% (-0.06%). Untyped other declarations (+0-1)✅ Cleared: |
|
✅ Tests 🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage 🔗 Commit SHA: df60ca0 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
e628919 to
564c828
Compare
f102a46 to
53afc20
Compare
|
Paper trail [ ] Checking unreasonable string sizes |
77d1391 to
1ebb325
Compare
| # * by msgpack, another datadog gem dependency | ||
| # (https://github.com/msgpack/msgpack-ruby/blob/18ce08f6d612fe973843c366ac9a0b74c4e50599/ext/msgpack/extconf.rb#L8) | ||
| append_cflags '-std=gnu99' | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken from ext/datadog_profiling_native_extension/extconf.rb, so that we can access private Ruby headers
1ebb325 to
4e51bf3
Compare
|
|
||
| # Benchmark result files | ||
| /benchmarks/*.json | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be removed when this repo is updated to use libdatadog v24; just for lower friction when local dev rn
ext/libdatadog_api/crashtracker.c
Outdated
| @@ -1,7 +1,49 @@ | |||
| #include <ruby.h> | |||
| #include <datadog/crashtracker.h> | |||
| #include "extconf.h" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Taken from ext/datadog_profiling_native_extension/private_vm_api_access.c so that we can access internal Ruby structures
3c782d0 to
8d957bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
831cda9 to
4b7af64
Compare
4b7af64 to
b8103ad
Compare
ace0e43 to
185b3a2
Compare
185b3a2 to
df60ca0
Compare

What does this PR do?
We want to collect runtime frames for the crashtracker. This approach follows how we access the call stack for profiling.
Motivation:
Change log entry
Additional Notes:
How to test the change?
"Ruby and C method runtime stack capture"RSpec testRun a ruby program with the crashtracker initialized. Runtime stacks should be visible in the
experimentalsection of the crash report. Stacktrace emitted from an example script I wrote to test