Skip to content

[NO-TICKET] Profiler: Turn initialization errors into log messages#5509

Merged
ivoanjo merged 1 commit into
masterfrom
ivoanjo/rescue-profiler-setup
Mar 26, 2026
Merged

[NO-TICKET] Profiler: Turn initialization errors into log messages#5509
ivoanjo merged 1 commit into
masterfrom
ivoanjo/rescue-profiler-setup

Conversation

@ivoanjo

@ivoanjo ivoanjo commented Mar 26, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Turn profiler initialization errors into warning log messages, instead of allowing them to propagate and impact the application.

Motivation:

#5508 highlighted that initialization errors (in that case, from libdatadog) were propagating up and impacting the application startup. The profiler should gracefully disable itself when it runs into issues.

Change log entry

Yes. Profiler: Turn initialization errors into log messages.

Additional Notes:

N/A

How to test the change?

New spec added to spec/datadog/profiling/component_spec.rb.

@ivoanjo
ivoanjo requested review from a team as code owners March 26, 2026 10:30
@github-actions github-actions Bot added the profiling Involves Datadog profiling label Mar 26, 2026
@ivoanjo

ivoanjo commented Mar 26, 2026

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Mar 26, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-03-26 10:33:50 UTC ℹ️ Start processing command /merge


2026-03-26 10:33:59 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-03-26 14:08:09 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

@datadog-official

datadog-official Bot commented Mar 26, 2026

Copy link
Copy Markdown

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

🎯 Code Coverage (details)
Patch Coverage: 92.86%
Overall Coverage: 95.17% (-0.00%)

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

@ivoanjo

ivoanjo commented Mar 26, 2026

Copy link
Copy Markdown
Member Author

CI seems stuck, I force-pushed the same commit to re-trigger it

@ivoanjo

ivoanjo commented Mar 26, 2026

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Mar 26, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-03-26 15:18:33 UTC ℹ️ Start processing command /merge


2026-03-26 15:18:46 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-03-26 15:28:16 UTC ⚠️ MergeQueue: This merge request was unqueued

[email protected] unqueued this merge request

**What does this PR do?**

Turn profiler initialization errors into warning log messages, instead
of allowing them to propagate and impact the application.

**Motivation:**

libdatadog) were propagating up and impacting the application startup.
The profiler should gracefully disable itself when it runs into issues.

**Change log entry**

Yes. Profiler: Turn initialization errors into log messages.

**Additional Notes:**

N/A

**How to test the change?**

New spec added to `spec/datadog/profiling/component_spec.rb`.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@ivoanjo
ivoanjo force-pushed the ivoanjo/rescue-profiler-setup branch from 162427e to dfb0f94 Compare March 26, 2026 15:35
@pr-commenter

pr-commenter Bot commented Mar 26, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-03-26 16:02:16

Comparing candidate commit dfb0f94 in PR branch ivoanjo/rescue-profiler-setup with baseline commit 5889737 in branch master.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 0 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 ----------------------------------'

@ivoanjo
ivoanjo merged commit 5afb9be into master Mar 26, 2026
630 checks passed
@ivoanjo
ivoanjo deleted the ivoanjo/rescue-profiler-setup branch March 26, 2026 16:08
@github-actions github-actions Bot added this to the 2.31.0 milestone Mar 26, 2026
@y9v y9v mentioned this pull request Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mergequeue-status: removed profiling Involves Datadog profiling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants