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

[PROF-8917] Add support for the libdatadog crash tracker #3384

Merged
merged 48 commits into from
May 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
e1340de
Introduce setting to control crash tracker option
ivoanjo Jan 16, 2024
789db6b
Extract `convert_tags` and `endpoint_from` from `HttpTransport` to li…
ivoanjo Jan 16, 2024
8afc9f2
Extract `ddtrace_version` from `HttpTransport` to `ruby_helpers.h`
ivoanjo Jan 16, 2024
a9c51b0
[PROF-8917] Add support for the libdatadog crash tracker
ivoanjo Jan 16, 2024
d89e876
Add TODO about integration spec
ivoanjo Jan 16, 2024
d3bc290
Update `crash_tracker.c` with latest libdatadog API
ivoanjo Mar 11, 2024
4889d05
Add experimental spec
ivoanjo Mar 11, 2024
37f8082
Minor: Remove unused/outdated type declaration
ivoanjo Mar 11, 2024
18758de
Redesign crash tracker to behave as regular object
ivoanjo Mar 11, 2024
02d8691
Merge branch 'master' into ivoanjo/prof-8917-crash-tracker-ruby
ivoanjo Mar 12, 2024
bc7d72c
Wire new crash tracker design into profiler
ivoanjo Mar 12, 2024
5312591
Minor: Remove redundant log message
ivoanjo Mar 12, 2024
45f5daa
Avoid leaking threads and outputting errors during spec
ivoanjo Mar 12, 2024
a5c0ba2
Rename CrashTracker to Crashtracker to match libdatadog naming
ivoanjo Mar 12, 2024
fb45524
Match fixed case for crashtracker APIs
ivoanjo Mar 12, 2024
6f83a4a
Merge branch 'master' into ivoanjo/prof-8917-crash-tracker-ruby
ivoanjo Mar 12, 2024
6af57da
Update to libdatadog 7 APIs
ivoanjo Mar 22, 2024
d19ecde
Merge branch 'master' into ivoanjo/prof-8917-crash-tracker-ruby
ivoanjo Mar 22, 2024
e670699
Enable frame resolution
ivoanjo Mar 22, 2024
d37cbb8
Use in-receiver resolve frames
ivoanjo Mar 28, 2024
d8b4122
Merge branch 'master' into ivoanjo/prof-8917-crash-tracker-ruby
ivoanjo Apr 3, 2024
6f3f8be
Adjust to latest libdatadog crash tracker changes
ivoanjo Apr 3, 2024
66e8d95
Remove TODO, it's fixed now
ivoanjo Apr 3, 2024
ce15ade
Add detail to explaining why alt stack can't be used
ivoanjo Apr 4, 2024
1b501cc
Clarify section of method where exceptions mustn't be raised
ivoanjo Apr 4, 2024
bd0537e
Document that crashtracker state is a singleton
ivoanjo Apr 4, 2024
0b40fbf
Avoid hardcoding ports when testing with built-in webrick
ivoanjo Apr 4, 2024
a3081b4
Add test coverage for crashtracker surviving in `#component_failed`
ivoanjo Apr 4, 2024
680c4a3
[NO-TICKET] Upgrade to libdatadog 8
ivoanjo Apr 9, 2024
32f02b4
Update gemfiles with libdatadog 7 -> 8 upgrade
ivoanjo Apr 9, 2024
356002e
Merge branch 'ivoanjo/libdatadog8-upgrade' into ivoanjo/prof-8917-cra…
ivoanjo Apr 9, 2024
7776107
[NO-TICKET] Upgrade to libdatadog 9
AlexJF May 6, 2024
520c8ab
Restore `required_ruby_version` to be in single line, but make Ruboco…
ivoanjo May 9, 2024
a6ddf72
Minor cleanups to comments
ivoanjo May 9, 2024
3c27b38
Minor: Fix length of guide comment for breaking lines in message
ivoanjo May 9, 2024
ed971a5
Revert "[NO-TICKET] Upgrade to libdatadog 8"
ivoanjo May 9, 2024
f029683
Revert "Update gemfiles with libdatadog 7 -> 8 upgrade"
ivoanjo May 9, 2024
7083455
Merge branch 'alexjf/libdatadog9' into ivoanjo/prof-8917-crash-tracke…
ivoanjo May 9, 2024
49e9f31
Update Ruby crashtracker to libdatadog v9 API
ivoanjo May 9, 2024
5197792
Setup `ld_library_path` argument for crashtracker
ivoanjo May 9, 2024
7cda332
Use `profiling.upload.timeout_seconds` for crashtracker timeout
ivoanjo May 9, 2024
b87f171
Remove temporary libdatadog monkey patch
ivoanjo May 9, 2024
3acf413
Fix `upload_timeout_seconds` being a float by default
ivoanjo May 9, 2024
bd7de08
Make rubocop happy
ivoanjo May 9, 2024
09976cc
Minor: Add explanation for why we're skipping crash tracker with cust…
ivoanjo May 10, 2024
5431d2b
Assert that no crashtracker is running before each test
ivoanjo May 10, 2024
a2ae730
Assert that correct signal name is reported
ivoanjo May 10, 2024
42f6ca5
Minor: Empty commit to re-trigger CI
ivoanjo May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update crash_tracker.c with latest libdatadog API
  • Loading branch information
ivoanjo committed Mar 11, 2024
commit d3bc290f22884c9038338b7fb4b50a420071634e
5 changes: 3 additions & 2 deletions ext/datadog_profiling_native_extension/crash_tracker.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ static VALUE _native_start_crashtracker(int argc, VALUE *argv, DDTRACE_UNUSED VA
// This needs to come last, after all things that can raise exceptions, as otherwise it can leak
ddog_Vec_Tag tags = convert_tags(tags_as_array);

ddog_prof_Configuration config = {
ddog_prof_CrashtrackerConfiguration config = {
.create_alt_stack = false, // This breaks the Ruby VM's stack overflow detection
.endpoint = endpoint,
.path_to_receiver_binary = char_slice_from_ruby_string(path_to_crashtracking_receiver_binary),
.resolve_frames = DDOG_PROF_CRASHTRACKER_RESOLVE_FRAMES_NEVER, // TODO: Enable && validate frame resolving
};

ddog_prof_Metadata metadata = {
ddog_prof_CrashtrackerMetadata metadata = {
.profiling_library_name = DDOG_CHARSLICE_C("dd-trace-rb"),
.profiling_library_version = char_slice_from_ruby_string(version),
.family = DDOG_CHARSLICE_C("ruby"),
Expand Down