Skip to content

Commit e48843f

Browse files
eugene-lumigoEugene Orlovsky
and
Eugene Orlovsky
authored
RD-13495 opentelemetry python contrib version (#870)
* Version 1.26.0/0.47b0 --------- Co-authored-by: Eugene Orlovsky <[email protected]>
1 parent 46a0e4a commit e48843f

File tree

27 files changed

+103
-1274
lines changed

27 files changed

+103
-1274
lines changed

.github/workflows/push-actions.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
strategy:
3535
fail-fast: false # Prevent a single failure in the matrix from stopping all other jobs
3636
matrix:
37-
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
37+
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
3838
integration-test-family: ${{ fromJson(needs.list-instrumentations.outputs.integration-tests) }}
3939
name: ${{ matrix.python-version }} ${{ matrix.integration-test-family }}
4040
steps:
@@ -52,7 +52,7 @@ jobs:
5252
strategy:
5353
fail-fast: false # Prevent a single failure in the matrix from stopping all other jobs
5454
matrix:
55-
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
55+
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
5656
name: Component Test for Python ${{ matrix.python-version }}
5757
steps:
5858
- uses: actions/checkout@v3

.github/workflows/version-testing.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
strategy:
1111
matrix:
1212
# If this key gets renamed, noxfile.py needs to be updated accordingly
13-
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
13+
python-version: [ '3.8', '3.9', '3.10', '3.11' ]
1414
name: test-untested-versions
1515
steps:
1616
- uses: actions/checkout@v3
@@ -26,7 +26,7 @@ jobs:
2626
- run: git --no-pager diff
2727
- run: mkdir versions_artifact
2828
- run: for path in `git diff --name-only`; do cp "$path" versions_artifact; done
29-
- uses: actions/upload-artifact@v2
29+
- uses: actions/upload-artifact@v4
3030
with:
3131
name: ${{ matrix.python-version }}
3232
path: versions_artifact
@@ -42,11 +42,6 @@ jobs:
4242
with:
4343
python-version: 3.7
4444
- run: mkdir versions_artifacts
45-
- uses: actions/download-artifact@v2
46-
continue-on-error: true # when there aren't changes the artifact won't be uploaded and this step will fail
47-
with:
48-
name: 3.7
49-
path: versions_artifacts/3.7
5045
- uses: actions/download-artifact@v2
5146
continue-on-error: true
5247
with:

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,16 @@ from opentelemetry.trace import get_current_span
212212
get_current_span().add_event('<error-message>', {'lumigo.type': '<error-type>'})
213213
```
214214

215+
## Python 3.7 Support
216+
217+
**Deprecation Notice:** As of version 1.0.156, support for Python 3.7 has been deprecated. The last version of the Lumigo OpenTelemetry Distro to support Python 3.7 is version 1.0.155.
218+
219+
For users on Python 3.7, we recommend upgrading to a newer version of Python to ensure continued compatibility and access to the latest features and improvements.
220+
221+
215222
## Supported runtimes
216223

217-
* cpython: 3.7.x, 3.8.x, 3.9.x, 3.10.x, 3.11.x
224+
* cpython: 3.8.x, 3.9.x, 3.10.x, 3.11.x
218225

219226
## Supported packages
220227

noxfile.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -481,10 +481,7 @@ def integration_tests_flask(session, flask_version):
481481

482482
# override the default Werkzeug version for flask v2 compatibility
483483
if flask_version.startswith("2."):
484-
if python == "3.7":
485-
session.install("werkzeug==2.2.3")
486-
else:
487-
session.install("werkzeug==2.3.7")
484+
session.install("werkzeug==2.3.7")
488485

489486
try:
490487
session.run(

scripts/init_tested_versions.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
PACKAGE_NAME="$1"
4-
SUPPORTED_VERSIONS=(3.7 3.8 3.9 3.10 3.11)
4+
SUPPORTED_VERSIONS=(3.8 3.9 3.10 3.11)
55

66
if [ -z "$PACKAGE_NAME" ]; then
77
echo "Usage: $0 <PACKAGE_NAME>"

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ classifiers =
1818
package_dir =
1919
= src
2020
packages = find:
21-
python_requires = >=3.7
21+
python_requires = >=3.8
2222

2323
[options.packages.find]
2424
where = src

setup.py

+20-20
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@
1717
"autowrapt>=1.0",
1818
"wrapt>=1.11.0",
1919
"lumigo_core==0.0.10",
20-
"opentelemetry-api==1.22.0",
21-
"opentelemetry-sdk==1.22.0",
22-
"opentelemetry-sdk-extension-aws==2.0.1",
23-
"opentelemetry-exporter-otlp-proto-http==1.22.0",
24-
"opentelemetry-semantic-conventions==0.43b0",
25-
"opentelemetry-instrumentation==0.43b0",
26-
"opentelemetry-instrumentation-asgi==0.43b0",
27-
"opentelemetry-instrumentation-boto==0.43b0",
28-
"opentelemetry-instrumentation-fastapi==0.43b0",
29-
"opentelemetry-instrumentation-flask==0.43b0",
30-
"opentelemetry-instrumentation-grpc==0.43b0",
31-
"opentelemetry-instrumentation-kafka-python==0.43b0",
32-
"opentelemetry-instrumentation-pika==0.43b0",
33-
"opentelemetry-instrumentation-psycopg2==0.43b0",
34-
"opentelemetry-instrumentation-pymongo==0.43b0",
35-
"opentelemetry-instrumentation-pymysql==0.43b0",
36-
"opentelemetry-instrumentation-requests==0.43b0",
37-
"opentelemetry-instrumentation-redis==0.43b0",
38-
"opentelemetry-instrumentation-django==0.43b0",
39-
"opentelemetry-instrumentation-logging==0.43b0",
20+
"opentelemetry-api==1.26.0",
21+
"opentelemetry-sdk==1.26.0",
22+
"opentelemetry-sdk-extension-aws==2.0.2",
23+
"opentelemetry-exporter-otlp-proto-http==1.26.0",
24+
"opentelemetry-semantic-conventions==0.47b0",
25+
"opentelemetry-instrumentation==0.47b0",
26+
"opentelemetry-instrumentation-asgi==0.47b0",
27+
"opentelemetry-instrumentation-boto==0.47b0",
28+
"opentelemetry-instrumentation-fastapi==0.47b0",
29+
"opentelemetry-instrumentation-flask==0.47b0",
30+
"opentelemetry-instrumentation-grpc==0.47b0",
31+
"opentelemetry-instrumentation-kafka-python==0.47b0",
32+
"opentelemetry-instrumentation-pika==0.47b0",
33+
"opentelemetry-instrumentation-psycopg2==0.47b0",
34+
"opentelemetry-instrumentation-pymongo==0.47b0",
35+
"opentelemetry-instrumentation-pymysql==0.47b0",
36+
"opentelemetry-instrumentation-requests==0.47b0",
37+
"opentelemetry-instrumentation-redis==0.47b0",
38+
"opentelemetry-instrumentation-django==0.47b0",
39+
"opentelemetry-instrumentation-logging==0.47b0",
4040
# v4.7.1 is the last version that supports python 3.7
4141
"typing_extensions==4.7.1; python_version<'3.8'",
4242
# v6.7.0 is the last version that supports python 3.7

src/lumigo_opentelemetry/__init__.py

+17
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,23 @@ def auto_load(_: Any) -> None:
7777

7878

7979
def init() -> Dict[str, Any]:
80+
"""Initialize the Lumigo OpenTelemetry distribution."""
81+
82+
try:
83+
python_version = sys.version_info
84+
# Check if the major version is 3 and the minor version is between 8 and 11
85+
if python_version.major != 3 or not (8 <= python_version.minor <= 11):
86+
logger.warning(
87+
f"Unsupported Python version {python_version.major}.{python_version.minor}; "
88+
"only Python 3.8 to 3.11 are supported."
89+
)
90+
return {}
91+
92+
except Exception as e: # Catch any issues with accessing sys.version_info
93+
# Log a warning if there is a failure in verifying the Python version
94+
logger.warning("Failed to verify the Python version due to: %s", str(e))
95+
return {}
96+
8097
if str(os.environ.get("LUMIGO_SWITCH_OFF", False)).lower() == "true":
8198
logger.info(
8299
"Lumigo OpenTelemetry distribution disabled via the 'LUMIGO_SWITCH_OFF' environment variable"

0 commit comments

Comments
 (0)