-
Notifications
You must be signed in to change notification settings - Fork 13
[crashtracker] API to enable/disable crash report collection #1017
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
Conversation
590d994
to
0bf8b51
Compare
BenchmarksComparisonBenchmark execution time: 2025-04-16 13:29:31 Comparing candidate commit 49ffd7b in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 52 metrics, 2 unstable metrics. CandidateCandidate benchmark detailsGroup 1
Group 2
Group 3
Group 4
Group 5
Group 6
Group 7
Group 8
Group 9
Group 10
Group 11
Group 12
Group 13
BaselineOmitted due to size. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1017 +/- ##
==========================================
+ Coverage 71.52% 71.54% +0.01%
==========================================
Files 339 339
Lines 50628 50646 +18
==========================================
+ Hits 36214 36233 +19
+ Misses 14414 14413 -1
🚀 New features to boost your workflow:
|
Artifact Size Benchmark Reportaarch64-alpine-linux-musl
aarch64-unknown-linux-gnu
libdatadog-x64-windows
libdatadog-x86-windows
x86_64-alpine-linux-musl
x86_64-unknown-linux-gnu
|
…#1066) # What does this PR do? This PR adds the following new APIs to the crashtracker: * `ddog_crasht_enable` * `ddog_crasht_disable` * `ddog_crasht_reconfigure` # Motivation Prior to #1000, it was possible to: * reconfigure the crashtracker by calling init again * stop the crashtracker Both features were removed as it could cause issues with signal handlers and chaining. But, we still need to be able to update the configuration as for instance the following can change at run-time for Ruby and need to be updated: * Endpoint * Tags This PR restores some of the behavior removed in #1000, without the unsafety of touching signal handlers: * `enable`/`disable` just skip the crashtracker signal handling code, but never uninstall it * `reconfigure` does the same as `init` BUT without touching the signal handlers # Additional Notes This PR supercedes #1017 . # How to test the change? I've validated this branch with DataDog/dd-trace-rb#4577 on the Ruby side, and I'm able to get a green test suite for the Ruby crashtracker. --------- Co-authored-by: Daniel Schwartz-Narbonne <[email protected]>
What does this PR do?
Adds new
ddog_crasht_enable
andddog_crasht_disable
functions.Motivation
@ivoanjo wanted a way to do this, which had been removed in a previous PR as being unsound. This new mechanism is safer.
Additional Notes
Anything else we should know when reviewing?
How to test the change?
Describe here in detail how the change can be validated.