Skip to content

Conversation

github-actions[bot]
Copy link
Contributor

Backport 3fbe32f from #13649 to 3.10.

If a user runs their code as a "main module" which they installed like a
library (python -m my_program args...), and expicilty specifies that
it's the main package via DD_MAIN_PACKAGE, we should consider code from
that module "my code". Right now we don't, though, because we mark that
code as a "library" in the profiling code provenance info. Check
whether the user specified a main package and make sure it gets marked
as "my code" by leaving the kind blank.

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

If a user runs their code as a "main module" which they installed like a
library (`python -m my_program args...`), and expicilty specifies that
it's the main package via `DD_MAIN_PACKAGE`, we should consider code
from
that module "my code". Right now we don't, though, because we mark that
code as a "library" in the profiling code provenance info.  Check
whether the user specified a main package and make sure it gets marked
as "my code" by leaving the kind blank.

(cherry picked from commit 3fbe32f)
@github-actions github-actions bot requested review from a team as code owners July 16, 2025 13:35
@github-actions github-actions bot added the stale label Aug 24, 2025
Copy link
Contributor Author

This pull request has been automatically closed after a period of inactivity.
After this much time, it will likely be easier to open a new pull request with the
same changes than to update this one from the base branch. Please comment or reopen
if you think this pull request was closed in error.

@github-actions github-actions bot closed this Aug 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants