NH-135284 Upgrade APM to OTel Python 1.42.1/0.63b1#778
Conversation
Bumps the otel-dependencies group with 1 update in the /lambda/tests directory: [opentelemetry-instrumentation-aws-lambda](https://github.com/open-telemetry/opentelemetry-python-contrib). Updates `opentelemetry-instrumentation-aws-lambda` from 0.62b1 to 0.63b1 - [Release notes](https://github.com/open-telemetry/opentelemetry-python-contrib/releases) - [Changelog](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/CHANGELOG.md) - [Commits](https://github.com/open-telemetry/opentelemetry-python-contrib/commits) --- updated-dependencies: - dependency-name: opentelemetry-instrumentation-aws-lambda dependency-version: 0.63b1 dependency-type: direct:production dependency-group: otel-dependencies ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
1f9ae94 to
a984ce6
Compare
9402b46 to
c332c0e
Compare
1b69c3e to
4275c38
Compare
| if isinstance( | ||
| tracer_provider.sampler, | ||
| (ParentBasedSwSampler, HttpSampler, JsonSampler), | ||
| ParentBasedSwSampler | HttpSampler | JsonSampler, |
There was a problem hiding this comment.
Newer python version ruff wanted this modernized.
| new_span_id = traceparent_re_result.group(3) | ||
| assert new_span_id is not None | ||
| new_trace_flags = traceparent_re_result.group(4) | ||
| assert new_trace_flags == "01" |
There was a problem hiding this comment.
The assert_trace_flags_(un)sampled asserts below these should be sufficient.
There was a problem hiding this comment.
Pull request overview
Upgrades the solarwinds-apm distribution to OpenTelemetry Python 1.42.1 / contrib 0.63b1, aligning the project’s runtime/tooling and install-test coverage with the updated OpenTelemetry stack and the stated drop of Python 3.9.
Changes:
- Bumped OpenTelemetry API/SDK/exporter/instrumentation dependency pins across packaging and images; updated minimum supported Python to
>=3.10. - Adjusted CI/install-test matrix and Docker-based install-test setup to remove Python 3.9 coverage and add Amazon Linux 2 Python 3.10 coverage.
- Updated integration tests to validate traceflags via sampled/not-sampled semantics (allowing the newer supported flag values), rather than hard-coding
00/01.
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration/test_xtraceoptions_validation.py | Relaxes strict traceflags assertion; relies on sampled/not-sampled validation. |
| tests/integration/test_unsigned_tt.py | Removes fixed 00/01 assertions to allow expanded traceflags behavior. |
| tests/integration/test_signed_tt.py | Same as above for signed trigger-trace scenarios. |
| tests/integration/test_scenario_8.py | Allows traceflags beyond 00/01 by using helper assertions. |
| tests/integration/test_scenario_1.py | Same adjustment for scenario 1. |
| tests/docker/install/README.md | Updates local install-test instructions to match new OS/Python coverage. |
| tests/docker/install/docker-compose.yml | Removes py3.9 services; adds Amazon Linux 2 py3.10 services; keeps matrix for 3.10–3.13. |
| tests/docker/install/_helper_run_install_tests.sh | Updates OS/Python detection and Amazon Linux dependency installation logic. |
| solarwinds_apm/api/init.py | Uses Python 3.10+ union syntax for sampler type checking. |
| pyproject.toml | Drops Python 3.9 support and bumps OTel dependency pins. |
| Makefile | Updates build/test commands and manylinux wheel pathing to Python 3.10. |
| lambda/tests/requirements.txt | Bumps OTel lambda instrumentation pin. |
| lambda/requirements.txt | Bumps OTel SDK/exporter/instrumentation pins used for Lambda layer packaging. |
| lambda/requirements-nodeps.txt | Bumps OTel “nodeps” pins for Lambda packaging. |
| image/requirements.txt | Bumps OTel dependency pins used for the auto-instrumentation image. |
| image/Dockerfile-beta | Switches build stages from Python 3.9 to 3.10 for beta image build. |
| image/Dockerfile | Switches build stages from Python 3.9 to 3.10 for main image build. |
| docker-compose.yml | Updates manylinux dev container bootstrap to use Python 3.10. |
| dev-requirements.txt | Bumps OTel test/instrumentation pins; updates Flask environment markers. |
| .github/workflows/verify_install.yaml | Updates Linux install-test matrix (drop py3.9; add dedicated Amazon2 py3.10 coverage). |
| .github/workflows/verify_install_windows.yaml | Drops Windows install testing on Python 3.9. |
| .github/workflows/verify_install_macos.yaml | Drops macOS install testing on Python 3.9. |
| .github/workflows/run_tox_tests.yaml | Drops Python 3.9 from tox test matrix. |
| .github/workflows/run_tox_ruff_format.yaml | Drops Python 3.9 from ruff/format workflow matrix. |
| .github/workflows/run_tox_lint_format.yaml | Drops Python 3.9 from lint/format workflow matrix. |
| .github/workflows/build_publish_lambda_layer.yaml | Drops Python 3.9 from Lambda layer build/publish matrix and runtime list. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…`sh` (#779) * Initial plan * Fix install helper to use POSIX shell conditionals --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
cheempz
left a comment
There was a problem hiding this comment.
LGTM with a couple nits ;)
Thanks @cheempz ! Addressed, please have another look |
cheempz
left a comment
There was a problem hiding this comment.
LGTM, thanks for the revisit!
Upgrades APM to OTel Python 1.42.1/0.63b1. This:
otel.sdk.*metrics into an opt-in feature withOTEL_PYTHON_SDK_METRIC_ENABLED(was always-on before)00,01,02,03(latter is "sampled + random")Note we're skipping the minor version 1.42.0/0.63b0 bump.
What else is going on here:
The Amazon 2023 "Python 3.10" verify-install test was actually using py3.9 before. To maintain some coverage it's now an Amazon 2 py3.10 test with a dedicated workflow job "install-tests-amazon2" in order to get over glibc compatibility issues with Amazon 2.
Also drop CentOS 8 support entirely since EOL Dec 31 2021 -- it was an artifact for py3.9 coverage.