mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-25 11:03:58 +08:00
Chore: Drop support for Python 3.8 (#3399)
Python 3.8 was EoL @ 2024-10-07, our 6 month promise for support ended on 2024-04-07. Changes: * Updated basline refs to 3.9 * Removed 3.8 sys.version_info checks * Fixed botocore test failure * Applied ruff formatting
This commit is contained in:
2
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@ -18,7 +18,7 @@ body:
|
||||
Please describe any aspect of your environment relevant to the problem, including your Python version, [platform](https://docs.python.org/3/library/platform.html), version numbers of installed dependencies, information about your cloud hosting provider, etc. If you're reporting a problem with a specific version of a library in this repo, please check whether the problem has been fixed on main.
|
||||
value: |
|
||||
OS: (e.g, Ubuntu)
|
||||
Python version: (e.g., Python 3.8.10)
|
||||
Python version: (e.g., Python 3.9.10)
|
||||
Package version: (e.g., 0.46.0)
|
||||
|
||||
- type: textarea
|
||||
|
806
.github/workflows/core_contrib_test_0.yml
vendored
806
.github/workflows/core_contrib_test_0.yml
vendored
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ name = "generate-workflows-lib"
|
||||
dynamic = ["version"]
|
||||
description = "A library to generate workflows"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -17,7 +17,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -14,7 +14,7 @@ _tox_test_env_regex = re_compile(
|
||||
)
|
||||
_tox_lint_env_regex = re_compile(r"lint-(?P<name>[-\w]+)")
|
||||
_tox_contrib_env_regex = re_compile(
|
||||
r"py38-test-(?P<name>[-\w]+\w)-?(?P<contrib_requirements>\d+)?"
|
||||
r"py39-test-(?P<name>[-\w]+\w)-?(?P<contrib_requirements>\d+)?"
|
||||
)
|
||||
|
||||
|
||||
@ -47,8 +47,8 @@ def get_test_job_datas(tox_envs: list, operating_systems: list) -> list:
|
||||
os_alias = {"ubuntu-latest": "Ubuntu", "windows-latest": "Windows"}
|
||||
|
||||
python_version_alias = {
|
||||
"pypy3": "pypy-3.8",
|
||||
"py38": "3.8",
|
||||
"pypy3": "pypy-3.9",
|
||||
"pypy310": "pypy-3.10",
|
||||
"py39": "3.9",
|
||||
"py310": "3.10",
|
||||
"py311": "3.11",
|
||||
|
@ -32,10 +32,10 @@ jobs:
|
||||
repository: open-telemetry/opentelemetry-python-contrib
|
||||
ref: ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}
|
||||
|
||||
- name: Set up Python 3.8
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.8"
|
||||
python-version: "3.9"
|
||||
architecture: "x64"
|
||||
|
||||
- name: Install tox
|
||||
|
2
.github/workflows/package-release.yml
vendored
2
.github/workflows/package-release.yml
vendored
@ -78,7 +78,7 @@ jobs:
|
||||
# next few steps publish to pypi
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Build wheels
|
||||
run: ./scripts/build_a_package.sh
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -66,7 +66,7 @@ jobs:
|
||||
# next few steps publish to pypi
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: '3.9'
|
||||
|
||||
- name: Build wheels
|
||||
run: ./scripts/build.sh
|
||||
|
1580
.github/workflows/test_0.yml
vendored
1580
.github/workflows/test_0.yml
vendored
File diff suppressed because it is too large
Load Diff
2960
.github/workflows/test_1.yml
vendored
2960
.github/workflows/test_1.yml
vendored
File diff suppressed because it is too large
Load Diff
1859
.github/workflows/test_2.yml
vendored
1859
.github/workflows/test_2.yml
vendored
File diff suppressed because it is too large
Load Diff
@ -46,7 +46,7 @@ suggestion-mode=yes
|
||||
unsafe-load-any-extension=no
|
||||
|
||||
# Run python dependant checks considering the baseline version
|
||||
py-version=3.8
|
||||
py-version=3.9
|
||||
|
||||
|
||||
[MESSAGES CONTROL]
|
||||
|
@ -45,6 +45,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- `opentelemetry-instrumentation-fastapi`: Drop support for FastAPI versions earlier than `0.92`
|
||||
([#3012](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3012))
|
||||
|
||||
### Deprecated
|
||||
|
||||
- Drop support for Python 3.8, bump baseline to Python 3.9.
|
||||
([#3399](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3399))
|
||||
|
||||
## Version 1.33.0/0.54b0 (2025-05-09)
|
||||
|
||||
### Added
|
||||
@ -97,7 +102,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- `opentelemetry-instrumentation-aiokafka` Fix send_and_wait method no headers kwargs error.
|
||||
([[#3332](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/3332)])
|
||||
|
||||
|
||||
## Version 1.31.0/0.52b0 (2025-03-12)
|
||||
|
||||
### Added
|
||||
|
@ -12,7 +12,7 @@ dynamic = ["version"]
|
||||
description = "<REPLACE ME>"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -22,7 +22,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -1,4 +1,4 @@
|
||||
FROM python:3.8
|
||||
FROM python:3.9
|
||||
|
||||
RUN apt-get update -y && apt-get install libsnappy-dev -y
|
||||
|
||||
|
@ -9,7 +9,7 @@ dynamic = ["version"]
|
||||
description = "Prometheus Remote Write Metrics Exporter for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -19,7 +19,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -1,9 +1,7 @@
|
||||
asgiref==3.8.1
|
||||
certifi==2024.7.4
|
||||
charset-normalizer==3.3.2
|
||||
# We can drop this after bumping baseline to pypy-39
|
||||
cramjam==2.8.0; platform_python_implementation == "PyPy"
|
||||
cramjam==2.8.4; platform_python_implementation != "PyPy"
|
||||
cramjam==2.8.4
|
||||
Deprecated==1.2.14
|
||||
idna==3.7
|
||||
iniconfig==2.0.0
|
||||
|
@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
import unittest
|
||||
from platform import python_implementation
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
@ -283,10 +282,6 @@ class TestValidation(unittest.TestCase):
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
python_implementation() == "PyPy",
|
||||
reason="Fails with pypy 3.8, bump cramjam when 3.9 is baseline",
|
||||
)
|
||||
# Ensures export is successful with valid export_records and config
|
||||
@patch("requests.post")
|
||||
def test_valid_export(mock_post, prom_rw, metric):
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Rich Console Exporter for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -22,7 +22,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Official OpenAI instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Official VertexAI instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Aio-pika instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry aiohttp client instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Aiohttp server instrumentation for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io"}
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry aiokafka instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry aiopg instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "ASGI instrumentation for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Async Click instrumentation for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry instrumentation for asyncio"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -204,10 +204,6 @@ class AsyncioInstrumentor(BaseInstrumentor):
|
||||
_wrap(asyncio, "gather", wrap_coros_or_futures)
|
||||
|
||||
def instrument_to_thread(self) -> None:
|
||||
# to_thread was added in Python 3.9
|
||||
if sys.version_info < (3, 9):
|
||||
return
|
||||
|
||||
def wrap_to_thread(method, instance, args, kwargs) -> None:
|
||||
if args:
|
||||
first_arg = args[0]
|
||||
@ -387,9 +383,6 @@ def uninstrument_taskgroup_create_task() -> None:
|
||||
|
||||
|
||||
def uninstrument_to_thread() -> None:
|
||||
# to_thread was added in Python 3.9
|
||||
if sys.version_info < (3, 9):
|
||||
return
|
||||
unwrap(asyncio, "to_thread")
|
||||
|
||||
|
||||
|
@ -13,8 +13,6 @@
|
||||
# limitations under the License.
|
||||
import asyncio
|
||||
import functools
|
||||
import sys
|
||||
from unittest import skipIf
|
||||
from unittest.mock import patch
|
||||
|
||||
# pylint: disable=no-name-in-module
|
||||
@ -42,9 +40,6 @@ class TestAsyncioToThread(TestBase):
|
||||
super().tearDown()
|
||||
AsyncioInstrumentor().uninstrument()
|
||||
|
||||
@skipIf(
|
||||
sys.version_info < (3, 9), "to_thread is only available in Python 3.9+"
|
||||
)
|
||||
def test_to_thread(self):
|
||||
def multiply(x, y):
|
||||
return x * y
|
||||
@ -74,9 +69,6 @@ class TestAsyncioToThread(TestBase):
|
||||
self.assertEqual(point.attributes["type"], "to_thread")
|
||||
self.assertEqual(point.attributes["name"], "multiply")
|
||||
|
||||
@skipIf(
|
||||
sys.version_info < (3, 9), "to_thread is only available in Python 3.9+"
|
||||
)
|
||||
def test_to_thread_partial_func(self):
|
||||
def multiply(x, y):
|
||||
return x * y
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry instrumentation for AsyncPG"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry AWS Lambda instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Boto instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Boto3 SQS service tracing for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Botocore instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -114,7 +114,7 @@ class TestLambdaExtension(TestBase):
|
||||
|
||||
self.client.create_function(
|
||||
FunctionName=function_name,
|
||||
Runtime="python3.8",
|
||||
Runtime="python3.9",
|
||||
Role=role_arn,
|
||||
Handler="lambda_function.lambda_handler",
|
||||
Code={
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Cassandra instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Celery Instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Click instrumentation for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Confluent Kafka instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Database API instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Instrumentation for Django"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry elasticsearch instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Falcon instrumentation for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry FastAPI Instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Flask instrumentation for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry gRPC instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -710,9 +710,10 @@ class TestOpenTelemetryServerInterceptorUnix(
|
||||
|
||||
@contextlib.contextmanager
|
||||
def server(self, max_workers=1, interceptors=None):
|
||||
with futures.ThreadPoolExecutor(
|
||||
max_workers=max_workers
|
||||
) as executor, tempfile.TemporaryDirectory() as tmp:
|
||||
with (
|
||||
futures.ThreadPoolExecutor(max_workers=max_workers) as executor,
|
||||
tempfile.TemporaryDirectory() as tmp,
|
||||
):
|
||||
server = grpc.server(
|
||||
executor,
|
||||
options=(("grpc.so_reuseport", 0),),
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry HTTPX Instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry jinja2 instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Kafka-Python instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Logging instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry MySQL instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry mysqlclient instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -132,12 +132,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -172,12 +175,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -213,12 +219,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -258,12 +267,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
cnx_proxy = MySQLClientInstrumentor().instrument_connection(
|
||||
mock_connection,
|
||||
@ -312,12 +324,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument(
|
||||
enable_commenter=True,
|
||||
@ -353,12 +368,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument(
|
||||
enable_commenter=True,
|
||||
@ -395,12 +413,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument(
|
||||
enable_commenter=True,
|
||||
@ -441,12 +462,15 @@ class TestMySQLClientIntegration(TestBase):
|
||||
mock_connection = mock.MagicMock()
|
||||
mock_connection.cursor.return_value = mock_cursor
|
||||
|
||||
with mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
), mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
with (
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.mysqlclient.MySQLdb",
|
||||
mock_connect_module,
|
||||
),
|
||||
mock.patch(
|
||||
"opentelemetry.instrumentation.dbapi.util_version",
|
||||
return_value="foobar",
|
||||
),
|
||||
):
|
||||
MySQLClientInstrumentor()._instrument()
|
||||
cnx = mock_connect_module.connect(database="test")
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry pika instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry psycopg instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.7"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,8 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.7",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry psycopg2 instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry pymemcache instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry pymongo instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry pymssql instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry PyMySQL instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Pyramid instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Redis instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Remoulade instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry requests instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -287,9 +287,12 @@ def _instrument(
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
with tracer.start_as_current_span(
|
||||
span_name, kind=SpanKind.CLIENT, attributes=span_attributes
|
||||
) as span, set_ip_on_next_http_connection(span):
|
||||
with (
|
||||
tracer.start_as_current_span(
|
||||
span_name, kind=SpanKind.CLIENT, attributes=span_attributes
|
||||
) as span,
|
||||
set_ip_on_next_http_connection(span),
|
||||
):
|
||||
exception = None
|
||||
if callable(request_hook):
|
||||
request_hook(span, request)
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry SQLAlchemy instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry SQLite3 instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -112,8 +112,9 @@ class TestSQLite3(TestBase):
|
||||
|
||||
def test_callproc(self):
|
||||
"""Should create a child span for callproc"""
|
||||
with self._tracer.start_as_current_span("rootSpan"), self.assertRaises(
|
||||
Exception
|
||||
with (
|
||||
self._tracer.start_as_current_span("rootSpan"),
|
||||
self.assertRaises(Exception),
|
||||
):
|
||||
self._cursor.callproc("test", ())
|
||||
self.validate_spans("test")
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Starlette Instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -1,5 +1,5 @@
|
||||
# This file was autogenerated by uv via the following command:
|
||||
# uv pip compile --python 3.8 --universal --no-emit-package opentelemetry-api --no-emit-package opentelemetry-semantic-conventions -c dev-requirements.txt instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in -o instrumentation/opentelemetry-instrumentation-starlette/test-requirements.latest.txt
|
||||
# uv pip compile --python 3.9 --universal --no-emit-package opentelemetry-api --no-emit-package opentelemetry-semantic-conventions -c dev-requirements.txt instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in -o instrumentation/opentelemetry-instrumentation-starlette/test-requirements.latest.txt
|
||||
-e instrumentation/opentelemetry-instrumentation-asgi
|
||||
# via
|
||||
# -r instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in
|
||||
@ -50,9 +50,7 @@ idna==3.10
|
||||
# anyio
|
||||
# httpx
|
||||
# requests
|
||||
importlib-metadata==8.5.0 ; python_full_version < '3.9'
|
||||
# via opentelemetry-api
|
||||
importlib-metadata==8.6.1 ; python_full_version >= '3.9'
|
||||
importlib-metadata==8.6.1
|
||||
# via opentelemetry-api
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
|
@ -1,5 +1,5 @@
|
||||
# This file was autogenerated by uv via the following command:
|
||||
# uv pip compile --python 3.8 --universal --resolution lowest-direct --no-emit-package opentelemetry-api --no-emit-package opentelemetry-semantic-conventions -c dev-requirements.txt instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in -o instrumentation/opentelemetry-instrumentation-starlette/test-requirements.oldest.txt
|
||||
# uv pip compile --python 3.9 --universal --resolution lowest-direct --no-emit-package opentelemetry-api --no-emit-package opentelemetry-semantic-conventions -c dev-requirements.txt instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in -o instrumentation/opentelemetry-instrumentation-starlette/test-requirements.oldest.txt
|
||||
-e instrumentation/opentelemetry-instrumentation-asgi
|
||||
# via
|
||||
# -r instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in
|
||||
@ -16,9 +16,7 @@
|
||||
# -r instrumentation/opentelemetry-instrumentation-starlette/test-requirements.in
|
||||
# opentelemetry-instrumentation-asgi
|
||||
# opentelemetry-instrumentation-starlette
|
||||
anyio==4.5.2 ; python_full_version < '3.9'
|
||||
# via httpx
|
||||
anyio==4.8.0 ; python_full_version >= '3.9'
|
||||
anyio==4.8.0
|
||||
# via httpx
|
||||
asgiref==3.8.1
|
||||
# via opentelemetry-instrumentation-asgi
|
||||
@ -50,9 +48,7 @@ idna==3.10
|
||||
# anyio
|
||||
# httpx
|
||||
# requests
|
||||
importlib-metadata==8.5.0 ; python_full_version < '3.9'
|
||||
# via opentelemetry-api
|
||||
importlib-metadata==8.6.1 ; python_full_version >= '3.9'
|
||||
importlib-metadata==8.6.1
|
||||
# via opentelemetry-api
|
||||
iniconfig==2.0.0
|
||||
# via pytest
|
||||
@ -80,17 +76,13 @@ typing-extensions==4.12.2 ; python_full_version < '3.13'
|
||||
# via
|
||||
# anyio
|
||||
# asgiref
|
||||
urllib3==2.2.3 ; python_full_version < '3.9'
|
||||
# via requests
|
||||
urllib3==2.3.0 ; python_full_version >= '3.9'
|
||||
urllib3==2.3.0
|
||||
# via requests
|
||||
wrapt==1.16.0
|
||||
# via
|
||||
# deprecated
|
||||
# opentelemetry-instrumentation
|
||||
zipp==3.20.2 ; python_full_version < '3.9'
|
||||
# via importlib-metadata
|
||||
zipp==3.21.0 ; python_full_version >= '3.9'
|
||||
zipp==3.21.0
|
||||
# via importlib-metadata
|
||||
|
||||
# The following packages were excluded from the output:
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry System Metrics Instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Thread context propagation support for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -267,9 +267,10 @@ class TestThreading(TestBase):
|
||||
autospec=True,
|
||||
)
|
||||
def test_thread_pool_with_none_context_token(self, mock_detach: MagicMock):
|
||||
with self.get_root_span(), ThreadPoolExecutor(
|
||||
max_workers=1
|
||||
) as executor:
|
||||
with (
|
||||
self.get_root_span(),
|
||||
ThreadPoolExecutor(max_workers=1) as executor,
|
||||
):
|
||||
future = executor.submit(self.get_current_span_context_for_test)
|
||||
future.result()
|
||||
mock_detach.assert_not_called()
|
||||
@ -284,9 +285,10 @@ class TestThreading(TestBase):
|
||||
)
|
||||
@patch("opentelemetry.context.detach", autospec=True)
|
||||
def test_threadpool_with_valid_context_token(self, mock_detach: MagicMock):
|
||||
with self.get_root_span(), ThreadPoolExecutor(
|
||||
max_workers=1
|
||||
) as executor:
|
||||
with (
|
||||
self.get_root_span(),
|
||||
ThreadPoolExecutor(max_workers=1) as executor,
|
||||
):
|
||||
future = executor.submit(self.get_current_span_context_for_test)
|
||||
future.result()
|
||||
mock_detach.assert_called_once()
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Tornado instrumentation for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -17,7 +17,6 @@ classifiers = [
|
||||
"Intended Audience :: Developers",
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Instrumentation for Tortoise ORM"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry urllib instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry urllib3 instrumentation"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -345,9 +345,12 @@ def _instrument(
|
||||
)
|
||||
_set_http_url(span_attributes, url, sem_conv_opt_in_mode)
|
||||
|
||||
with tracer.start_as_current_span(
|
||||
span_name, kind=SpanKind.CLIENT, attributes=span_attributes
|
||||
) as span, set_ip_on_next_http_connection(span):
|
||||
with (
|
||||
tracer.start_as_current_span(
|
||||
span_name, kind=SpanKind.CLIENT, attributes=span_attributes
|
||||
) as span,
|
||||
set_ip_on_next_http_connection(span),
|
||||
):
|
||||
if callable(request_hook):
|
||||
request_hook(
|
||||
span,
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "WSGI Middleware for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -12,7 +12,7 @@ dynamic = [
|
||||
description = "OpenTelemetry Contrib Instrumentation Packages"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -22,7 +22,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Python Distro"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OpenTelemetry Baggage Span Processor"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "AWS X-Ray Propagator for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "OT Trace Propagator for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -2,7 +2,7 @@
|
||||
[project]
|
||||
name = "opentelemetry-python-contrib"
|
||||
version = "0.0.0" # This is not used.
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
dependencies = [
|
||||
"opentelemetry-api",
|
||||
"opentelemetry-sdk",
|
||||
@ -145,15 +145,10 @@ members = [
|
||||
"propagator/*",
|
||||
"util/opentelemetry-util-http",
|
||||
]
|
||||
# TODO: remove after python 3.8 is dropped
|
||||
exclude = [
|
||||
"instrumentation-genai/opentelemetry-instrumentation-google-genai",
|
||||
"instrumentation/opentelemetry-instrumentation-starlette",
|
||||
]
|
||||
|
||||
[tool.ruff]
|
||||
# https://docs.astral.sh/ruff/configuration/
|
||||
target-version = "py38"
|
||||
target-version = "py39"
|
||||
line-length = 79
|
||||
extend-exclude = ["_template", "*_pb2*.py*"]
|
||||
output-format = "concise"
|
||||
@ -189,12 +184,13 @@ known-third-party = [
|
||||
"opencensus",
|
||||
]
|
||||
|
||||
|
||||
# https://github.com/microsoft/pyright/blob/main/docs/configuration.md#type-check-rule-overrides
|
||||
[tool.pyright]
|
||||
typeCheckingMode = "strict"
|
||||
reportUnnecessaryTypeIgnoreComment = true
|
||||
reportMissingTypeStubs = false
|
||||
pythonVersion = "3.8"
|
||||
pythonVersion = "3.9"
|
||||
reportPrivateUsage = false # Ignore private attributes added by instrumentation packages.
|
||||
# Add progressively instrumentation packages here.
|
||||
include = [
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Azure Resource Detector for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Container Resource Detector for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "AWS SDK extension for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -113,8 +113,9 @@ class TestFunctionalMysql(TestBase):
|
||||
|
||||
def test_callproc(self):
|
||||
"""Should create a child span for callproc"""
|
||||
with self._tracer.start_as_current_span("rootSpan"), self.assertRaises(
|
||||
Exception
|
||||
with (
|
||||
self._tracer.start_as_current_span("rootSpan"),
|
||||
self.assertRaises(Exception),
|
||||
):
|
||||
self._cursor.callproc("test", ())
|
||||
self.validate_spans("test")
|
||||
|
@ -108,8 +108,9 @@ class TestFunctionalAiopgConnect(TestBase):
|
||||
|
||||
def test_callproc(self):
|
||||
"""Should create a child span for callproc"""
|
||||
with self._tracer.start_as_current_span("rootSpan"), self.assertRaises(
|
||||
Exception
|
||||
with (
|
||||
self._tracer.start_as_current_span("rootSpan"),
|
||||
self.assertRaises(Exception),
|
||||
):
|
||||
async_call(self._cursor.callproc("test", ()))
|
||||
self.validate_spans("test")
|
||||
@ -194,8 +195,9 @@ class TestFunctionalAiopgCreatePool(TestBase):
|
||||
|
||||
def test_callproc(self):
|
||||
"""Should create a child span for callproc"""
|
||||
with self._tracer.start_as_current_span("rootSpan"), self.assertRaises(
|
||||
Exception
|
||||
with (
|
||||
self._tracer.start_as_current_span("rootSpan"),
|
||||
self.assertRaises(Exception),
|
||||
):
|
||||
async_call(self._cursor.callproc("test", ()))
|
||||
self.validate_spans("test")
|
||||
|
@ -118,8 +118,9 @@ class TestFunctionalPsycopg(TestBase):
|
||||
|
||||
def test_callproc(self):
|
||||
"""Should create a child span for callproc"""
|
||||
with self._tracer.start_as_current_span("rootSpan"), self.assertRaises(
|
||||
Exception
|
||||
with (
|
||||
self._tracer.start_as_current_span("rootSpan"),
|
||||
self.assertRaises(Exception),
|
||||
):
|
||||
self._cursor.callproc("test", ())
|
||||
self.validate_spans("test")
|
||||
|
@ -104,8 +104,9 @@ class TestFunctionalPyMysql(TestBase):
|
||||
|
||||
def test_callproc(self):
|
||||
"""Should create a child span for callproc"""
|
||||
with self._tracer.start_as_current_span("rootSpan"), self.assertRaises(
|
||||
Exception
|
||||
with (
|
||||
self._tracer.start_as_current_span("rootSpan"),
|
||||
self.assertRaises(Exception),
|
||||
):
|
||||
self._cursor.callproc("test", ())
|
||||
self.validate_spans("test")
|
||||
|
147
tox.ini
147
tox.ini
@ -9,12 +9,12 @@ envlist =
|
||||
; for specifying supported Python versions per package.
|
||||
|
||||
; instrumentation-openai
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-openai-v2-{oldest,latest}
|
||||
py3{9,10,11,12,13}-test-instrumentation-openai-v2-{oldest,latest}
|
||||
pypy3-test-instrumentation-openai-v2-{oldest,latest}
|
||||
lint-instrumentation-openai-v2
|
||||
|
||||
; instrumentation-vertexai
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-vertexai-{oldest,latest}
|
||||
py3{9,10,11,12,13}-test-instrumentation-vertexai-{oldest,latest}
|
||||
# Disabling pypy3 as shapely does not have wheels and fails to compile
|
||||
# pypy3-test-instrumentation-vertexai-{oldest,latest}
|
||||
lint-instrumentation-vertexai
|
||||
@ -26,59 +26,59 @@ envlist =
|
||||
lint-instrumentation-google-genai
|
||||
|
||||
; opentelemetry-resource-detector-container
|
||||
py3{8,9,10,11,12,13}-test-resource-detector-container
|
||||
py3{9,10,11,12,13}-test-resource-detector-container
|
||||
pypy3-test-resource-detector-container
|
||||
lint-resource-detector-container
|
||||
|
||||
; opentelemetry-resource-detector-azure
|
||||
py3{8,9,10,11,12,13}-test-resource-detector-azure-{0,1}
|
||||
py3{9,10,11,12,13}-test-resource-detector-azure-{0,1}
|
||||
pypy3-test-resource-detector-azure-{0,1}
|
||||
lint-resource-detector-azure
|
||||
|
||||
; opentelemetry-sdk-extension-aws
|
||||
py3{8,9,10,11,12,13}-test-sdk-extension-aws-{0,1}
|
||||
py3{9,10,11,12,13}-test-sdk-extension-aws-{0,1}
|
||||
pypy3-test-sdk-extension-aws-{0,1}
|
||||
lint-sdk-extension-aws
|
||||
benchmark-sdk-extension-aws
|
||||
|
||||
; opentelemetry-distro
|
||||
py3{8,9,10,11,12,13}-test-distro
|
||||
py3{9,10,11,12,13}-test-distro
|
||||
pypy3-test-distro
|
||||
lint-distro
|
||||
|
||||
; opentelemetry-instrumentation
|
||||
py3{8,9,10,11,12,13}-test-opentelemetry-instrumentation
|
||||
py3{9,10,11,12,13}-test-opentelemetry-instrumentation
|
||||
pypy3-test-opentelemetry-instrumentation
|
||||
lint-opentelemetry-instrumentation
|
||||
|
||||
; opentelemetry-instrumentation-aiohttp-client
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-aiohttp-client
|
||||
py3{9,10,11,12,13}-test-instrumentation-aiohttp-client
|
||||
pypy3-test-instrumentation-aiohttp-client
|
||||
lint-instrumentation-aiohttp-client
|
||||
|
||||
; opentelemetry-instrumentation-aiohttp-server
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-aiohttp-server
|
||||
py3{9,10,11,12,13}-test-instrumentation-aiohttp-server
|
||||
pypy3-test-instrumentation-aiohttp-server
|
||||
lint-instrumentation-aiohttp-server
|
||||
|
||||
; opentelemetry-instrumentation-aiopg
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-aiopg
|
||||
py3{9,10,11,12,13}-test-instrumentation-aiopg
|
||||
; instrumentation-aiopg intentionally excluded from pypy3
|
||||
lint-instrumentation-aiopg
|
||||
|
||||
; opentelemetry-instrumentation-aws-lambda
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-aws-lambda
|
||||
py3{9,10,11,12,13}-test-instrumentation-aws-lambda
|
||||
pypy3-test-instrumentation-aws-lambda
|
||||
lint-instrumentation-aws-lambda
|
||||
|
||||
; opentelemetry-instrumentation-botocore
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-botocore-{0,1}
|
||||
py3{9,10,11,12,13}-test-instrumentation-botocore-{0,1}
|
||||
; FIXME: see https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1736
|
||||
; pypy3-test-instrumentation-botocore
|
||||
lint-instrumentation-botocore
|
||||
|
||||
; opentelemetry-instrumentation-boto3sqs
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-boto3sqs
|
||||
py3{9,10,11,12,13}-test-instrumentation-boto3sqs
|
||||
pypy3-test-instrumentation-boto3sqs
|
||||
lint-instrumentation-boto3sqs
|
||||
|
||||
@ -92,30 +92,30 @@ envlist =
|
||||
; 1: django~=3.0
|
||||
; 2: django>=4.0b1,<5.0 backports.zoneinfo==0.2.1
|
||||
; 3: django>=4.0b1,<5.0
|
||||
py3{8,9}-test-instrumentation-django-{0,1,2}
|
||||
py3{9}-test-instrumentation-django-{0,1,2}
|
||||
py3{10,11,12}-test-instrumentation-django-{1,3}
|
||||
py313-test-instrumentation-django-3
|
||||
pypy3-test-instrumentation-django-{0,1}
|
||||
lint-instrumentation-django
|
||||
|
||||
; opentelemetry-instrumentation-dbapi
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-dbapi
|
||||
py3{9,10,11,12,13}-test-instrumentation-dbapi
|
||||
pypy3-test-instrumentation-dbapi
|
||||
lint-instrumentation-dbapi
|
||||
|
||||
; opentelemetry-instrumentation-boto
|
||||
py3{8,9,10,11}-test-instrumentation-boto
|
||||
py3{9,10,11}-test-instrumentation-boto
|
||||
; FIXME: see https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1736
|
||||
; pypy3-test-instrumentation-boto
|
||||
lint-instrumentation-boto
|
||||
|
||||
; opentelemetry-instrumentation-asyncclick
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-asyncclick
|
||||
py3{9,10,11,12,13}-test-instrumentation-asyncclick
|
||||
pypy3-test-instrumentation-asyncclick
|
||||
lint-instrumentation-asyncclick
|
||||
|
||||
; opentelemetry-instrumentation-click
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-click
|
||||
py3{9,10,11,12,13}-test-instrumentation-click
|
||||
pypy3-test-instrumentation-click
|
||||
lint-instrumentation-click
|
||||
|
||||
@ -125,13 +125,13 @@ envlist =
|
||||
; 0: elasticsearch-dsl==6.4.0 elasticsearch==6.8.2
|
||||
; 1: elasticsearch-dsl==7.4.1 elasticsearch==7.17.9
|
||||
; 2: elasticsearch-dsl==8.13.1 elasticsearch==8.13.1
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-elasticsearch-{0,1,2}
|
||||
py3{9,10,11,12,13}-test-instrumentation-elasticsearch-{0,1,2}
|
||||
pypy3-test-instrumentation-elasticsearch-{0,1,2}
|
||||
lint-instrumentation-elasticsearch
|
||||
|
||||
; opentelemetry-instrumentation-falcon
|
||||
; py310 does not work with falcon 1
|
||||
; py3{8,9} will be dropped for falcon 4
|
||||
; py3{9} will be dropped for falcon 4
|
||||
; The numbers at the end of the environment names
|
||||
; below mean these dependencies are being used:
|
||||
; 0: falcon ==1.4.1
|
||||
@ -139,14 +139,14 @@ envlist =
|
||||
; 2: falcon >=3.0.0,<3.1.2
|
||||
; 3: falcon >=3.1.2,<4.0.0
|
||||
; 4: falcon >=4.0.0,<5.0.0
|
||||
py3{8,9}-test-instrumentation-falcon-{0,1,2,3}
|
||||
py3{9}-test-instrumentation-falcon-{0,1,2,3}
|
||||
py3{10,11,12}-test-instrumentation-falcon-{1,2,3,4}
|
||||
py313-test-instrumentation-falcon-4
|
||||
pypy3-test-instrumentation-falcon-{0,1,2,3,4}
|
||||
lint-instrumentation-falcon
|
||||
|
||||
; opentelemetry-instrumentation-fastapi
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-fastapi
|
||||
py3{9,10,11,12,13}-test-instrumentation-fastapi
|
||||
pypy3-test-instrumentation-fastapi
|
||||
lint-instrumentation-fastapi
|
||||
|
||||
@ -156,12 +156,12 @@ envlist =
|
||||
; 0: Flask ==2.1.3 Werkzeug <3.0.0
|
||||
; 1: Flask ==2.2.0 Werkzeug <3.0.0
|
||||
; 2: Flask >=3.0.0 Werkzeug >=3.0.0
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-flask-{0,1,2}
|
||||
py3{9,10,11,12,13}-test-instrumentation-flask-{0,1,2}
|
||||
pypy3-test-instrumentation-flask-{0,1}
|
||||
lint-instrumentation-flask
|
||||
|
||||
; opentelemetry-instrumentation-urllib
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-urllib
|
||||
py3{9,10,11,12,13}-test-instrumentation-urllib
|
||||
pypy3-test-instrumentation-urllib
|
||||
lint-instrumentation-urllib
|
||||
|
||||
@ -170,38 +170,39 @@ envlist =
|
||||
; below mean these dependencies are being used:
|
||||
; 0: urllib3 >=1.0.0,<2.0.0
|
||||
; 1: urllib3 >=2.0.0,<3.0.0
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-urllib3-{0,1}
|
||||
py3{9,10,11,12,13}-test-instrumentation-urllib3-{0,1}
|
||||
pypy3-test-instrumentation-urllib3-{0,1}
|
||||
lint-instrumentation-urllib3
|
||||
|
||||
; opentelemetry-instrumentation-requests
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-requests
|
||||
py3{9,10,11,12,13}-test-instrumentation-requests
|
||||
;pypy3-test-instrumentation-requests
|
||||
lint-instrumentation-requests
|
||||
|
||||
; opentelemetry-instrumentation-starlette
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-starlette-{oldest,latest}
|
||||
py3{9,10,11,12,13}-test-instrumentation-starlette-{oldest,latest}
|
||||
pypy3-test-instrumentation-starlette-{oldest,latest}
|
||||
lint-instrumentation-starlette
|
||||
|
||||
; opentelemetry-instrumentation-jinja2
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-jinja2
|
||||
py3{9,10,11,12,13}-test-instrumentation-jinja2
|
||||
pypy3-test-instrumentation-jinja2
|
||||
lint-instrumentation-jinja2
|
||||
|
||||
; opentelemetry-instrumentation-logging
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-logging
|
||||
py3{9,10,11,12,13}-test-instrumentation-logging
|
||||
pypy3-test-instrumentation-logging
|
||||
lint-instrumentation-logging
|
||||
|
||||
; opentelemetry-exporter-richconsole
|
||||
py3{8,9,10,11,12,13}-test-exporter-richconsole
|
||||
py3{9,10,11,12,13}-test-exporter-richconsole
|
||||
pypy3-test-exporter-richconsole
|
||||
lint-exporter-richconsole
|
||||
|
||||
; opentelemetry-exporter-prometheus-remote-write
|
||||
py3{8,9,10,11,12,13}-test-exporter-prometheus-remote-write
|
||||
pypy3-test-exporter-prometheus-remote-write
|
||||
py3{9,10,11,12,13}-test-exporter-prometheus-remote-write
|
||||
# excluded from pypy3 due to missing wheel
|
||||
pypy310-test-exporter-prometheus-remote-write
|
||||
lint-exporter-prometheus-remote-write
|
||||
|
||||
; opentelemetry-instrumentation-mysql
|
||||
@ -209,12 +210,12 @@ envlist =
|
||||
; below mean these dependencies are being used:
|
||||
; 0: mysql-connector-python >=8.0.0,<9.0.0
|
||||
; 1: mysql-connector-python ~=9.0.0
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-mysql-{0,1}
|
||||
py3{9,10,11,12,13}-test-instrumentation-mysql-{0,1}
|
||||
pypy3-test-instrumentation-mysql-{0,1}
|
||||
lint-instrumentation-mysql
|
||||
|
||||
; opentelemetry-instrumentation-mysqlclient
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-mysqlclient
|
||||
py3{9,10,11,12,13}-test-instrumentation-mysqlclient
|
||||
pypy3-test-instrumentation-mysqlclient
|
||||
; prerequisite: follow the instructions here
|
||||
; https://github.com/PyMySQL/mysqlclient#install
|
||||
@ -222,13 +223,13 @@ envlist =
|
||||
lint-instrumentation-mysqlclient
|
||||
|
||||
; opentelemetry-instrumentation-psycopg2
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-psycopg2
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-psycopg2-binary
|
||||
py3{9,10,11,12,13}-test-instrumentation-psycopg2
|
||||
py3{9,10,11,12,13}-test-instrumentation-psycopg2-binary
|
||||
; ext-psycopg2 intentionally excluded from pypy3
|
||||
lint-instrumentation-psycopg2
|
||||
|
||||
; opentelemetry-instrumentation-psycopg
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-psycopg
|
||||
py3{9,10,11,12,13}-test-instrumentation-psycopg
|
||||
pypy3-test-instrumentation-psycopg
|
||||
lint-instrumentation-psycopg
|
||||
|
||||
@ -240,49 +241,49 @@ envlist =
|
||||
; 2: pymemcache >3.0.0,<3.4.2
|
||||
; 3: pymemcache ==3.4.2
|
||||
; 4: pymemcache ==4.0.0
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-pymemcache-{0,1,2,3,4}
|
||||
py3{9,10,11,12,13}-test-instrumentation-pymemcache-{0,1,2,3,4}
|
||||
pypy3-test-instrumentation-pymemcache-{0,1,2,3,4}
|
||||
lint-instrumentation-pymemcache
|
||||
|
||||
; opentelemetry-instrumentation-pymongo
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-pymongo
|
||||
py3{9,10,11,12,13}-test-instrumentation-pymongo
|
||||
pypy3-test-instrumentation-pymongo
|
||||
lint-instrumentation-pymongo
|
||||
|
||||
; opentelemetry-instrumentation-pymysql
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-pymysql
|
||||
py3{9,10,11,12,13}-test-instrumentation-pymysql
|
||||
pypy3-test-instrumentation-pymysql
|
||||
lint-instrumentation-pymysql
|
||||
|
||||
; opentelemetry-instrumentation-pymssql
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-pymssql
|
||||
py3{9,10,11,12,13}-test-instrumentation-pymssql
|
||||
; pymssql has no support for pypy: see https://github.com/pymssql/pymssql/pull/517
|
||||
; pypy3-test-instrumentation-pymssql
|
||||
lint-instrumentation-pymssql
|
||||
|
||||
; opentelemetry-instrumentation-pyramid
|
||||
; TODO: add py313 when supported by pyramid
|
||||
py3{8,9,10,11,12}-test-instrumentation-pyramid
|
||||
py3{9,10,11,12}-test-instrumentation-pyramid
|
||||
pypy3-test-instrumentation-pyramid
|
||||
lint-instrumentation-pyramid
|
||||
|
||||
; opentelemetry-instrumentation-asgi
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-asgi
|
||||
py3{9,10,11,12,13}-test-instrumentation-asgi
|
||||
pypy3-test-instrumentation-asgi
|
||||
lint-instrumentation-asgi
|
||||
|
||||
; opentelemetry-instrumentation-asyncpg
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-asyncpg
|
||||
py3{9,10,11,12,13}-test-instrumentation-asyncpg
|
||||
; ext-asyncpg intentionally excluded from pypy3
|
||||
lint-instrumentation-asyncpg
|
||||
|
||||
; opentelemetry-instrumentation-sqlite3
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-sqlite3
|
||||
py3{9,10,11,12,13}-test-instrumentation-sqlite3
|
||||
pypy3-test-instrumentation-sqlite3
|
||||
lint-instrumentation-sqlite3
|
||||
|
||||
; opentelemetry-instrumentation-wsgi
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-wsgi
|
||||
py3{9,10,11,12,13}-test-instrumentation-wsgi
|
||||
pypy3-test-instrumentation-wsgi
|
||||
lint-instrumentation-wsgi
|
||||
|
||||
@ -291,7 +292,7 @@ envlist =
|
||||
; below mean these dependencies are being used:
|
||||
; 0: grpcio==1.62.0
|
||||
; 1: grpcio==1.66.2
|
||||
py3{8,9,10,11,12}-test-instrumentation-grpc-{0,1}
|
||||
py3{9,10,11,12}-test-instrumentation-grpc-{0,1}
|
||||
py313-test-instrumentation-grpc-1
|
||||
lint-instrumentation-grpc
|
||||
|
||||
@ -301,42 +302,42 @@ envlist =
|
||||
; 0: sqlalchemy>=1.1,<1.2
|
||||
; 1: sqlalchemy~=1.4 aiosqlite
|
||||
; 2: sqlalchemy~=2.0.0
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-sqlalchemy-{1,2}
|
||||
py3{9,10,11,12,13}-test-instrumentation-sqlalchemy-{1,2}
|
||||
pypy3-test-instrumentation-sqlalchemy-{0,1,2}
|
||||
lint-instrumentation-sqlalchemy
|
||||
|
||||
; opentelemetry-instrumentation-redis
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-redis
|
||||
py3{9,10,11,12,13}-test-instrumentation-redis
|
||||
pypy3-test-instrumentation-redis
|
||||
lint-instrumentation-redis
|
||||
|
||||
; opentelemetry-instrumentation-remoulade
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-remoulade
|
||||
py3{9,10,11,12,13}-test-instrumentation-remoulade
|
||||
; instrumentation-remoulade intentionally excluded from pypy3
|
||||
lint-instrumentation-remoulade
|
||||
|
||||
; opentelemetry-instrumentation-celery
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-celery
|
||||
py3{9,10,11,12,13}-test-instrumentation-celery
|
||||
pypy3-test-instrumentation-celery
|
||||
lint-instrumentation-celery
|
||||
|
||||
; opentelemetry-instrumentation-system-metrics
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-system-metrics
|
||||
py3{9,10,11,12,13}-test-instrumentation-system-metrics
|
||||
pypy3-test-instrumentation-system-metrics
|
||||
lint-instrumentation-system-metrics
|
||||
|
||||
; opentelemetry-instrumentation-threading
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-threading
|
||||
py3{9,10,11,12,13}-test-instrumentation-threading
|
||||
pypy3-test-instrumentation-threading
|
||||
lint-instrumentation-threading
|
||||
|
||||
; opentelemetry-instrumentation-tornado
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-tornado
|
||||
py3{9,10,11,12,13}-test-instrumentation-tornado
|
||||
pypy3-test-instrumentation-tornado
|
||||
lint-instrumentation-tornado
|
||||
|
||||
; opentelemetry-instrumentation-tortoiseorm
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-tortoiseorm
|
||||
py3{9,10,11,12,13}-test-instrumentation-tortoiseorm
|
||||
pypy3-test-instrumentation-tortoiseorm
|
||||
lint-instrumentation-tortoiseorm
|
||||
|
||||
@ -345,24 +346,24 @@ envlist =
|
||||
; below mean these dependencies are being used:
|
||||
; 0: httpx>=0.18.0,<0.19.0 respx~=0.17.0
|
||||
; 1: httpx>=0.19.0 respx~=0.20.1
|
||||
py3{8,9,10,11,12}-test-instrumentation-httpx-{0,1}
|
||||
py3{9,10,11,12}-test-instrumentation-httpx-{0,1}
|
||||
py313-test-instrumentation-httpx-1
|
||||
pypy3-test-instrumentation-httpx-{0,1}
|
||||
lint-instrumentation-httpx
|
||||
|
||||
; opentelemetry-util-http
|
||||
py3{8,9,10,11,12,13}-test-util-http
|
||||
py3{9,10,11,12,13}-test-util-http
|
||||
pypy3-test-util-http
|
||||
lint-util-http
|
||||
|
||||
; opentelemetry-propagator-aws-xray
|
||||
py3{8,9,10,11,12,13}-test-propagator-aws-xray-{0,1}
|
||||
py3{9,10,11,12,13}-test-propagator-aws-xray-{0,1}
|
||||
pypy3-test-propagator-aws-xray-{0,1}
|
||||
lint-propagator-aws-xray
|
||||
benchmark-propagator-aws-xray
|
||||
|
||||
; opentelemetry-propagator-ot-trace
|
||||
py3{8,9,10,11,12,13}-test-propagator-ot-trace
|
||||
py3{9,10,11,12,13}-test-propagator-ot-trace
|
||||
pypy3-test-propagator-ot-trace
|
||||
lint-propagator-ot-trace
|
||||
|
||||
@ -371,7 +372,7 @@ envlist =
|
||||
; below mean these dependencies are being used:
|
||||
; 0: pika>=0.12.0,<1.0.0
|
||||
; 1: pika>=1.0.0
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-sio-pika-{0,1}
|
||||
py3{9,10,11,12,13}-test-instrumentation-sio-pika-{0,1}
|
||||
pypy3-test-instrumentation-sio-pika-{0,1}
|
||||
lint-instrumentation-sio-pika
|
||||
|
||||
@ -382,37 +383,37 @@ envlist =
|
||||
; 1: aio_pika==8.3.0
|
||||
; 2: aio_pika==9.0.5
|
||||
; 3: aio_pika==9.4.1
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-aio-pika-{0,1,2,3}
|
||||
py3{9,10,11,12,13}-test-instrumentation-aio-pika-{0,1,2,3}
|
||||
pypy3-test-instrumentation-aio-pika-{0,1,2,3}
|
||||
lint-instrumentation-aio-pika
|
||||
|
||||
; opentelemetry-instrumentation-aiokafka
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-aiokafka
|
||||
py3{9,10,11,12,13}-test-instrumentation-aiokafka
|
||||
pypy3-test-instrumentation-aiokafka
|
||||
lint-instrumentation-aiokafka
|
||||
|
||||
; opentelemetry-instrumentation-kafka-python
|
||||
py3{8,9,10,11}-test-instrumentation-kafka-python
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-kafka-pythonng
|
||||
py3{9,10,11}-test-instrumentation-kafka-python
|
||||
py3{9,10,11,12,13}-test-instrumentation-kafka-pythonng
|
||||
pypy3-test-instrumentation-kafka-python
|
||||
pypy3-test-instrumentation-kafka-pythonng
|
||||
lint-instrumentation-kafka-python
|
||||
|
||||
; opentelemetry-instrumentation-confluent-kafka
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-confluent-kafka
|
||||
py3{9,10,11,12,13}-test-instrumentation-confluent-kafka
|
||||
lint-instrumentation-confluent-kafka
|
||||
|
||||
; opentelemetry-instrumentation-asyncio
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-asyncio
|
||||
py3{9,10,11,12,13}-test-instrumentation-asyncio
|
||||
lint-instrumentation-asyncio
|
||||
|
||||
; opentelemetry-instrumentation-cassandra
|
||||
py3{8,9,10,11,12,13}-test-instrumentation-cassandra
|
||||
py3{9,10,11,12,13}-test-instrumentation-cassandra
|
||||
pypy3-test-instrumentation-cassandra
|
||||
lint-instrumentation-cassandra
|
||||
|
||||
; opentelemetry-processor-baggage
|
||||
py3{8,9,10,11,12,13}-test-processor-baggage
|
||||
py3{9,10,11,12,13}-test-processor-baggage
|
||||
pypy3-test-processor-baggage
|
||||
; requires snappy headers to be available on the system
|
||||
lint-processor-baggage
|
||||
@ -466,7 +467,7 @@ deps =
|
||||
asgi: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt
|
||||
|
||||
celery: {[testenv]test_deps}
|
||||
py3{8,9}-test-instrumentation-celery: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-celery/test-requirements-0.txt
|
||||
py3{9}-test-instrumentation-celery: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-celery/test-requirements-0.txt
|
||||
py3{10,11,12,13}-test-instrumentation-celery: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt
|
||||
pypy3-test-instrumentation-celery: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt
|
||||
lint-instrumentation-celery: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt
|
||||
@ -555,9 +556,9 @@ deps =
|
||||
dbapi: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt
|
||||
|
||||
django: {[testenv]test_deps}
|
||||
py3{8,9}-test-instrumentation-django-0: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt
|
||||
py3{8,9}-test-instrumentation-django-1: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt
|
||||
py3{8,9}-test-instrumentation-django-2: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt
|
||||
py3{9}-test-instrumentation-django-0: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt
|
||||
py3{9}-test-instrumentation-django-1: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt
|
||||
py3{9}-test-instrumentation-django-2: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt
|
||||
py3{10,11,12}-test-instrumentation-django-1: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt
|
||||
py3{10,11,12,13}-test-instrumentation-django-3: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt
|
||||
pypy3-test-instrumentation-django-0: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt
|
||||
@ -587,7 +588,7 @@ deps =
|
||||
pymongo: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-pymongo/test-requirements.txt
|
||||
|
||||
psycopg: {[testenv]test_deps}
|
||||
py3{8,9}-test-instrumentation-psycopg: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-0.txt
|
||||
py3{9}-test-instrumentation-psycopg: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-0.txt
|
||||
py3{10,11,12,13}-test-instrumentation-psycopg: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt
|
||||
pypy3-test-instrumentation-psycopg: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt
|
||||
lint-instrumentation-psycopg: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt
|
||||
|
@ -8,7 +8,7 @@ dynamic = ["version"]
|
||||
description = "Web util for OpenTelemetry"
|
||||
readme = "README.rst"
|
||||
license = "Apache-2.0"
|
||||
requires-python = ">=3.8"
|
||||
requires-python = ">=3.9"
|
||||
authors = [
|
||||
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
|
||||
]
|
||||
@ -18,7 +18,6 @@ classifiers = [
|
||||
"License :: OSI Approved :: Apache Software License",
|
||||
"Programming Language :: Python",
|
||||
"Programming Language :: Python :: 3",
|
||||
"Programming Language :: Python :: 3.8",
|
||||
"Programming Language :: Python :: 3.9",
|
||||
"Programming Language :: Python :: 3.10",
|
||||
"Programming Language :: Python :: 3.11",
|
||||
|
@ -57,9 +57,10 @@ class TestHttpBase(TestBase, HttpTestBase):
|
||||
|
||||
def test_basic_with_span(self):
|
||||
tracer = trace.get_tracer(__name__)
|
||||
with tracer.start_as_current_span(
|
||||
"HTTP GET"
|
||||
) as span, set_ip_on_next_http_connection(span):
|
||||
with (
|
||||
tracer.start_as_current_span("HTTP GET") as span,
|
||||
set_ip_on_next_http_connection(span),
|
||||
):
|
||||
resp, body = self.perform_request()
|
||||
assert resp.status == 200
|
||||
assert body == b"Hello!"
|
||||
@ -68,12 +69,14 @@ class TestHttpBase(TestBase, HttpTestBase):
|
||||
|
||||
def test_with_nested_span(self):
|
||||
tracer = trace.get_tracer(__name__)
|
||||
with tracer.start_as_current_span(
|
||||
"requests HTTP GET"
|
||||
) as span, set_ip_on_next_http_connection(span):
|
||||
with tracer.start_as_current_span(
|
||||
"urllib3 HTTP GET"
|
||||
) as span2, set_ip_on_next_http_connection(span2):
|
||||
with (
|
||||
tracer.start_as_current_span("requests HTTP GET") as span,
|
||||
set_ip_on_next_http_connection(span),
|
||||
):
|
||||
with (
|
||||
tracer.start_as_current_span("urllib3 HTTP GET") as span2,
|
||||
set_ip_on_next_http_connection(span2),
|
||||
):
|
||||
resp, body = self.perform_request()
|
||||
assert resp.status == 200
|
||||
assert body == b"Hello!"
|
||||
@ -82,11 +85,13 @@ class TestHttpBase(TestBase, HttpTestBase):
|
||||
|
||||
def test_with_nested_nonrecording_span(self):
|
||||
tracer = trace.get_tracer(__name__)
|
||||
with tracer.start_as_current_span(
|
||||
"requests HTTP GET"
|
||||
) as span, set_ip_on_next_http_connection(span):
|
||||
with trace.use_span(INVALID_SPAN), set_ip_on_next_http_connection(
|
||||
INVALID_SPAN
|
||||
with (
|
||||
tracer.start_as_current_span("requests HTTP GET") as span,
|
||||
set_ip_on_next_http_connection(span),
|
||||
):
|
||||
with (
|
||||
trace.use_span(INVALID_SPAN),
|
||||
set_ip_on_next_http_connection(INVALID_SPAN),
|
||||
):
|
||||
resp, body = self.perform_request()
|
||||
assert resp.status == 200
|
||||
@ -95,8 +100,9 @@ class TestHttpBase(TestBase, HttpTestBase):
|
||||
self.assertEqual(span.attributes, {"net.peer.ip": "127.0.0.1"})
|
||||
|
||||
def test_with_only_nonrecording_span(self):
|
||||
with trace.use_span(INVALID_SPAN), set_ip_on_next_http_connection(
|
||||
INVALID_SPAN
|
||||
with (
|
||||
trace.use_span(INVALID_SPAN),
|
||||
set_ip_on_next_http_connection(INVALID_SPAN),
|
||||
):
|
||||
resp, body = self.perform_request()
|
||||
assert resp.status == 200
|
||||
@ -120,9 +126,10 @@ class TestHttpBase(TestBase, HttpTestBase):
|
||||
HttpClientInstrumentor().uninstrument()
|
||||
|
||||
tracer = trace.get_tracer(__name__)
|
||||
with tracer.start_as_current_span(
|
||||
"HTTP GET"
|
||||
) as span, set_ip_on_next_http_connection(span):
|
||||
with (
|
||||
tracer.start_as_current_span("HTTP GET") as span,
|
||||
set_ip_on_next_http_connection(span),
|
||||
):
|
||||
body = self.perform_request()[1]
|
||||
self.assertEqual(b"Hello!", body)
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user