Skip to content

Use unhandled exception API#5411

Merged
gyuheon0h merged 2 commits intomasterfrom
gyuheon0h/new-unhandled-exc-epi
Mar 3, 2026
Merged

Use unhandled exception API#5411
gyuheon0h merged 2 commits intomasterfrom
gyuheon0h/new-unhandled-exc-epi

Conversation

@gyuheon0h
Copy link
Copy Markdown
Contributor

@gyuheon0h gyuheon0h commented Mar 2, 2026

What does this PR do?
Uses ddog_crasht_report_unhandled_exception to report unhandled exceptions instead of building a crash report piece by piece manually.

We no longer test crash report internals for unhandled exceptions; the implementation detail should be abstracted away to libdatadog; we need to just test that we trigger this on at_exit

Motivation:
Libdatadog has a new API to report unhandled exceptions, here: feat(crashtracking): unhandled exception reporting FFI

We should use it , since it abstracts away the building and reporting logic for a crash report, instead of handling building and exporting crash reports on the library side

Change log entry
None

Additional Notes:

How to test the change?
Run a ruby program instrumented with this and crash it and check the agent logs.

Run rpsec test to ensure at_exit hook calls the report func

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Mar 2, 2026

Thank you for updating Change log entry section 👏

Visited at: 2026-03-02 21:38:20 UTC

@github-actions github-actions Bot added the core Involves Datadog core libraries label Mar 2, 2026
@datadog-datadog-prod-us1
Copy link
Copy Markdown
Contributor

datadog-datadog-prod-us1 Bot commented Mar 2, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 95.10% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: e4b4b24 | Docs | Datadog PR Page | Was this helpful? React with 👍/👎 or give us feedback!

Comment thread spec/datadog/core/crashtracking/component_spec.rb
@pr-commenter
Copy link
Copy Markdown

pr-commenter Bot commented Mar 2, 2026

Benchmarks

Benchmark execution time: 2026-03-03 14:29:28

Comparing candidate commit e4b4b24 in PR branch gyuheon0h/new-unhandled-exc-epi with baseline commit 158e037 in branch master.

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

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

scenario:profiling - hold / resume

  • 🟥 throughput [-107182.851op/s; -103905.161op/s] or [-6.243%; -6.052%]

scenario:profiling - sample timeline=false

  • 🟩 throughput [+0.429op/s; +0.488op/s] or [+6.398%; +7.283%]

@gyuheon0h gyuheon0h marked this pull request as ready for review March 3, 2026 05:27
@gyuheon0h gyuheon0h requested review from a team as code owners March 3, 2026 05:27
@gyuheon0h gyuheon0h requested a review from ivoanjo March 3, 2026 05:27
Copy link
Copy Markdown
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Left two comments but overall it's looking great.

Comment thread lib/datadog/core/crashtracking/component.rb Outdated
Comment thread spec/datadog/core/crashtracking/component_spec.rb
@gyuheon0h gyuheon0h merged commit 321bbd1 into master Mar 3, 2026
644 of 645 checks passed
@gyuheon0h gyuheon0h deleted the gyuheon0h/new-unhandled-exc-epi branch March 3, 2026 15:15
@github-actions github-actions Bot added this to the 2.30.0 milestone Mar 3, 2026
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.

2 participants