Skip to content

Conversation

@mabdinur
Copy link
Contributor

@mabdinur mabdinur commented Apr 22, 2025

  • Ensure config._lib_was_injected is set to True when SSI is successful. Currently this configuration is always set to False even when SSI is successful.
  • Use DD_INJECTION_ENABLED to track whether SSI was attempted. This env_var is set by the injector and is used by other SDKs.

Checklist

  • 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

  • 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

@mabdinur mabdinur requested a review from bm1549 April 22, 2025 02:16
@github-actions
Copy link
Contributor

github-actions bot commented Apr 22, 2025

CODEOWNERS have been resolved as:

ddtrace/bootstrap/sitecustomize.py                                      @DataDog/apm-core-python
ddtrace/settings/_config.py                                             @DataDog/apm-core-python
lib-injection/sources/sitecustomize.py                                  @DataDog/apm-core-python
tests/telemetry/test_writer.py                                          @DataDog/apm-python

@github-actions
Copy link
Contributor

github-actions bot commented Apr 22, 2025

Bootstrap import analysis

Comparison of import times between this PR and base.

Summary

The average import time from this PR is: 232 ± 3 ms.

The average import time from base is: 234 ± 2 ms.

The import time difference between this PR and base is: -2.1 ± 0.1 ms.

Import time breakdown

The following import paths have shrunk:

ddtrace.auto 1.949 ms (0.84%)
ddtrace.bootstrap.sitecustomize 1.278 ms (0.55%)
ddtrace.bootstrap.preload 1.278 ms (0.55%)
ddtrace.internal.products 1.278 ms (0.55%)
ddtrace.internal.remoteconfig.client 0.628 ms (0.27%)
ddtrace 0.671 ms (0.29%)

@pr-commenter
Copy link

pr-commenter bot commented Apr 22, 2025

Benchmarks

Benchmark execution time: 2025-05-02 18:12:17

Comparing candidate commit 399e407 in PR branch munir/track-injection-configs with baseline commit 8fe0cfa in branch main.

Found 0 performance improvements and 4 performance regressions! Performance is the same for 503 metrics, 5 unstable metrics.

scenario:iast_aspects-ljust_aspect

  • 🟥 execution_time [+1.159µs; +1.329µs] or [+8.841%; +10.133%]

scenario:iast_aspects-ospathnormcase_aspect

  • 🟥 execution_time [+425.703ns; +477.172ns] or [+12.494%; +14.004%]

scenario:iast_aspects-ospathsplitdrive_aspect

  • 🟥 execution_time [+517.652ns; +593.754ns] or [+14.416%; +16.535%]

scenario:iast_aspects-upper_aspect

  • 🟥 execution_time [+171.555ns; +238.967ns] or [+7.487%; +10.429%]

@mabdinur mabdinur marked this pull request as ready for review April 23, 2025 16:28
@mabdinur mabdinur requested review from a team as code owners April 23, 2025 16:28
@mabdinur mabdinur requested review from emmettbutler and lievan April 23, 2025 16:28
@mabdinur mabdinur enabled auto-merge (squash) April 23, 2025 16:28
Copy link
Contributor

@bm1549 bm1549 left a comment

Choose a reason for hiding this comment

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

LGTM, pending discussion on the doc

@mabdinur mabdinur force-pushed the munir/track-injection-configs branch from 6ec00e5 to d825e4a Compare April 30, 2025 18:50
@mabdinur mabdinur force-pushed the munir/track-injection-configs branch from b9039bc to bd8ca4e Compare April 30, 2025 19:59
@mabdinur
Copy link
Contributor Author

mabdinur commented May 1, 2025

@mabdinur mabdinur added the changelog/no-changelog A changelog entry is not required for this PR. label May 2, 2025
@mabdinur mabdinur merged commit 85e6e9f into main May 2, 2025
697 checks passed
@mabdinur mabdinur deleted the munir/track-injection-configs branch May 2, 2025 19:56
brettlangdon pushed a commit that referenced this pull request May 6, 2025
- Ensure `config._lib_was_injected` is set to `True` when SSI is
successful. Currently this configuration is always set to `False` even
when SSI is successful.
- Use `DD_INJECTION_ENABLED` to track whether SSI was attempted. This
env_var is set by the injector and is used by other SDKs.

## Checklist
- [ ] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [ ] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/no-changelog A changelog entry is not required for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants