api: conditionally load entrypoints for OTEL_PYTHON_CONTEXT (#5144)
* api: conditionally load entrypoints for OTEL_PYTHON_CONTEXT This prevents unnecessarily importing the entry points library, reducing the memory footprint of loading the API by about a MB (27%): |Scenario | Memory before | Memory after | delta | | - | - | - | - | |Import API only | 5.43 MB | 4.49 MB | -940 KB | |API + get_tracer (no-op) | 5.05 MB | 4.10 MB | -950 KB | Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * add ignore rule to import lint, update changelog Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * fix precommit Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * clean up changelog Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * use changelog fragment Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * apply the same pattern to propagators and providers Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * precommit Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * put public symbols back Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> * rename vars Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> --------- Signed-off-by: Alex Boten <223565+codeboten@users.noreply.github.com> Co-authored-by: Mike Goldsmith <goldsmith.mike@gmail.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
A
Alex Boten committed
c2b11f67b895a8b4cc3c8d4cf64703b592defaeb
Parent: 05ee71b
Committed by GitHub <noreply@github.com>
on 5/21/2026, 6:12:14 PM