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

fix(profiling): default to libdatadog if autoinject/SSI is enabled [backport 2.7] #8834

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Apr 2, 2024

Backport 1c1f54a from #8822 to 2.7.

In injected configurations, the Profiler can cause deployed (bundled? stashed?) dependencies to over-ride the dependencies of the underlying application. This is especially problematic for the protobuf library.

This PR changes several things

  • Introduces a new "required" option to the libdatadog (libdd) collector/exporter. Normally, if the user merely enables libdatadog, the profiler will make a best effort at using it, but fallback to the old collector/exporter if needed. When libdatadog is required, profiling will be disabled if libdatadog cannot be used.
  • Has lib-inection set libdatadog to "required"

Checklist

  • Change(s) are motivated and described in the PR description
  • Testing strategy is described if automated tests are not included in the PR
  • Risks are described (performance impact, potential for breakage, maintainability)
  • Change is maintainable (easy to change, telemetry, documentation)
  • Library release note guidelines are followed or label changelog/no-changelog is set
  • Documentation is included (in-code, generated user docs, public corp docs)
  • Backport labels are set (if applicable)
  • If this PR changes the public interface, I've notified @DataDog/apm-tees.
  • If change touches code that signs or publishes builds or packages, or handles credentials of any kind, I've requested a review from @DataDog/security-design-and-guidance.

Reviewer Checklist

  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Description motivates each change
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Change is maintainable (easy to change, telemetry, documentation)
  • Release note makes sense to a user of the library
  • 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

…8822)

In injected configurations, the Profiler can cause deployed (bundled?
stashed?) dependencies to over-ride the dependencies of the underlying
application. This is especially problematic for the `protobuf` library.

This PR changes several things
* Introduces a new "required" option to the libdatadog (libdd)
collector/exporter. Normally, if the user merely enables libdatadog, the
profiler will make a best effort at using it, but fallback to the old
collector/exporter if needed. When libdatadog is required, profiling
will be disabled if libdatadog cannot be used.
* Has lib-inection set libdatadog to "required"

## Checklist

- [X] Change(s) are motivated and described in the PR description
- [X] Testing strategy is described if automated tests are not included
in the PR
- [X] Risks are described (performance impact, potential for breakage,
maintainability)
- [X] Change is maintainable (easy to change, telemetry, documentation)
- [X] [Library release note
guidelines](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
are followed or label `changelog/no-changelog` is set
- [X] Documentation is included (in-code, generated user docs, [public
corp docs](https://github.com/DataDog/documentation/))
- [X] Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))
- [x] If this PR changes the public interface, I've notified
`@DataDog/apm-tees`.
- [X] If change touches code that signs or publishes builds or packages,
or handles credentials of any kind, I've requested a review from
`@DataDog/security-design-and-guidance`.

## Reviewer Checklist

- [x] Title is accurate
- [x] All changes are related to the pull request's stated goal
- [x] Description motivates each change
- [x] Avoids breaking
[API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
changes
- [x] Testing strategy adequately addresses listed risks
- [x] Change is maintainable (easy to change, telemetry, documentation)
- [x] Release note makes sense to a user of the library
- [x] Author has acknowledged and discussed the performance implications
of this PR as reported in the benchmarks PR comment
- [x] Backport labels are set in a manner that is consistent with the
[release branch maintenance
policy](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: sanchda <sanchda@users.noreply.github.com>
Co-authored-by: Gabriele N. Tornetta <P403n1x87@users.noreply.github.com>
Co-authored-by: Emmett Butler <723615+emmettbutler@users.noreply.github.com>
(cherry picked from commit 1c1f54a)
@github-actions github-actions bot requested review from a team as code owners April 2, 2024 19:17
@emmettbutler emmettbutler enabled auto-merge (squash) April 2, 2024 19:18
@datadog-dd-trace-py-rkomorn
Copy link

Datadog Report

Branch report: backport-8822-to-2.7
Commit report: a8759e4
Test service: dd-trace-py

✅ 0 Failed, 384 Passed, 672 Skipped, 24m 54.69s Total duration (59m 13.4s time saved)

auto-merge was automatically disabled April 2, 2024 19:38

Pull request was closed

@emmettbutler emmettbutler reopened this Apr 2, 2024
@emmettbutler emmettbutler enabled auto-merge (squash) April 2, 2024 19:56
@emmettbutler emmettbutler merged commit 9b95258 into 2.7 Apr 2, 2024
64 of 65 checks passed
@emmettbutler emmettbutler deleted the backport-8822-to-2.7 branch April 2, 2024 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants