Skip to content

NH-79205 APM Python as Pure Python, OTLP HTTP by default #556

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

Merged
merged 224 commits into from
Apr 28, 2025
Merged

Conversation

jerrytfleung
Copy link
Contributor

@jerrytfleung jerrytfleung commented Mar 26, 2025

Updates APM Python to be a Pure Python library, where all signals export by OTLP HTTP by default.

This branch includes changes from 53 PRs that have each been tested.

Regular release and testing process will be followed after merging this into main.

List of all PRs
### Added

- Added ApmConfig mapping for pure Python sampler ([#552](https://github.com/solarwinds/apm-python/pull/552), [#589](https://github.com/solarwinds/apm-python/pull/589))
- Added pure Python transaction name pool ([#559](https://github.com/solarwinds/apm-python/pull/559))
- Added suppression of tracing when HTTP getSettings ([#560](https://github.com/solarwinds/apm-python/pull/560))
- Added resource detection for AWS, Azure, Kubernetes, UAMS written to resource attributes ([#577](https://github.com/solarwinds/apm-python/pull/577), [#596](https://github.com/solarwinds/apm-python/pull/596))
- Added internal deduction of export endpoint from SW_APM_COLLECTOR ([#590](https://github.com/solarwinds/apm-python/pull/590), [#602](https://github.com/solarwinds/apm-python/pull/602))

### Changed

- Updated custom transaction naming as pure Python ([#558](https://github.com/solarwinds/apm-python/pull/558))
- Simplified spankind check ([#561](https://github.com/solarwinds/apm-python/pull/561))
- Updated `http.route` assignment based on semconv ([#562](https://github.com/solarwinds/apm-python/pull/562))
- Updated to register NoOp provider if not exporting ([#566](https://github.com/solarwinds/apm-python/pull/566))
- Fixed counter metrics init ([#564](https://github.com/solarwinds/apm-python/pull/564))
- Refactored ResponseTime metrics and request counters ([#563](https://github.com/solarwinds/apm-python/pull/563), [#567](https://github.com/solarwinds/apm-python/pull/567), [#568](https://github.com/solarwinds/apm-python/pull/568))
- Fixed transaction name environment config support ([#569](https://github.com/solarwinds/apm-python/pull/569))
- Breaking: changed SolarWindsSpan Exporter to no-op for future removal ([#572](https://github.com/solarwinds/apm-python/pull/572))
- Redesigned custom Configurator ([#578](https://github.com/solarwinds/apm-python/pull/578), [#581](https://github.com/solarwinds/apm-python/pull/581))
- Updated `solarwinds_ready` API function for pure Python ([#582](https://github.com/solarwinds/apm-python/pull/582), [#584](https://github.com/solarwinds/apm-python/pull/584), [#599](https://github.com/solarwinds/apm-python/pull/599))
- Breaking: Changed default export protocol to OTLP HTTP for all signals ([#580](https://github.com/solarwinds/apm-python/pull/580))
- Updated Lambda dependencies and builds for resource detection ([#593](https://github.com/solarwinds/apm-python/pull/593))
- Fixed Configurator exporter loading to prevent ImportError ([#592](https://github.com/solarwinds/apm-python/pull/592))
- Updated smoke tests / verify_install for pure Python ([#595](https://github.com/solarwinds/apm-python/pull/595))
- Updated PyPI sdist, wheel publishes in pure Python ([#597](https://github.com/solarwinds/apm-python/pull/597))
- Breaking: Unified AWS Lambda builds for pure Python without architecture in layer name ([#594](https://github.com/solarwinds/apm-python/pull/594))
- Update autoinstrumentation-python image builds for pure Python, beta testing ([#598](https://github.com/solarwinds/apm-python/pull/598))
- Updated default OTel export header assignment for SWO vs other ([#601](https://github.com/solarwinds/apm-python/pull/601))
- Fixed HttpSampler warning message ([#604](https://github.com/solarwinds/apm-python/pull/604))
- Breaking: Updated local development setup for pure Python ([#603](https://github.com/solarwinds/apm-python/pull/603))
- Fixed `sw.w3c.tracestate` attribute assignment ([#606](https://github.com/solarwinds/apm-python/pull/606))
- Updated integration tests ([#605](https://github.com/solarwinds/apm-python/pull/605))
- Updated units, descriptions of APM counters ([#608](https://github.com/solarwinds/apm-python/pull/608))
- Updated sampler init ([#609](https://github.com/solarwinds/apm-python/pull/609))
- Updated `SW_APM_LOG_FILEPATH` support for Pure Python ([#613](https://github.com/solarwinds/apm-python/pull/613))
- Fixed tracestate KV deletion ([#617](https://github.com/solarwinds/apm-python/pull/617))

### Removed

- Breaking: removed c-lib extension and legacy components ([#549](https://github.com/solarwinds/apm-python/pull/549), [#612](https://github.com/solarwinds/apm-python/pull/612), [#614](https://github.com/solarwinds/apm-python/pull/614))
- Removed discontinued OboeAPI ([#565](https://github.com/solarwinds/apm-python/pull/565))
- Removed legacy configuration logic ([#570](https://github.com/solarwinds/apm-python/pull/570), [#571](https://github.com/solarwinds/apm-python/pull/571), [#583](https://github.com/solarwinds/apm-python/pull/583))
- Removed discontinued grpcio-using dependencies from Lambda builds ([#591](https://github.com/solarwinds/apm-python/pull/591))
- Removed warning log for Lambda mode ([#600](https://github.com/solarwinds/apm-python/pull/600))
- Removed unnecessary tests ([#611](https://github.com/solarwinds/apm-python/pull/611), [#610](https://github.com/solarwinds/apm-python/pull/610), [#615](https://github.com/solarwinds/apm-python/pull/615))
- Removed setup.py usage for builds ([#616](https://github.com/solarwinds/apm-python/pull/616))

jerrytfleung and others added 30 commits March 20, 2025 16:55
…ect otlp) (#549)

* Set a baseline for pure python implementation

* Update solarwinds_apm/api/__init__.py

Co-authored-by: Tammy Baylis <[email protected]>

* Update solarwinds_apm/configurator.py

Co-authored-by: Tammy Baylis <[email protected]>

* Update solarwinds_apm/exporter.py

Co-authored-by: Tammy Baylis <[email protected]>

---------

Co-authored-by: Tammy Baylis <[email protected]>
* NH-104997 - Python: apm-config to Sampler Configuration mapping
…sor-redesign branch (#559)

* Added Transaction Name calculation logic

---------

Co-authored-by: tammy-baylis-swi <[email protected]>
Co-authored-by: Tammy Baylis <[email protected]>
…tsettings

NH-106059 Suppress tracing when HTTP getsettings
tammy-baylis-swi and others added 18 commits April 25, 2025 09:32
…ms-only

NH-104999 Remove unnecessary param at Pure Python sampler init
…lambda

NH-103814 Don't load LambdaDetector when outside lambda
…ler-tests

NH-104999 Remove legacy sampler tests
NH-108464 Add logFilepath support for Pure Python
NH-104999 Fully remove extension from linting, builds
NH-104999 Remove dead ApmConfig test fixtures
NH-23784 NH-104999 Build sdist without setup.py; use build for sdist
…state-handling

NH-108869 Update sampler tracestate handling
@tammy-baylis-swi tammy-baylis-swi changed the title [WIP] Pure python for reference; Don't merge NH-79205 APM Python as Pure Python, OTLP HTTP by default Apr 28, 2025
@tammy-baylis-swi tammy-baylis-swi marked this pull request as ready for review April 28, 2025 19:28
@tammy-baylis-swi tammy-baylis-swi requested a review from a team as a code owner April 28, 2025 19:28
tammy-baylis-swi and others added 5 commits April 28, 2025 14:22
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link
Contributor

@tammy-baylis-swi tammy-baylis-swi left a comment

Choose a reason for hiding this comment

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

I huddled with @jerrytfleung to review all files. Looks good to us!

Copy link
Contributor Author

@jerrytfleung jerrytfleung left a comment

Choose a reason for hiding this comment

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

Walked through with @tammy-baylis-swi in a huddle. Looking good to us.

@jerrytfleung jerrytfleung merged commit 3226053 into main Apr 28, 2025
12 checks passed
@jerrytfleung jerrytfleung deleted the pure-python branch April 28, 2025 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants