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): show lock init location and hide internal frame (#9692) [backport-2.10] #10063

Merged
merged 2 commits into from
Aug 6, 2024

Conversation

taegyunkim
Copy link
Contributor

Manual backport of #9692 to 2.10

Screenshot 2024-07-01 at 9 32 45 PM
  • Lock Name shows the line number of where acquire/release/__enter__/__exit__ was called, which is duplicated in the Call Stack
  • Call Stack shows a frame for Profiler internal function, __enter__
Screenshot 2024-07-01 at 9 27 35 PM
  • Lock Name shows the line number where the lock was initialized.
  • Call Stack shows user codes only.

This actually reverts some of the changes I made in #9615, but I believe this PR makes everything clearer.

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.

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

(cherry picked from commit 97969ee)

<img width="595" alt="Screenshot 2024-07-01 at 9 32 45 PM"
src="https://github.com/DataDog/dd-trace-py/assets/6655247/aa7cf96e-db56-4771-9517-b0fcdd8ccc0f">

- Lock Name shows the line number of where
`acquire/release/__enter__/__exit__` was called, which is duplicated in
the Call Stack
- Call Stack shows a frame for Profiler internal function,
[\_\_enter\_\_](https://github.com/DataDog/dd-trace-py/blob/42ccea9b13e232bcce4a1d20b9d11eda7904226d/ddtrace/profiling/collector/_lock.py#L235)

<img width="600" alt="Screenshot 2024-07-01 at 9 27 35 PM"
src="https://github.com/DataDog/dd-trace-py/assets/6655247/2c360183-c25f-4ea2-963f-c4df1453225d">

- Lock Name shows the line number where the lock was initialized.
- Call Stack shows user codes only.

This actually reverts some of the changes I made in
#9615, but I believe this PR
makes everything clearer.

- [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] 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)

(cherry picked from commit 97969ee)
@taegyunkim taegyunkim requested review from a team as code owners August 2, 2024 19:00
@taegyunkim taegyunkim closed this Aug 2, 2024
@taegyunkim taegyunkim reopened this Aug 2, 2024
@taegyunkim taegyunkim enabled auto-merge (squash) August 2, 2024 19:01
@taegyunkim taegyunkim changed the title fix(profiling): show lock init location and hide internal frame (#9692) fix(profiling): show lock init location and hide internal frame (#9692) [backport-2.10] Aug 2, 2024
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Aug 2, 2024

Datadog Report

Branch report: backport-9692-to-2.10
Commit report: 097d941
Test service: dd-trace-py

✅ 0 Failed, 573 Passed, 525 Skipped, 51m 30.52s Total duration (32m 11.82s time saved)

@pr-commenter
Copy link

pr-commenter bot commented Aug 2, 2024

Benchmarks

Benchmark execution time: 2024-08-02 19:44:01

Comparing candidate commit 143b56c in PR branch backport-9692-to-2.10 with baseline commit 337a2d5 in branch 2.10.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 221 metrics, 9 unstable metrics.

@taegyunkim taegyunkim closed this Aug 2, 2024
auto-merge was automatically disabled August 2, 2024 19:59

Pull request was closed

@taegyunkim taegyunkim reopened this Aug 6, 2024
@taegyunkim taegyunkim merged commit 016beab into 2.10 Aug 6, 2024
73 of 74 checks passed
@taegyunkim taegyunkim deleted the backport-9692-to-2.10 branch August 6, 2024 00:46
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.

2 participants