chore(profiling): improve SSI behavior and error messages for profiling [backport 2.14]
Backport b74a97967c166c6ed3fe0308148306496cb7de09 from #10807 to 2.14.
We've discovered in some autoinject configurations profiling and crashtracking can fail to work because the packaging system over-writes libdd_wrapper.so with one from the wrong arch.
I'm setting a very wide backport range because this has significant implications (possibility of segmentation faults and service failures when erroneously loading protobuf in injected environments)
This patch
- Improves the error message when libdd_wrapper fails to load in profiling
- Disables profiling when such a condition is encountered in an injected environment
Checklist
- [x] PR author has checked that all the criteria below are met
- The PR description includes an overview of the change
- The PR description articulates the motivation for the change
- The change includes tests OR the PR description describes a testing strategy
- The PR description notes risks associated with the change, if any
- Newly-added code is easy to change
- The change follows the library release note guidelines
- The change includes or references documentation updates if necessary
- Backport labels are set (if applicable)
Reviewer Checklist
- [x] Reviewer has checked that all the criteria below are met
- Title is accurate
- All changes are related to the pull request's stated goal
- Avoids breaking API changes
- Testing strategy adequately addresses listed risks
- Newly-added code is easy to change
- Release note makes sense to a user of the library
- If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
- Backport labels are set in a manner that is consistent with the release branch maintenance policy
Benchmarks
Benchmark execution time: 2024-10-30 19:49:30
Comparing candidate commit bf46393b8080081d70a183ff28a011d3f8c95789 in PR branch backport-10807-to-2.14 with baseline commit 9a232b9050965e5ae0fede2fd8f02cb8765927f6 in branch 2.14.
Found 0 performance improvements and 0 performance regressions! Performance is the same for 356 metrics, 48 unstable metrics.
CODEOWNERS have been resolved as:
releasenotes/notes/profiling-fix-autoinject-failure-48cc7d9a18cd70b9.yaml @DataDog/apm-python
ddtrace/profiling/profiler.py @DataDog/profiling-python
/merge
:steam_locomotive: MergeQueue: waiting for PR to be ready
This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
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.
Use /merge -c to cancel this operation!
:warning: MergeQueue: This merge request was unqueued
This merge request was unqueued
If you need support, contact us on Slack #devflow!