diff --git a/.github/component_owners.yml b/.github/component_owners.yml
index b092d5d2c3..e3ca06b450 100644
--- a/.github/component_owners.yml
+++ b/.github/component_owners.yml
@@ -45,27 +45,13 @@ components:
instrumentation/opentelemetry-instrumentation-urllib:
- shalevr
- - ocelotl
instrumentation/opentelemetry-instrumentation-urllib3:
- shalevr
- - ocelotl
instrumentation/opentelemetry-instrumentation-sqlalchemy:
- shalevr
- instrumentation/opentelemetry-instrumentation-flask:
- - ocelotl
-
- instrumentation/opentelemetry-instrumentation-jinja2:
- - ocelotl
-
- instrumentation/opentelemetry-instrumentation-logging:
- - ocelotl
-
- instrumentation/opentelemetry-instrumentation-requests:
- - ocelotl
-
instrumentation/opentelemetry-instrumentation-cassandra:
- mattcontinisio
diff --git a/.github/workflows/generate_workflows.py b/.github/workflows/generate_workflows.py
new file mode 100644
index 0000000000..dbd128bc43
--- /dev/null
+++ b/.github/workflows/generate_workflows.py
@@ -0,0 +1,14 @@
+from pathlib import Path
+
+from generate_workflows_lib import (
+ generate_test_workflow,
+ generate_lint_workflow,
+ generate_misc_workflow
+)
+
+tox_ini_path = Path(__file__).parent.parent.parent.joinpath("tox.ini")
+workflows_directory_path = Path(__file__).parent
+
+generate_test_workflow(tox_ini_path, workflows_directory_path, "ubuntu-latest")
+generate_lint_workflow(tox_ini_path, workflows_directory_path)
+generate_misc_workflow(tox_ini_path, workflows_directory_path)
diff --git a/.github/workflows/generate_workflows_lib/hatch_build.py b/.github/workflows/generate_workflows_lib/hatch_build.py
new file mode 100644
index 0000000000..aedf360a35
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/hatch_build.py
@@ -0,0 +1,15 @@
+from hatchling.builders.hooks.plugin.interface import BuildHookInterface
+from pathlib import Path
+
+
+class CustomBuildHook(BuildHookInterface):
+
+ def initialize(self, version, build_data):
+
+ with open(
+ Path(__file__).parent.parent.parent.parent.joinpath("tox.ini")
+ ) as tox_ini_file_0:
+ with open(
+ Path(__file__).parent.joinpath("src/generate_workflows_lib/tox.ini"), "w"
+ ) as tox_ini_file_1:
+ tox_ini_file_1.write(tox_ini_file_0.read())
diff --git a/.github/workflows/generate_workflows_lib/pyproject.toml b/.github/workflows/generate_workflows_lib/pyproject.toml
new file mode 100644
index 0000000000..314d079686
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/pyproject.toml
@@ -0,0 +1,32 @@
+[build-system]
+requires = ["hatchling"]
+build-backend = "hatchling.build"
+
+[project]
+name = "generate-workflows-lib"
+dynamic = ["version"]
+description = "A library to generate workflows"
+license = "Apache-2.0"
+requires-python = ">=3.8"
+authors = [
+ { name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
+]
+classifiers = [
+ "Development Status :: 4 - Beta",
+ "Intended Audience :: Developers",
+ "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",
+ "Programming Language :: Python :: 3.12",
+ "Typing :: Typed",
+]
+dependencies = ["Jinja2", "tox"]
+
+[tool.hatch.version]
+path = "src/generate_workflows_lib/version.py"
+
+[tool.hatch.build.targets.wheel.hooks.custom]
diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/.gitignore b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/.gitignore
new file mode 100644
index 0000000000..66d10d9ec4
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/.gitignore
@@ -0,0 +1 @@
+tox.ini
diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py
new file mode 100644
index 0000000000..31f11062c4
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/__init__.py
@@ -0,0 +1,267 @@
+from re import compile as re_compile
+from jinja2 import Environment, FileSystemLoader
+from pathlib import Path
+from tox.config.cli.parse import get_options
+from tox.session.state import State
+from tox.config.sets import CoreConfigSet
+from tox.config.source.tox_ini import ToxIni
+from collections import defaultdict
+
+
+_tox_test_env_regex = re_compile(
+ r"(?Ppy\w+)-test-"
+ r"(?P[-\w]+\w)-?(?P\d+)?"
+)
+_tox_lint_env_regex = re_compile(r"lint-(?P[-\w]+)")
+_tox_contrib_env_regex = re_compile(
+ r"py38-test-(?P[-\w]+\w)-?(?P\d+)?"
+)
+
+
+def get_tox_envs(tox_ini_path: Path) -> list:
+
+ tox_ini = ToxIni(tox_ini_path)
+
+ conf = State(get_options(), []).conf
+
+ tox_section = next(tox_ini.sections())
+
+ core_config_set = (
+ CoreConfigSet(conf, tox_section, tox_ini_path.parent, tox_ini_path)
+ )
+
+ (
+ core_config_set.
+ loaders.
+ extend(
+ tox_ini.
+ get_loaders(
+ tox_section,
+ base=[],
+ override_map=defaultdict(list, {}),
+ conf=core_config_set
+ )
+ )
+ )
+
+ return core_config_set.load("env_list")
+
+
+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",
+ "py39": "3.9",
+ "py310": "3.10",
+ "py311": "3.11",
+ "py312": "3.12",
+ }
+
+ test_job_datas = []
+
+ for operating_system in operating_systems:
+ for tox_env in tox_envs:
+
+ tox_test_env_match = _tox_test_env_regex.match(tox_env)
+
+ if tox_test_env_match is None:
+ continue
+
+ groups = tox_test_env_match.groupdict()
+
+ aliased_python_version = (
+ python_version_alias[groups["python_version"]]
+ )
+ tox_env = tox_test_env_match.string
+
+ test_requirements = groups["test_requirements"]
+
+ if test_requirements is None:
+ test_requirements = " "
+
+ else:
+ test_requirements = f"-{test_requirements} "
+
+ test_job_datas.append(
+ {
+ "name": f"{tox_env}_{operating_system}",
+ "ui_name": (
+ f"{groups['name']}"
+ f"{test_requirements}"
+ f"{aliased_python_version} "
+ f"{os_alias[operating_system]}"
+ ),
+ "python_version": aliased_python_version,
+ "tox_env": tox_env,
+ "os": operating_system
+ }
+
+ )
+
+ return test_job_datas
+
+
+def get_lint_job_datas(tox_envs: list) -> list:
+
+ lint_job_datas = []
+
+ for tox_env in tox_envs:
+
+ tox_lint_env_match = _tox_lint_env_regex.match(tox_env)
+
+ if tox_lint_env_match is None:
+ continue
+
+ tox_env = tox_lint_env_match.string
+
+ lint_job_datas.append(
+ {
+ "name": f"{tox_env}",
+ "ui_name": f"{tox_lint_env_match.groupdict()['name']}",
+ "tox_env": tox_env,
+ }
+
+ )
+
+ return lint_job_datas
+
+
+def get_contrib_job_datas(tox_envs: list) -> list:
+
+ contrib_job_datas = []
+
+ for tox_env in tox_envs:
+
+ tox_contrib_env_match = _tox_contrib_env_regex.match(tox_env)
+
+ if tox_contrib_env_match is None:
+ continue
+
+ groups = tox_contrib_env_match.groupdict()
+
+ tox_env = tox_contrib_env_match.string
+
+ contrib_requirements = groups["contrib_requirements"]
+
+ if contrib_requirements is None:
+ contrib_requirements = " "
+
+ else:
+ contrib_requirements = f"-{contrib_requirements} "
+
+ contrib_job_datas.append(
+ {
+ "ui_name": (
+ f"{groups['name']}"
+ f"{contrib_requirements}"
+ ),
+ "tox_env": tox_env,
+ }
+
+ )
+
+ return contrib_job_datas
+
+
+def get_misc_job_datas(tox_envs: list) -> list:
+
+ misc_job_datas = []
+
+ _tox_benchmark_env_regex = re_compile(r"benchmark.+")
+
+ for tox_env in tox_envs:
+ if (
+ _tox_test_env_regex.match(tox_env) is not None or
+ _tox_lint_env_regex.match(tox_env) is not None or
+ _tox_contrib_env_regex.match(tox_env) is not None or
+ _tox_benchmark_env_regex.match(tox_env) is not None
+ ):
+ continue
+
+ misc_job_datas.append(tox_env)
+
+ return misc_job_datas
+
+
+def _generate_workflow(
+ job_datas: list, name: str, workflow_directory_path: Path
+):
+
+ # Github seems to limit the amount of jobs in a workflow file, that is why
+ # they are split in groups of 250 per workflow file.
+ for file_number, job_datas in enumerate(
+ [
+ job_datas[index:index + 250]
+ for index in range(0, len(job_datas), 250)
+ ]
+ ):
+
+ with open(
+ workflow_directory_path.joinpath(f"{name}_{file_number}.yml"),
+ "w"
+ ) as test_yml_file:
+
+ test_yml_file.write(
+ Environment(
+ loader=FileSystemLoader(Path(__file__).parent)
+ ).get_template(f"{name}.yml.j2").render(
+ job_datas=job_datas, file_number=file_number
+ )
+ )
+ test_yml_file.write("\n")
+
+
+def generate_test_workflow(
+ tox_ini_path: Path,
+ workflow_directory_path: Path,
+ *operating_systems
+) -> None:
+
+ _generate_workflow(
+ get_test_job_datas(get_tox_envs(tox_ini_path), operating_systems),
+ "test",
+ workflow_directory_path
+ )
+
+
+def generate_lint_workflow(
+ tox_ini_path: Path,
+ workflow_directory_path: Path,
+) -> None:
+
+ _generate_workflow(
+ get_lint_job_datas(get_tox_envs(tox_ini_path)),
+ "lint",
+ workflow_directory_path
+ )
+
+
+def generate_contrib_workflow(
+ workflow_directory_path: Path,
+) -> None:
+
+ _generate_workflow(
+ get_contrib_job_datas(
+ get_tox_envs(Path(__file__).parent.joinpath("tox.ini"))
+ ),
+ "contrib",
+ workflow_directory_path
+ )
+
+
+def generate_misc_workflow(
+ tox_ini_path: Path,
+ workflow_directory_path: Path,
+) -> None:
+
+ _generate_workflow(
+ get_misc_job_datas(get_tox_envs(tox_ini_path)),
+ "misc",
+ workflow_directory_path
+ )
diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/contrib.yml.j2 b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/contrib.yml.j2
new file mode 100644
index 0000000000..2989e55974
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/contrib.yml.j2
@@ -0,0 +1,47 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Contrib {{ file_number }}
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: ${% raw %}{{ github.sha }}{% endraw %}
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+ {%- for job_data in job_datas %}
+
+ {{ job_data.tox_env }}:
+ name: {{ job_data.ui_name }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout contrib repo @ SHA - ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}
+ uses: actions/checkout@v4
+ with:
+ repository: open-telemetry/opentelemetry-python-contrib
+ ref: ${% raw %}{{ env.CONTRIB_REPO_SHA }}{% endraw %}
+
+ - name: Checkout core repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
+ uses: actions/checkout@v4
+ with:
+ repository: open-telemetry/opentelemetry-python
+ path: opentelemetry-python-core
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+ architecture: "x64"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e {{ job_data.tox_env }} -- -ra
+ {%- endfor %}
diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2 b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2
new file mode 100644
index 0000000000..6959261bba
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/lint.yml.j2
@@ -0,0 +1,37 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Lint {{ file_number }}
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: main
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+ {%- for job_data in job_datas %}
+
+ {{ job_data.name }}:
+ name: {{ job_data.ui_name }}
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e {{ job_data.tox_env }}
+ {%- endfor %}
diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2 b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2
new file mode 100644
index 0000000000..2b0735b432
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/misc.yml.j2
@@ -0,0 +1,72 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Misc {{ file_number }}
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: main
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+ {%- for job_data in job_datas %}
+
+ {{ job_data }}:
+ name: {{ job_data }}
+ runs-on: ubuntu-latest
+ {%- if job_data == "generate-workflows" %}
+ if: |
+ !contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
+ && github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
+ {%- endif %}
+ {%- if job_data == "public-symbols-check" %}
+ if: |
+ !contains(github.event.pull_request.labels.*.name, 'Approve Public API check')
+ && github.actor != 'opentelemetrybot'
+ {%- endif %}
+ steps:
+ - name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
+ uses: actions/checkout@v4
+ {%- if job_data == "public-symbols-check" %}
+ with:
+ fetch-depth: 0
+
+ - name: Checkout main
+ run: git checkout main
+
+ - name: Pull origin
+ run: git pull --rebase=false origin main
+
+ - name: Checkout pull request
+ run: git checkout ${% raw %}{{ github.event.pull_request.head.sha }}{% endraw %}
+ {%- endif %}
+ {%- if job_data != "shellcheck" %}
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+ {%- endif %}
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e {{ job_data }}
+ {%- if job_data == "generate-workflows" %}
+
+ - name: Check workflows are up to date
+ run: git diff --exit-code || (echo 'Generated workflows are out of date, run "tox -e generate-workflows" and commit the changes in this PR.' && exit 1)
+ {%- endif %}
+ {%- if job_data == "generate" %}
+
+ - name: Check workflows are up to date
+ run: git diff --exit-code || (echo 'Generated code is out of date, run "tox -e generate" and commit the changes in this PR.' && exit 1)
+ {%- endif %}
+ {%- endfor %}
diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2 b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2
new file mode 100644
index 0000000000..e5168470d8
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/test.yml.j2
@@ -0,0 +1,42 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Test {{ file_number }}
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: main
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+ {%- for job_data in job_datas %}
+
+ {{ job_data.name }}:
+ name: {{ job_data.ui_name }}
+ runs-on: {{ job_data.os }}
+ steps:
+ - name: Checkout repo @ SHA - ${% raw %}{{ github.sha }}{% endraw %}
+ uses: actions/checkout@v4
+
+ - name: Set up Python {{ job_data.python_version }}
+ uses: actions/setup-python@v5
+ with:
+ python-version: "{{ job_data.python_version }}"
+
+ - name: Install tox
+ run: pip install tox
+ {%- if job_data.os == "windows-latest" %}
+
+ - name: Configure git to support long filenames
+ run: git config --system core.longpaths true
+ {%- endif %}
+
+ - name: Run tests
+ run: tox -e {{ job_data.tox_env }} -- -ra
+ {%- endfor %}
diff --git a/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/version.py b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/version.py
new file mode 100644
index 0000000000..3dc1f76bc6
--- /dev/null
+++ b/.github/workflows/generate_workflows_lib/src/generate_workflows_lib/version.py
@@ -0,0 +1 @@
+__version__ = "0.1.0"
diff --git a/.github/workflows/instrumentations_0.yml b/.github/workflows/instrumentations_0.yml
deleted file mode 100644
index 972a33532c..0000000000
--- a/.github/workflows/instrumentations_0.yml
+++ /dev/null
@@ -1,119 +0,0 @@
-name: Contrib Repo Tests
-
-on:
- push:
- branches-ignore:
- - 'release/*'
- pull_request:
-env:
- CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
-
-jobs:
- instrumentations-0:
- env:
- # We use these variables to convert between tox and GHA version literals
- py38: 3.8
- py39: 3.9
- py310: "3.10"
- py311: "3.11"
- py312: "3.12"
- pypy3: pypy-3.8
- RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
- matrix:
- python-version: [py38, py39, py310, py311, py312, pypy3]
- package:
- # Do not add more instrumentations here, add them in instrumentations_1.yml.
- # The reason for this separation of instrumentations into more than one YAML file is
- # the limit of jobs that can be run from a Github actions matrix:
- # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
- # "A matrix will generate a maximum of 256 jobs per workflow run. This limit applies
- # to both GitHub-hosted and self-hosted runners."
- - "aiohttp-client"
- - "aiohttp-server"
- - "aiopg"
- - "aio-pika"
- - "asgi"
- - "asyncpg"
- - "aws-lambda"
- - "boto"
- - "boto3sqs"
- - "botocore"
- - "cassandra"
- - "celery"
- - "confluent-kafka"
- - "dbapi"
- - "django"
- - "elasticsearch"
- - "falcon"
- - "fastapi"
- - "flask"
- - "grpc"
- - "httpx"
- - "jinja2"
- - "kafka-python"
- - "logging"
- - "mysql"
- - "mysqlclient"
- - "sio-pika"
- - "psycopg2"
- - "pymemcache"
- - "pymongo"
- - "pymysql"
- - "pyramid"
- - "redis"
- - "remoulade"
- - "requests"
- - "sqlalchemy"
- - "sqlite3"
- - "starlette"
- - "system-metrics"
- - "tornado"
- - "tortoiseorm"
- os: [ubuntu-20.04]
- exclude:
- - python-version: py312
- package: "boto"
- - python-version: py312
- package: "kafka-python"
- - python-version: pypy3
- package: "aiopg"
- - python-version: pypy3
- package: "asyncpg"
- - python-version: pypy3
- package: "boto"
- - python-version: pypy3
- package: "boto3sqs"
- - python-version: pypy3
- package: "botocore"
- - python-version: pypy3
- package: "psycopg2"
- - python-version: pypy3
- package: "remoulade"
- - python-version: pypy3
- package: "requests"
- - python-version: pypy3
- package: "confluent-kafka"
- - python-version: pypy3
- package: "grpc"
- steps:
- - name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
- uses: actions/checkout@v4
- - name: Set up Python ${{ env[matrix.python-version] }}
- uses: actions/setup-python@v5
- with:
- python-version: ${{ env[matrix.python-version] }}
- - name: Install tox
- run: pip install tox
- - name: Cache tox environment
- # Preserves .tox directory between runs for faster installs
- uses: actions/cache@v4
- with:
- path: |
- .tox
- ~/.cache/pip
- key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('gen-requirements.txt', 'dev-requirements.txt') }}
- - name: run tox
- run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra
diff --git a/.github/workflows/instrumentations_1.yml b/.github/workflows/instrumentations_1.yml
deleted file mode 100644
index 1698a49be8..0000000000
--- a/.github/workflows/instrumentations_1.yml
+++ /dev/null
@@ -1,64 +0,0 @@
-name: Contrib Repo Tests
-
-on:
- push:
- branches-ignore:
- - 'release/*'
- pull_request:
-env:
- CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
-
-jobs:
- instrumentations-1:
- env:
- # We use these variables to convert between tox and GHA version literals
- py38: 3.8
- py39: 3.9
- py310: "3.10"
- py311: "3.11"
- py312: "3.12"
- pypy3: pypy-3.8
- RUN_MATRIX_COMBINATION: ${{ matrix.python-version }}-${{ matrix.package }}-${{ matrix.os }}
- runs-on: ${{ matrix.os }}
- strategy:
- fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
- matrix:
- python-version: [py38, py39, py310, py311, py312, pypy3]
- package:
- - "urllib"
- - "urllib3"
- - "wsgi"
- - "distro"
- - "richconsole"
- - "psycopg"
- - "prometheus-remote-write"
- - "sdk-extension-aws"
- - "propagator-aws-xray"
- - "propagator-ot-trace"
- - "resource-detector-azure"
- - "resource-detector-container"
- - "util-http"
- - "fastapi-slim"
- os: [ubuntu-20.04]
- exclude:
- - python-version: pypy3
- package: "prometheus-remote-write"
- steps:
- - name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
- uses: actions/checkout@v4
- - name: Set up Python ${{ env[matrix.python-version] }}
- uses: actions/setup-python@v5
- with:
- python-version: ${{ env[matrix.python-version] }}
- - name: Install tox
- run: pip install tox
- - name: Cache tox environment
- # Preserves .tox directory between runs for faster installs
- uses: actions/cache@v4
- with:
- path: |
- .tox
- ~/.cache/pip
- key: v7-build-tox-cache-${{ env.RUN_MATRIX_COMBINATION }}-${{ hashFiles('gen-requirements.txt', 'dev-requirements.txt') }}
- - name: run tox
- run: tox -f ${{ matrix.python-version }}-${{ matrix.package }} -- -ra
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
deleted file mode 100644
index 0e2dc7110d..0000000000
--- a/.github/workflows/lint.yml
+++ /dev/null
@@ -1,95 +0,0 @@
-name: Lint tests
-
-on:
- push:
- branches-ignore:
- - 'release/*'
- pull_request:
-env:
- CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
-
-jobs:
- lint-3_12:
- strategy:
- fail-fast: false # ensures the entire test matrix is run, even if one permutation fails
- matrix:
- package:
- - "distro"
- - "exporter-prometheus-remote-write"
- - "exporter-richconsole"
- - "instrumentation-aio-pika"
- - "instrumentation-aiohttp-client"
- - "instrumentation-aiohttp-server"
- - "instrumentation-aiopg"
- - "instrumentation-asgi"
- - "instrumentation-asyncio"
- - "instrumentation-asyncpg"
- - "instrumentation-aws-lambda"
- - "instrumentation-boto"
- - "instrumentation-boto3sqs"
- - "instrumentation-botocore"
- - "instrumentation-cassandra"
- - "instrumentation-celery"
- - "instrumentation-confluent-kafka"
- - "instrumentation-dbapi"
- - "instrumentation-django"
- - "instrumentation-elasticsearch"
- - "instrumentation-falcon"
- - "instrumentation-fastapi"
- - "instrumentation-flask"
- - "instrumentation-grpc"
- - "instrumentation-httpx"
- - "instrumentation-jinja2"
- - "instrumentation-kafka-python"
- - "instrumentation-logging"
- - "instrumentation-mysql"
- - "instrumentation-mysqlclient"
- - "instrumentation-psycopg"
- - "instrumentation-psycopg2"
- - "instrumentation-pymemcache"
- - "instrumentation-pymongo"
- - "instrumentation-pymysql"
- - "instrumentation-pyramid"
- - "instrumentation-redis"
- - "instrumentation-remoulade"
- - "instrumentation-requests"
- - "instrumentation-sio-pika"
- - "instrumentation-sqlalchemy"
- - "instrumentation-sqlite3"
- - "instrumentation-starlette"
- - "instrumentation-system-metrics"
- - "instrumentation-threading"
- - "instrumentation-tornado"
- - "instrumentation-tortoiseorm"
- - "instrumentation-urllib"
- - "instrumentation-urllib3"
- - "instrumentation-wsgi"
- - "opentelemetry-instrumentation"
- - "processor-baggage"
- - "propagator-aws-xray"
- - "propagator-ot-trace"
- - "resource-detector-azure"
- - "resource-detector-container"
- - "sdk-extension-aws"
- - "util-http"
- os: [ubuntu-20.04]
- runs-on: ubuntu-20.04
- steps:
- - name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
- uses: actions/checkout@v4
- - name: Set up Python 3.12
- uses: actions/setup-python@v5
- with:
- python-version: 3.12
- - name: Install tox
- run: pip install tox
- - name: Cache tox environment
- # Preserves .tox directory between runs for faster installs
- uses: actions/cache@v4
- with:
- path: |
- .tox
- ~/.cache/pip
- key: v7-build-tox-cache-${{ matrix.package }}-${{ hashFiles('tox.ini', 'gen-requirements.txt', 'dev-requirements.txt') }}
- - name: run tox
- run: tox -e lint-${{ matrix.package }}
diff --git a/.github/workflows/lint_0.yml b/.github/workflows/lint_0.yml
new file mode 100644
index 0000000000..b5d20541e5
--- /dev/null
+++ b/.github/workflows/lint_0.yml
@@ -0,0 +1,1061 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Lint 0
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: main
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+
+ lint-resource-detector-container:
+ name: resource-detector-container
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-resource-detector-container
+
+ lint-resource-detector-azure:
+ name: resource-detector-azure
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-resource-detector-azure
+
+ lint-sdk-extension-aws:
+ name: sdk-extension-aws
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-sdk-extension-aws
+
+ lint-distro:
+ name: distro
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-distro
+
+ lint-opentelemetry-instrumentation:
+ name: opentelemetry-instrumentation
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-opentelemetry-instrumentation
+
+ lint-instrumentation-aiohttp-client:
+ name: instrumentation-aiohttp-client
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-aiohttp-client
+
+ lint-instrumentation-aiohttp-server:
+ name: instrumentation-aiohttp-server
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-aiohttp-server
+
+ lint-instrumentation-aiopg:
+ name: instrumentation-aiopg
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-aiopg
+
+ lint-instrumentation-aws-lambda:
+ name: instrumentation-aws-lambda
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-aws-lambda
+
+ lint-instrumentation-botocore:
+ name: instrumentation-botocore
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-botocore
+
+ lint-instrumentation-boto3sqs:
+ name: instrumentation-boto3sqs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-boto3sqs
+
+ lint-instrumentation-django:
+ name: instrumentation-django
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-django
+
+ lint-instrumentation-dbapi:
+ name: instrumentation-dbapi
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-dbapi
+
+ lint-instrumentation-boto:
+ name: instrumentation-boto
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-boto
+
+ lint-instrumentation-elasticsearch:
+ name: instrumentation-elasticsearch
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-elasticsearch
+
+ lint-instrumentation-falcon:
+ name: instrumentation-falcon
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-falcon
+
+ lint-instrumentation-fastapi:
+ name: instrumentation-fastapi
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-fastapi
+
+ lint-instrumentation-flask:
+ name: instrumentation-flask
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-flask
+
+ lint-instrumentation-urllib:
+ name: instrumentation-urllib
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-urllib
+
+ lint-instrumentation-urllib3:
+ name: instrumentation-urllib3
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-urllib3
+
+ lint-instrumentation-requests:
+ name: instrumentation-requests
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-requests
+
+ lint-instrumentation-starlette:
+ name: instrumentation-starlette
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-starlette
+
+ lint-instrumentation-jinja2:
+ name: instrumentation-jinja2
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-jinja2
+
+ lint-instrumentation-logging:
+ name: instrumentation-logging
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-logging
+
+ lint-exporter-richconsole:
+ name: exporter-richconsole
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-exporter-richconsole
+
+ lint-exporter-prometheus-remote-write:
+ name: exporter-prometheus-remote-write
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-exporter-prometheus-remote-write
+
+ lint-instrumentation-mysql:
+ name: instrumentation-mysql
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-mysql
+
+ lint-instrumentation-mysqlclient:
+ name: instrumentation-mysqlclient
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-mysqlclient
+
+ lint-instrumentation-psycopg2:
+ name: instrumentation-psycopg2
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-psycopg2
+
+ lint-instrumentation-psycopg:
+ name: instrumentation-psycopg
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-psycopg
+
+ lint-instrumentation-pymemcache:
+ name: instrumentation-pymemcache
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-pymemcache
+
+ lint-instrumentation-pymongo:
+ name: instrumentation-pymongo
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-pymongo
+
+ lint-instrumentation-pymysql:
+ name: instrumentation-pymysql
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-pymysql
+
+ lint-instrumentation-pyramid:
+ name: instrumentation-pyramid
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-pyramid
+
+ lint-instrumentation-asgi:
+ name: instrumentation-asgi
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-asgi
+
+ lint-instrumentation-asyncpg:
+ name: instrumentation-asyncpg
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-asyncpg
+
+ lint-instrumentation-sqlite3:
+ name: instrumentation-sqlite3
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-sqlite3
+
+ lint-instrumentation-wsgi:
+ name: instrumentation-wsgi
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-wsgi
+
+ lint-instrumentation-grpc:
+ name: instrumentation-grpc
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-grpc
+
+ lint-instrumentation-sqlalchemy:
+ name: instrumentation-sqlalchemy
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-sqlalchemy
+
+ lint-instrumentation-redis:
+ name: instrumentation-redis
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-redis
+
+ lint-instrumentation-remoulade:
+ name: instrumentation-remoulade
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-remoulade
+
+ lint-instrumentation-celery:
+ name: instrumentation-celery
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-celery
+
+ lint-instrumentation-system-metrics:
+ name: instrumentation-system-metrics
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-system-metrics
+
+ lint-instrumentation-threading:
+ name: instrumentation-threading
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-threading
+
+ lint-instrumentation-tornado:
+ name: instrumentation-tornado
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-tornado
+
+ lint-instrumentation-tortoiseorm:
+ name: instrumentation-tortoiseorm
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-tortoiseorm
+
+ lint-instrumentation-httpx:
+ name: instrumentation-httpx
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-httpx
+
+ lint-util-http:
+ name: util-http
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-util-http
+
+ lint-propagator-aws-xray:
+ name: propagator-aws-xray
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-propagator-aws-xray
+
+ lint-propagator-ot-trace:
+ name: propagator-ot-trace
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-propagator-ot-trace
+
+ lint-instrumentation-sio-pika:
+ name: instrumentation-sio-pika
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-sio-pika
+
+ lint-instrumentation-aio-pika:
+ name: instrumentation-aio-pika
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-aio-pika
+
+ lint-instrumentation-kafka-python:
+ name: instrumentation-kafka-python
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-kafka-python
+
+ lint-instrumentation-confluent-kafka:
+ name: instrumentation-confluent-kafka
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-confluent-kafka
+
+ lint-instrumentation-asyncio:
+ name: instrumentation-asyncio
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-asyncio
+
+ lint-instrumentation-cassandra:
+ name: instrumentation-cassandra
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-instrumentation-cassandra
+
+ lint-processor-baggage:
+ name: processor-baggage
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e lint-processor-baggage
diff --git a/.github/workflows/misc_0.yml b/.github/workflows/misc_0.yml
new file mode 100644
index 0000000000..3c3f7bfacf
--- /dev/null
+++ b/.github/workflows/misc_0.yml
@@ -0,0 +1,129 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Misc 0
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: main
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+
+ spellcheck:
+ name: spellcheck
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e spellcheck
+
+ docker-tests:
+ name: docker-tests
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e docker-tests
+
+ docs:
+ name: docs
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e docs
+
+ generate:
+ name: generate
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e generate
+
+ - name: Check workflows are up to date
+ run: git diff --exit-code || (echo 'Generated code is out of date, run "tox -e generate" and commit the changes in this PR.' && exit 1)
+
+ generate-workflows:
+ name: generate-workflows
+ runs-on: ubuntu-latest
+ if: |
+ !contains(github.event.pull_request.labels.*.name, 'Skip generate-workflows')
+ && github.actor != 'opentelemetrybot' && github.event_name == 'pull_request'
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e generate-workflows
+
+ - name: Check workflows are up to date
+ run: git diff --exit-code || (echo 'Generated workflows are out of date, run "tox -e generate-workflows" and commit the changes in this PR.' && exit 1)
+
+ shellcheck:
+ name: shellcheck
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e shellcheck
diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml
deleted file mode 100644
index 68d12b805f..0000000000
--- a/.github/workflows/shellcheck.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-name: Shellcheck
-
-on:
- push:
- branches-ignore:
- - 'release/*'
- pull_request:
-
-jobs:
- shellcheck:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Install shellcheck
- run: sudo apt update && sudo apt install --assume-yes shellcheck
-
- - name: Run shellcheck
- run: find . -name \*.sh | xargs shellcheck --severity=warning
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
deleted file mode 100644
index d749788204..0000000000
--- a/.github/workflows/test.yml
+++ /dev/null
@@ -1,40 +0,0 @@
-name: Contrib Repo Tests
-
-on:
- push:
- branches-ignore:
- - 'release/*'
- pull_request:
-env:
- CORE_REPO_SHA: f31903a03721ce90c338be33131222d4cba37325
-
-jobs:
- misc:
- strategy:
- fail-fast: false
- matrix:
- tox-environment: [ "docker-tests", "spellcheck", "docs", "generate" ]
- name: ${{ matrix.tox-environment }}
- runs-on: ubuntu-20.04
- steps:
- - name: Checkout Contrib Repo @ SHA - ${{ github.sha }}
- uses: actions/checkout@v4
- - name: Set up Python 3.10
- uses: actions/setup-python@v5
- with:
- python-version: "3.10"
- - name: Install tox
- run: pip install tox
- - name: Cache tox environment
- # Preserves .tox directory between runs for faster installs
- uses: actions/cache@v4
- with:
- path: |
- .tox
- ~/.cache/pip
- key: v7-misc-tox-cache-${{ matrix.tox-environment }}-${{ hashFiles('tox.ini', 'dev-requirements.txt', 'gen-requirements.txt', 'docs-requirements.txt') }}
- - name: run tox
- run: tox -e ${{ matrix.tox-environment }}
- - name: Ensure generated code is up to date
- if: matrix.tox-environment == 'generate'
- run: git diff --exit-code || (echo 'Generated code is out of date, please run "tox -e generate" and commit the changes in this PR.' && exit 1)
diff --git a/.github/workflows/test_0.yml b/.github/workflows/test_0.yml
new file mode 100644
index 0000000000..d251737227
--- /dev/null
+++ b/.github/workflows/test_0.yml
@@ -0,0 +1,4517 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Test 0
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: main
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+
+ py38-test-resource-detector-container_ubuntu-latest:
+ name: resource-detector-container 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-resource-detector-container -- -ra
+
+ py39-test-resource-detector-container_ubuntu-latest:
+ name: resource-detector-container 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-resource-detector-container -- -ra
+
+ py310-test-resource-detector-container_ubuntu-latest:
+ name: resource-detector-container 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-resource-detector-container -- -ra
+
+ py311-test-resource-detector-container_ubuntu-latest:
+ name: resource-detector-container 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-resource-detector-container -- -ra
+
+ py312-test-resource-detector-container_ubuntu-latest:
+ name: resource-detector-container 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-resource-detector-container -- -ra
+
+ pypy3-test-resource-detector-container_ubuntu-latest:
+ name: resource-detector-container pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-resource-detector-container -- -ra
+
+ py38-test-resource-detector-azure_ubuntu-latest:
+ name: resource-detector-azure 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-resource-detector-azure -- -ra
+
+ py39-test-resource-detector-azure_ubuntu-latest:
+ name: resource-detector-azure 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-resource-detector-azure -- -ra
+
+ py310-test-resource-detector-azure_ubuntu-latest:
+ name: resource-detector-azure 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-resource-detector-azure -- -ra
+
+ py311-test-resource-detector-azure_ubuntu-latest:
+ name: resource-detector-azure 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-resource-detector-azure -- -ra
+
+ py312-test-resource-detector-azure_ubuntu-latest:
+ name: resource-detector-azure 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-resource-detector-azure -- -ra
+
+ pypy3-test-resource-detector-azure_ubuntu-latest:
+ name: resource-detector-azure pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-resource-detector-azure -- -ra
+
+ py38-test-sdk-extension-aws_ubuntu-latest:
+ name: sdk-extension-aws 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-sdk-extension-aws -- -ra
+
+ py39-test-sdk-extension-aws_ubuntu-latest:
+ name: sdk-extension-aws 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-sdk-extension-aws -- -ra
+
+ py310-test-sdk-extension-aws_ubuntu-latest:
+ name: sdk-extension-aws 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-sdk-extension-aws -- -ra
+
+ py311-test-sdk-extension-aws_ubuntu-latest:
+ name: sdk-extension-aws 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-sdk-extension-aws -- -ra
+
+ py312-test-sdk-extension-aws_ubuntu-latest:
+ name: sdk-extension-aws 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-sdk-extension-aws -- -ra
+
+ pypy3-test-sdk-extension-aws_ubuntu-latest:
+ name: sdk-extension-aws pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-sdk-extension-aws -- -ra
+
+ py38-test-distro_ubuntu-latest:
+ name: distro 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-distro -- -ra
+
+ py39-test-distro_ubuntu-latest:
+ name: distro 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-distro -- -ra
+
+ py310-test-distro_ubuntu-latest:
+ name: distro 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-distro -- -ra
+
+ py311-test-distro_ubuntu-latest:
+ name: distro 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-distro -- -ra
+
+ py312-test-distro_ubuntu-latest:
+ name: distro 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-distro -- -ra
+
+ pypy3-test-distro_ubuntu-latest:
+ name: distro pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-distro -- -ra
+
+ py38-test-opentelemetry-instrumentation_ubuntu-latest:
+ name: opentelemetry-instrumentation 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-opentelemetry-instrumentation -- -ra
+
+ py39-test-opentelemetry-instrumentation_ubuntu-latest:
+ name: opentelemetry-instrumentation 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-opentelemetry-instrumentation -- -ra
+
+ py310-test-opentelemetry-instrumentation_ubuntu-latest:
+ name: opentelemetry-instrumentation 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-opentelemetry-instrumentation -- -ra
+
+ py311-test-opentelemetry-instrumentation_ubuntu-latest:
+ name: opentelemetry-instrumentation 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-opentelemetry-instrumentation -- -ra
+
+ py312-test-opentelemetry-instrumentation_ubuntu-latest:
+ name: opentelemetry-instrumentation 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-opentelemetry-instrumentation -- -ra
+
+ pypy3-test-opentelemetry-instrumentation_ubuntu-latest:
+ name: opentelemetry-instrumentation pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-opentelemetry-instrumentation -- -ra
+
+ py38-test-instrumentation-aiohttp-client_ubuntu-latest:
+ name: instrumentation-aiohttp-client 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aiohttp-client -- -ra
+
+ py39-test-instrumentation-aiohttp-client_ubuntu-latest:
+ name: instrumentation-aiohttp-client 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aiohttp-client -- -ra
+
+ py310-test-instrumentation-aiohttp-client_ubuntu-latest:
+ name: instrumentation-aiohttp-client 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aiohttp-client -- -ra
+
+ py311-test-instrumentation-aiohttp-client_ubuntu-latest:
+ name: instrumentation-aiohttp-client 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aiohttp-client -- -ra
+
+ py312-test-instrumentation-aiohttp-client_ubuntu-latest:
+ name: instrumentation-aiohttp-client 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aiohttp-client -- -ra
+
+ pypy3-test-instrumentation-aiohttp-client_ubuntu-latest:
+ name: instrumentation-aiohttp-client pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-aiohttp-client -- -ra
+
+ py38-test-instrumentation-aiohttp-server_ubuntu-latest:
+ name: instrumentation-aiohttp-server 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aiohttp-server -- -ra
+
+ py39-test-instrumentation-aiohttp-server_ubuntu-latest:
+ name: instrumentation-aiohttp-server 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aiohttp-server -- -ra
+
+ py310-test-instrumentation-aiohttp-server_ubuntu-latest:
+ name: instrumentation-aiohttp-server 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aiohttp-server -- -ra
+
+ py311-test-instrumentation-aiohttp-server_ubuntu-latest:
+ name: instrumentation-aiohttp-server 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aiohttp-server -- -ra
+
+ py312-test-instrumentation-aiohttp-server_ubuntu-latest:
+ name: instrumentation-aiohttp-server 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aiohttp-server -- -ra
+
+ pypy3-test-instrumentation-aiohttp-server_ubuntu-latest:
+ name: instrumentation-aiohttp-server pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-aiohttp-server -- -ra
+
+ py38-test-instrumentation-aiopg_ubuntu-latest:
+ name: instrumentation-aiopg 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aiopg -- -ra
+
+ py39-test-instrumentation-aiopg_ubuntu-latest:
+ name: instrumentation-aiopg 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aiopg -- -ra
+
+ py310-test-instrumentation-aiopg_ubuntu-latest:
+ name: instrumentation-aiopg 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aiopg -- -ra
+
+ py311-test-instrumentation-aiopg_ubuntu-latest:
+ name: instrumentation-aiopg 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aiopg -- -ra
+
+ py312-test-instrumentation-aiopg_ubuntu-latest:
+ name: instrumentation-aiopg 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aiopg -- -ra
+
+ py38-test-instrumentation-aws-lambda_ubuntu-latest:
+ name: instrumentation-aws-lambda 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aws-lambda -- -ra
+
+ py39-test-instrumentation-aws-lambda_ubuntu-latest:
+ name: instrumentation-aws-lambda 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aws-lambda -- -ra
+
+ py310-test-instrumentation-aws-lambda_ubuntu-latest:
+ name: instrumentation-aws-lambda 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aws-lambda -- -ra
+
+ py311-test-instrumentation-aws-lambda_ubuntu-latest:
+ name: instrumentation-aws-lambda 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aws-lambda -- -ra
+
+ py312-test-instrumentation-aws-lambda_ubuntu-latest:
+ name: instrumentation-aws-lambda 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aws-lambda -- -ra
+
+ pypy3-test-instrumentation-aws-lambda_ubuntu-latest:
+ name: instrumentation-aws-lambda pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-aws-lambda -- -ra
+
+ py38-test-instrumentation-botocore_ubuntu-latest:
+ name: instrumentation-botocore 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-botocore -- -ra
+
+ py39-test-instrumentation-botocore_ubuntu-latest:
+ name: instrumentation-botocore 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-botocore -- -ra
+
+ py310-test-instrumentation-botocore_ubuntu-latest:
+ name: instrumentation-botocore 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-botocore -- -ra
+
+ py311-test-instrumentation-botocore_ubuntu-latest:
+ name: instrumentation-botocore 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-botocore -- -ra
+
+ py312-test-instrumentation-botocore_ubuntu-latest:
+ name: instrumentation-botocore 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-botocore -- -ra
+
+ py38-test-instrumentation-boto3sqs_ubuntu-latest:
+ name: instrumentation-boto3sqs 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-boto3sqs -- -ra
+
+ py39-test-instrumentation-boto3sqs_ubuntu-latest:
+ name: instrumentation-boto3sqs 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-boto3sqs -- -ra
+
+ py310-test-instrumentation-boto3sqs_ubuntu-latest:
+ name: instrumentation-boto3sqs 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-boto3sqs -- -ra
+
+ py311-test-instrumentation-boto3sqs_ubuntu-latest:
+ name: instrumentation-boto3sqs 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-boto3sqs -- -ra
+
+ py312-test-instrumentation-boto3sqs_ubuntu-latest:
+ name: instrumentation-boto3sqs 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-boto3sqs -- -ra
+
+ pypy3-test-instrumentation-boto3sqs_ubuntu-latest:
+ name: instrumentation-boto3sqs pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-boto3sqs -- -ra
+
+ py38-test-instrumentation-django-0_ubuntu-latest:
+ name: instrumentation-django-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-django-0 -- -ra
+
+ py38-test-instrumentation-django-1_ubuntu-latest:
+ name: instrumentation-django-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-django-1 -- -ra
+
+ py38-test-instrumentation-django-2_ubuntu-latest:
+ name: instrumentation-django-2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-django-2 -- -ra
+
+ py39-test-instrumentation-django-0_ubuntu-latest:
+ name: instrumentation-django-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-django-0 -- -ra
+
+ py39-test-instrumentation-django-1_ubuntu-latest:
+ name: instrumentation-django-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-django-1 -- -ra
+
+ py39-test-instrumentation-django-2_ubuntu-latest:
+ name: instrumentation-django-2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-django-2 -- -ra
+
+ py310-test-instrumentation-django-1_ubuntu-latest:
+ name: instrumentation-django-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-django-1 -- -ra
+
+ py310-test-instrumentation-django-3_ubuntu-latest:
+ name: instrumentation-django-3 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-django-3 -- -ra
+
+ py311-test-instrumentation-django-1_ubuntu-latest:
+ name: instrumentation-django-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-django-1 -- -ra
+
+ py311-test-instrumentation-django-3_ubuntu-latest:
+ name: instrumentation-django-3 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-django-3 -- -ra
+
+ py312-test-instrumentation-django-1_ubuntu-latest:
+ name: instrumentation-django-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-django-1 -- -ra
+
+ py312-test-instrumentation-django-3_ubuntu-latest:
+ name: instrumentation-django-3 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-django-3 -- -ra
+
+ pypy3-test-instrumentation-django-0_ubuntu-latest:
+ name: instrumentation-django-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-django-0 -- -ra
+
+ pypy3-test-instrumentation-django-1_ubuntu-latest:
+ name: instrumentation-django-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-django-1 -- -ra
+
+ py38-test-instrumentation-dbapi_ubuntu-latest:
+ name: instrumentation-dbapi 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-dbapi -- -ra
+
+ py39-test-instrumentation-dbapi_ubuntu-latest:
+ name: instrumentation-dbapi 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-dbapi -- -ra
+
+ py310-test-instrumentation-dbapi_ubuntu-latest:
+ name: instrumentation-dbapi 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-dbapi -- -ra
+
+ py311-test-instrumentation-dbapi_ubuntu-latest:
+ name: instrumentation-dbapi 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-dbapi -- -ra
+
+ py312-test-instrumentation-dbapi_ubuntu-latest:
+ name: instrumentation-dbapi 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-dbapi -- -ra
+
+ pypy3-test-instrumentation-dbapi_ubuntu-latest:
+ name: instrumentation-dbapi pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-dbapi -- -ra
+
+ py38-test-instrumentation-boto_ubuntu-latest:
+ name: instrumentation-boto 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-boto -- -ra
+
+ py39-test-instrumentation-boto_ubuntu-latest:
+ name: instrumentation-boto 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-boto -- -ra
+
+ py310-test-instrumentation-boto_ubuntu-latest:
+ name: instrumentation-boto 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-boto -- -ra
+
+ py311-test-instrumentation-boto_ubuntu-latest:
+ name: instrumentation-boto 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-boto -- -ra
+
+ py38-test-instrumentation-elasticsearch-0_ubuntu-latest:
+ name: instrumentation-elasticsearch-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-elasticsearch-0 -- -ra
+
+ py38-test-instrumentation-elasticsearch-1_ubuntu-latest:
+ name: instrumentation-elasticsearch-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-elasticsearch-1 -- -ra
+
+ py38-test-instrumentation-elasticsearch-2_ubuntu-latest:
+ name: instrumentation-elasticsearch-2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-elasticsearch-2 -- -ra
+
+ py39-test-instrumentation-elasticsearch-0_ubuntu-latest:
+ name: instrumentation-elasticsearch-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-elasticsearch-0 -- -ra
+
+ py39-test-instrumentation-elasticsearch-1_ubuntu-latest:
+ name: instrumentation-elasticsearch-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-elasticsearch-1 -- -ra
+
+ py39-test-instrumentation-elasticsearch-2_ubuntu-latest:
+ name: instrumentation-elasticsearch-2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-elasticsearch-2 -- -ra
+
+ py310-test-instrumentation-elasticsearch-0_ubuntu-latest:
+ name: instrumentation-elasticsearch-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-elasticsearch-0 -- -ra
+
+ py310-test-instrumentation-elasticsearch-1_ubuntu-latest:
+ name: instrumentation-elasticsearch-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-elasticsearch-1 -- -ra
+
+ py310-test-instrumentation-elasticsearch-2_ubuntu-latest:
+ name: instrumentation-elasticsearch-2 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-elasticsearch-2 -- -ra
+
+ py311-test-instrumentation-elasticsearch-0_ubuntu-latest:
+ name: instrumentation-elasticsearch-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-elasticsearch-0 -- -ra
+
+ py311-test-instrumentation-elasticsearch-1_ubuntu-latest:
+ name: instrumentation-elasticsearch-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-elasticsearch-1 -- -ra
+
+ py311-test-instrumentation-elasticsearch-2_ubuntu-latest:
+ name: instrumentation-elasticsearch-2 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-elasticsearch-2 -- -ra
+
+ py312-test-instrumentation-elasticsearch-0_ubuntu-latest:
+ name: instrumentation-elasticsearch-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-elasticsearch-0 -- -ra
+
+ py312-test-instrumentation-elasticsearch-1_ubuntu-latest:
+ name: instrumentation-elasticsearch-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-elasticsearch-1 -- -ra
+
+ py312-test-instrumentation-elasticsearch-2_ubuntu-latest:
+ name: instrumentation-elasticsearch-2 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-elasticsearch-2 -- -ra
+
+ pypy3-test-instrumentation-elasticsearch-0_ubuntu-latest:
+ name: instrumentation-elasticsearch-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-elasticsearch-0 -- -ra
+
+ pypy3-test-instrumentation-elasticsearch-1_ubuntu-latest:
+ name: instrumentation-elasticsearch-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-elasticsearch-1 -- -ra
+
+ pypy3-test-instrumentation-elasticsearch-2_ubuntu-latest:
+ name: instrumentation-elasticsearch-2 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-elasticsearch-2 -- -ra
+
+ py38-test-instrumentation-falcon-0_ubuntu-latest:
+ name: instrumentation-falcon-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-falcon-0 -- -ra
+
+ py38-test-instrumentation-falcon-1_ubuntu-latest:
+ name: instrumentation-falcon-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-falcon-1 -- -ra
+
+ py38-test-instrumentation-falcon-2_ubuntu-latest:
+ name: instrumentation-falcon-2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-falcon-2 -- -ra
+
+ py39-test-instrumentation-falcon-0_ubuntu-latest:
+ name: instrumentation-falcon-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-falcon-0 -- -ra
+
+ py39-test-instrumentation-falcon-1_ubuntu-latest:
+ name: instrumentation-falcon-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-falcon-1 -- -ra
+
+ py39-test-instrumentation-falcon-2_ubuntu-latest:
+ name: instrumentation-falcon-2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-falcon-2 -- -ra
+
+ py310-test-instrumentation-falcon-1_ubuntu-latest:
+ name: instrumentation-falcon-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-falcon-1 -- -ra
+
+ py310-test-instrumentation-falcon-2_ubuntu-latest:
+ name: instrumentation-falcon-2 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-falcon-2 -- -ra
+
+ py311-test-instrumentation-falcon-1_ubuntu-latest:
+ name: instrumentation-falcon-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-falcon-1 -- -ra
+
+ py311-test-instrumentation-falcon-2_ubuntu-latest:
+ name: instrumentation-falcon-2 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-falcon-2 -- -ra
+
+ py312-test-instrumentation-falcon-1_ubuntu-latest:
+ name: instrumentation-falcon-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-falcon-1 -- -ra
+
+ py312-test-instrumentation-falcon-2_ubuntu-latest:
+ name: instrumentation-falcon-2 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-falcon-2 -- -ra
+
+ pypy3-test-instrumentation-falcon-0_ubuntu-latest:
+ name: instrumentation-falcon-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-falcon-0 -- -ra
+
+ pypy3-test-instrumentation-falcon-1_ubuntu-latest:
+ name: instrumentation-falcon-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-falcon-1 -- -ra
+
+ pypy3-test-instrumentation-falcon-2_ubuntu-latest:
+ name: instrumentation-falcon-2 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-falcon-2 -- -ra
+
+ py38-test-instrumentation-fastapi_ubuntu-latest:
+ name: instrumentation-fastapi 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-fastapi -- -ra
+
+ py39-test-instrumentation-fastapi_ubuntu-latest:
+ name: instrumentation-fastapi 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-fastapi -- -ra
+
+ py310-test-instrumentation-fastapi_ubuntu-latest:
+ name: instrumentation-fastapi 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-fastapi -- -ra
+
+ py311-test-instrumentation-fastapi_ubuntu-latest:
+ name: instrumentation-fastapi 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-fastapi -- -ra
+
+ py312-test-instrumentation-fastapi_ubuntu-latest:
+ name: instrumentation-fastapi 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-fastapi -- -ra
+
+ pypy3-test-instrumentation-fastapi_ubuntu-latest:
+ name: instrumentation-fastapi pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-fastapi -- -ra
+
+ py38-test-instrumentation-flask-0_ubuntu-latest:
+ name: instrumentation-flask-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-flask-0 -- -ra
+
+ py38-test-instrumentation-flask-1_ubuntu-latest:
+ name: instrumentation-flask-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-flask-1 -- -ra
+
+ py39-test-instrumentation-flask-0_ubuntu-latest:
+ name: instrumentation-flask-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-flask-0 -- -ra
+
+ py39-test-instrumentation-flask-1_ubuntu-latest:
+ name: instrumentation-flask-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-flask-1 -- -ra
+
+ py310-test-instrumentation-flask-0_ubuntu-latest:
+ name: instrumentation-flask-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-flask-0 -- -ra
+
+ py310-test-instrumentation-flask-1_ubuntu-latest:
+ name: instrumentation-flask-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-flask-1 -- -ra
+
+ py311-test-instrumentation-flask-0_ubuntu-latest:
+ name: instrumentation-flask-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-flask-0 -- -ra
+
+ py311-test-instrumentation-flask-1_ubuntu-latest:
+ name: instrumentation-flask-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-flask-1 -- -ra
+
+ py312-test-instrumentation-flask-0_ubuntu-latest:
+ name: instrumentation-flask-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-flask-0 -- -ra
+
+ py312-test-instrumentation-flask-1_ubuntu-latest:
+ name: instrumentation-flask-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-flask-1 -- -ra
+
+ py38-test-instrumentation-flask-2_ubuntu-latest:
+ name: instrumentation-flask-2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-flask-2 -- -ra
+
+ py39-test-instrumentation-flask-2_ubuntu-latest:
+ name: instrumentation-flask-2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-flask-2 -- -ra
+
+ py310-test-instrumentation-flask-2_ubuntu-latest:
+ name: instrumentation-flask-2 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-flask-2 -- -ra
+
+ py311-test-instrumentation-flask-2_ubuntu-latest:
+ name: instrumentation-flask-2 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-flask-2 -- -ra
+
+ py312-test-instrumentation-flask-2_ubuntu-latest:
+ name: instrumentation-flask-2 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-flask-2 -- -ra
+
+ pypy3-test-instrumentation-flask-0_ubuntu-latest:
+ name: instrumentation-flask-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-flask-0 -- -ra
+
+ pypy3-test-instrumentation-flask-1_ubuntu-latest:
+ name: instrumentation-flask-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-flask-1 -- -ra
+
+ py38-test-instrumentation-urllib_ubuntu-latest:
+ name: instrumentation-urllib 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-urllib -- -ra
+
+ py39-test-instrumentation-urllib_ubuntu-latest:
+ name: instrumentation-urllib 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-urllib -- -ra
+
+ py310-test-instrumentation-urllib_ubuntu-latest:
+ name: instrumentation-urllib 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-urllib -- -ra
+
+ py311-test-instrumentation-urllib_ubuntu-latest:
+ name: instrumentation-urllib 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-urllib -- -ra
+
+ py312-test-instrumentation-urllib_ubuntu-latest:
+ name: instrumentation-urllib 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-urllib -- -ra
+
+ pypy3-test-instrumentation-urllib_ubuntu-latest:
+ name: instrumentation-urllib pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-urllib -- -ra
+
+ py38-test-instrumentation-urllib3-0_ubuntu-latest:
+ name: instrumentation-urllib3-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-urllib3-0 -- -ra
+
+ py38-test-instrumentation-urllib3-1_ubuntu-latest:
+ name: instrumentation-urllib3-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-urllib3-1 -- -ra
+
+ py39-test-instrumentation-urllib3-0_ubuntu-latest:
+ name: instrumentation-urllib3-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-urllib3-0 -- -ra
+
+ py39-test-instrumentation-urllib3-1_ubuntu-latest:
+ name: instrumentation-urllib3-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-urllib3-1 -- -ra
+
+ py310-test-instrumentation-urllib3-0_ubuntu-latest:
+ name: instrumentation-urllib3-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-urllib3-0 -- -ra
+
+ py310-test-instrumentation-urllib3-1_ubuntu-latest:
+ name: instrumentation-urllib3-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-urllib3-1 -- -ra
+
+ py311-test-instrumentation-urllib3-0_ubuntu-latest:
+ name: instrumentation-urllib3-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-urllib3-0 -- -ra
+
+ py311-test-instrumentation-urllib3-1_ubuntu-latest:
+ name: instrumentation-urllib3-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-urllib3-1 -- -ra
+
+ py312-test-instrumentation-urllib3-0_ubuntu-latest:
+ name: instrumentation-urllib3-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-urllib3-0 -- -ra
+
+ py312-test-instrumentation-urllib3-1_ubuntu-latest:
+ name: instrumentation-urllib3-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-urllib3-1 -- -ra
+
+ pypy3-test-instrumentation-urllib3-0_ubuntu-latest:
+ name: instrumentation-urllib3-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-urllib3-0 -- -ra
+
+ pypy3-test-instrumentation-urllib3-1_ubuntu-latest:
+ name: instrumentation-urllib3-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-urllib3-1 -- -ra
+
+ py38-test-instrumentation-requests_ubuntu-latest:
+ name: instrumentation-requests 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-requests -- -ra
+
+ py39-test-instrumentation-requests_ubuntu-latest:
+ name: instrumentation-requests 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-requests -- -ra
+
+ py310-test-instrumentation-requests_ubuntu-latest:
+ name: instrumentation-requests 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-requests -- -ra
+
+ py311-test-instrumentation-requests_ubuntu-latest:
+ name: instrumentation-requests 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-requests -- -ra
+
+ py312-test-instrumentation-requests_ubuntu-latest:
+ name: instrumentation-requests 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-requests -- -ra
+
+ py38-test-instrumentation-starlette_ubuntu-latest:
+ name: instrumentation-starlette 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-starlette -- -ra
+
+ py39-test-instrumentation-starlette_ubuntu-latest:
+ name: instrumentation-starlette 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-starlette -- -ra
+
+ py310-test-instrumentation-starlette_ubuntu-latest:
+ name: instrumentation-starlette 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-starlette -- -ra
+
+ py311-test-instrumentation-starlette_ubuntu-latest:
+ name: instrumentation-starlette 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-starlette -- -ra
+
+ py312-test-instrumentation-starlette_ubuntu-latest:
+ name: instrumentation-starlette 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-starlette -- -ra
+
+ pypy3-test-instrumentation-starlette_ubuntu-latest:
+ name: instrumentation-starlette pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-starlette -- -ra
+
+ py38-test-instrumentation-jinja2_ubuntu-latest:
+ name: instrumentation-jinja2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-jinja2 -- -ra
+
+ py39-test-instrumentation-jinja2_ubuntu-latest:
+ name: instrumentation-jinja2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-jinja2 -- -ra
+
+ py310-test-instrumentation-jinja2_ubuntu-latest:
+ name: instrumentation-jinja2 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-jinja2 -- -ra
+
+ py311-test-instrumentation-jinja2_ubuntu-latest:
+ name: instrumentation-jinja2 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-jinja2 -- -ra
+
+ py312-test-instrumentation-jinja2_ubuntu-latest:
+ name: instrumentation-jinja2 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-jinja2 -- -ra
+
+ pypy3-test-instrumentation-jinja2_ubuntu-latest:
+ name: instrumentation-jinja2 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-jinja2 -- -ra
+
+ py38-test-instrumentation-logging_ubuntu-latest:
+ name: instrumentation-logging 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-logging -- -ra
+
+ py39-test-instrumentation-logging_ubuntu-latest:
+ name: instrumentation-logging 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-logging -- -ra
+
+ py310-test-instrumentation-logging_ubuntu-latest:
+ name: instrumentation-logging 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-logging -- -ra
+
+ py311-test-instrumentation-logging_ubuntu-latest:
+ name: instrumentation-logging 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-logging -- -ra
+
+ py312-test-instrumentation-logging_ubuntu-latest:
+ name: instrumentation-logging 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-logging -- -ra
+
+ pypy3-test-instrumentation-logging_ubuntu-latest:
+ name: instrumentation-logging pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-logging -- -ra
+
+ py38-test-exporter-richconsole_ubuntu-latest:
+ name: exporter-richconsole 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-exporter-richconsole -- -ra
+
+ py39-test-exporter-richconsole_ubuntu-latest:
+ name: exporter-richconsole 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-exporter-richconsole -- -ra
+
+ py310-test-exporter-richconsole_ubuntu-latest:
+ name: exporter-richconsole 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-exporter-richconsole -- -ra
+
+ py311-test-exporter-richconsole_ubuntu-latest:
+ name: exporter-richconsole 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-exporter-richconsole -- -ra
+
+ py312-test-exporter-richconsole_ubuntu-latest:
+ name: exporter-richconsole 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-exporter-richconsole -- -ra
+
+ pypy3-test-exporter-richconsole_ubuntu-latest:
+ name: exporter-richconsole pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-exporter-richconsole -- -ra
+
+ py38-test-exporter-prometheus-remote-write_ubuntu-latest:
+ name: exporter-prometheus-remote-write 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-exporter-prometheus-remote-write -- -ra
+
+ py39-test-exporter-prometheus-remote-write_ubuntu-latest:
+ name: exporter-prometheus-remote-write 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-exporter-prometheus-remote-write -- -ra
+
+ py310-test-exporter-prometheus-remote-write_ubuntu-latest:
+ name: exporter-prometheus-remote-write 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-exporter-prometheus-remote-write -- -ra
+
+ py311-test-exporter-prometheus-remote-write_ubuntu-latest:
+ name: exporter-prometheus-remote-write 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-exporter-prometheus-remote-write -- -ra
+
+ py312-test-exporter-prometheus-remote-write_ubuntu-latest:
+ name: exporter-prometheus-remote-write 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-exporter-prometheus-remote-write -- -ra
+
+ pypy3-test-exporter-prometheus-remote-write_ubuntu-latest:
+ name: exporter-prometheus-remote-write pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-exporter-prometheus-remote-write -- -ra
+
+ py38-test-instrumentation-mysql-0_ubuntu-latest:
+ name: instrumentation-mysql-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-mysql-0 -- -ra
+
+ py38-test-instrumentation-mysql-1_ubuntu-latest:
+ name: instrumentation-mysql-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-mysql-1 -- -ra
+
+ py39-test-instrumentation-mysql-0_ubuntu-latest:
+ name: instrumentation-mysql-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-mysql-0 -- -ra
+
+ py39-test-instrumentation-mysql-1_ubuntu-latest:
+ name: instrumentation-mysql-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-mysql-1 -- -ra
+
+ py310-test-instrumentation-mysql-0_ubuntu-latest:
+ name: instrumentation-mysql-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-mysql-0 -- -ra
+
+ py310-test-instrumentation-mysql-1_ubuntu-latest:
+ name: instrumentation-mysql-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-mysql-1 -- -ra
+
+ py311-test-instrumentation-mysql-0_ubuntu-latest:
+ name: instrumentation-mysql-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-mysql-0 -- -ra
+
+ py311-test-instrumentation-mysql-1_ubuntu-latest:
+ name: instrumentation-mysql-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-mysql-1 -- -ra
+
+ py312-test-instrumentation-mysql-0_ubuntu-latest:
+ name: instrumentation-mysql-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-mysql-0 -- -ra
+
+ py312-test-instrumentation-mysql-1_ubuntu-latest:
+ name: instrumentation-mysql-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-mysql-1 -- -ra
+
+ pypy3-test-instrumentation-mysql-0_ubuntu-latest:
+ name: instrumentation-mysql-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-mysql-0 -- -ra
+
+ pypy3-test-instrumentation-mysql-1_ubuntu-latest:
+ name: instrumentation-mysql-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-mysql-1 -- -ra
+
+ py38-test-instrumentation-mysqlclient_ubuntu-latest:
+ name: instrumentation-mysqlclient 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-mysqlclient -- -ra
+
+ py39-test-instrumentation-mysqlclient_ubuntu-latest:
+ name: instrumentation-mysqlclient 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-mysqlclient -- -ra
+
+ py310-test-instrumentation-mysqlclient_ubuntu-latest:
+ name: instrumentation-mysqlclient 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-mysqlclient -- -ra
+
+ py311-test-instrumentation-mysqlclient_ubuntu-latest:
+ name: instrumentation-mysqlclient 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-mysqlclient -- -ra
+
+ py312-test-instrumentation-mysqlclient_ubuntu-latest:
+ name: instrumentation-mysqlclient 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-mysqlclient -- -ra
+
+ pypy3-test-instrumentation-mysqlclient_ubuntu-latest:
+ name: instrumentation-mysqlclient pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-mysqlclient -- -ra
+
+ py38-test-instrumentation-psycopg2_ubuntu-latest:
+ name: instrumentation-psycopg2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-psycopg2 -- -ra
+
+ py39-test-instrumentation-psycopg2_ubuntu-latest:
+ name: instrumentation-psycopg2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-psycopg2 -- -ra
+
+ py310-test-instrumentation-psycopg2_ubuntu-latest:
+ name: instrumentation-psycopg2 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-psycopg2 -- -ra
+
+ py311-test-instrumentation-psycopg2_ubuntu-latest:
+ name: instrumentation-psycopg2 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-psycopg2 -- -ra
+
+ py312-test-instrumentation-psycopg2_ubuntu-latest:
+ name: instrumentation-psycopg2 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-psycopg2 -- -ra
+
+ py38-test-instrumentation-psycopg_ubuntu-latest:
+ name: instrumentation-psycopg 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-psycopg -- -ra
+
+ py39-test-instrumentation-psycopg_ubuntu-latest:
+ name: instrumentation-psycopg 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-psycopg -- -ra
+
+ py310-test-instrumentation-psycopg_ubuntu-latest:
+ name: instrumentation-psycopg 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-psycopg -- -ra
+
+ py311-test-instrumentation-psycopg_ubuntu-latest:
+ name: instrumentation-psycopg 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-psycopg -- -ra
+
+ py312-test-instrumentation-psycopg_ubuntu-latest:
+ name: instrumentation-psycopg 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-psycopg -- -ra
+
+ pypy3-test-instrumentation-psycopg_ubuntu-latest:
+ name: instrumentation-psycopg pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-psycopg -- -ra
+
+ py38-test-instrumentation-pymemcache-0_ubuntu-latest:
+ name: instrumentation-pymemcache-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pymemcache-0 -- -ra
+
+ py38-test-instrumentation-pymemcache-1_ubuntu-latest:
+ name: instrumentation-pymemcache-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pymemcache-1 -- -ra
+
+ py38-test-instrumentation-pymemcache-2_ubuntu-latest:
+ name: instrumentation-pymemcache-2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pymemcache-2 -- -ra
+
+ py38-test-instrumentation-pymemcache-3_ubuntu-latest:
+ name: instrumentation-pymemcache-3 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pymemcache-3 -- -ra
+
+ py38-test-instrumentation-pymemcache-4_ubuntu-latest:
+ name: instrumentation-pymemcache-4 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pymemcache-4 -- -ra
+
+ py39-test-instrumentation-pymemcache-0_ubuntu-latest:
+ name: instrumentation-pymemcache-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pymemcache-0 -- -ra
+
+ py39-test-instrumentation-pymemcache-1_ubuntu-latest:
+ name: instrumentation-pymemcache-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pymemcache-1 -- -ra
+
+ py39-test-instrumentation-pymemcache-2_ubuntu-latest:
+ name: instrumentation-pymemcache-2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pymemcache-2 -- -ra
+
+ py39-test-instrumentation-pymemcache-3_ubuntu-latest:
+ name: instrumentation-pymemcache-3 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pymemcache-3 -- -ra
+
+ py39-test-instrumentation-pymemcache-4_ubuntu-latest:
+ name: instrumentation-pymemcache-4 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pymemcache-4 -- -ra
+
+ py310-test-instrumentation-pymemcache-0_ubuntu-latest:
+ name: instrumentation-pymemcache-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pymemcache-0 -- -ra
+
+ py310-test-instrumentation-pymemcache-1_ubuntu-latest:
+ name: instrumentation-pymemcache-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pymemcache-1 -- -ra
+
+ py310-test-instrumentation-pymemcache-2_ubuntu-latest:
+ name: instrumentation-pymemcache-2 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pymemcache-2 -- -ra
+
+ py310-test-instrumentation-pymemcache-3_ubuntu-latest:
+ name: instrumentation-pymemcache-3 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pymemcache-3 -- -ra
+
+ py310-test-instrumentation-pymemcache-4_ubuntu-latest:
+ name: instrumentation-pymemcache-4 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pymemcache-4 -- -ra
+
+ py311-test-instrumentation-pymemcache-0_ubuntu-latest:
+ name: instrumentation-pymemcache-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pymemcache-0 -- -ra
+
+ py311-test-instrumentation-pymemcache-1_ubuntu-latest:
+ name: instrumentation-pymemcache-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pymemcache-1 -- -ra
+
+ py311-test-instrumentation-pymemcache-2_ubuntu-latest:
+ name: instrumentation-pymemcache-2 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pymemcache-2 -- -ra
+
+ py311-test-instrumentation-pymemcache-3_ubuntu-latest:
+ name: instrumentation-pymemcache-3 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pymemcache-3 -- -ra
+
+ py311-test-instrumentation-pymemcache-4_ubuntu-latest:
+ name: instrumentation-pymemcache-4 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pymemcache-4 -- -ra
+
+ py312-test-instrumentation-pymemcache-0_ubuntu-latest:
+ name: instrumentation-pymemcache-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pymemcache-0 -- -ra
+
+ py312-test-instrumentation-pymemcache-1_ubuntu-latest:
+ name: instrumentation-pymemcache-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pymemcache-1 -- -ra
+
+ py312-test-instrumentation-pymemcache-2_ubuntu-latest:
+ name: instrumentation-pymemcache-2 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pymemcache-2 -- -ra
+
+ py312-test-instrumentation-pymemcache-3_ubuntu-latest:
+ name: instrumentation-pymemcache-3 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pymemcache-3 -- -ra
diff --git a/.github/workflows/test_1.yml b/.github/workflows/test_1.yml
new file mode 100644
index 0000000000..f7e71dd6b6
--- /dev/null
+++ b/.github/workflows/test_1.yml
@@ -0,0 +1,3689 @@
+# Do not edit this file.
+# This file is generated automatically by executing tox -e generate-workflows
+
+name: Test 1
+
+on:
+ push:
+ branches-ignore:
+ - 'release/*'
+ pull_request:
+
+env:
+ CORE_REPO_SHA: main
+ CONTRIB_REPO_SHA: main
+ PIP_EXISTS_ACTION: w
+
+jobs:
+
+ py312-test-instrumentation-pymemcache-4_ubuntu-latest:
+ name: instrumentation-pymemcache-4 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pymemcache-4 -- -ra
+
+ pypy3-test-instrumentation-pymemcache-0_ubuntu-latest:
+ name: instrumentation-pymemcache-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pymemcache-0 -- -ra
+
+ pypy3-test-instrumentation-pymemcache-1_ubuntu-latest:
+ name: instrumentation-pymemcache-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pymemcache-1 -- -ra
+
+ pypy3-test-instrumentation-pymemcache-2_ubuntu-latest:
+ name: instrumentation-pymemcache-2 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pymemcache-2 -- -ra
+
+ pypy3-test-instrumentation-pymemcache-3_ubuntu-latest:
+ name: instrumentation-pymemcache-3 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pymemcache-3 -- -ra
+
+ pypy3-test-instrumentation-pymemcache-4_ubuntu-latest:
+ name: instrumentation-pymemcache-4 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pymemcache-4 -- -ra
+
+ py38-test-instrumentation-pymongo_ubuntu-latest:
+ name: instrumentation-pymongo 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pymongo -- -ra
+
+ py39-test-instrumentation-pymongo_ubuntu-latest:
+ name: instrumentation-pymongo 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pymongo -- -ra
+
+ py310-test-instrumentation-pymongo_ubuntu-latest:
+ name: instrumentation-pymongo 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pymongo -- -ra
+
+ py311-test-instrumentation-pymongo_ubuntu-latest:
+ name: instrumentation-pymongo 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pymongo -- -ra
+
+ py312-test-instrumentation-pymongo_ubuntu-latest:
+ name: instrumentation-pymongo 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pymongo -- -ra
+
+ pypy3-test-instrumentation-pymongo_ubuntu-latest:
+ name: instrumentation-pymongo pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pymongo -- -ra
+
+ py38-test-instrumentation-pymysql_ubuntu-latest:
+ name: instrumentation-pymysql 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pymysql -- -ra
+
+ py39-test-instrumentation-pymysql_ubuntu-latest:
+ name: instrumentation-pymysql 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pymysql -- -ra
+
+ py310-test-instrumentation-pymysql_ubuntu-latest:
+ name: instrumentation-pymysql 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pymysql -- -ra
+
+ py311-test-instrumentation-pymysql_ubuntu-latest:
+ name: instrumentation-pymysql 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pymysql -- -ra
+
+ py312-test-instrumentation-pymysql_ubuntu-latest:
+ name: instrumentation-pymysql 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pymysql -- -ra
+
+ pypy3-test-instrumentation-pymysql_ubuntu-latest:
+ name: instrumentation-pymysql pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pymysql -- -ra
+
+ py38-test-instrumentation-pyramid_ubuntu-latest:
+ name: instrumentation-pyramid 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-pyramid -- -ra
+
+ py39-test-instrumentation-pyramid_ubuntu-latest:
+ name: instrumentation-pyramid 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-pyramid -- -ra
+
+ py310-test-instrumentation-pyramid_ubuntu-latest:
+ name: instrumentation-pyramid 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-pyramid -- -ra
+
+ py311-test-instrumentation-pyramid_ubuntu-latest:
+ name: instrumentation-pyramid 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-pyramid -- -ra
+
+ py312-test-instrumentation-pyramid_ubuntu-latest:
+ name: instrumentation-pyramid 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-pyramid -- -ra
+
+ pypy3-test-instrumentation-pyramid_ubuntu-latest:
+ name: instrumentation-pyramid pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-pyramid -- -ra
+
+ py38-test-instrumentation-asgi_ubuntu-latest:
+ name: instrumentation-asgi 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-asgi -- -ra
+
+ py39-test-instrumentation-asgi_ubuntu-latest:
+ name: instrumentation-asgi 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-asgi -- -ra
+
+ py310-test-instrumentation-asgi_ubuntu-latest:
+ name: instrumentation-asgi 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-asgi -- -ra
+
+ py311-test-instrumentation-asgi_ubuntu-latest:
+ name: instrumentation-asgi 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-asgi -- -ra
+
+ py312-test-instrumentation-asgi_ubuntu-latest:
+ name: instrumentation-asgi 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-asgi -- -ra
+
+ pypy3-test-instrumentation-asgi_ubuntu-latest:
+ name: instrumentation-asgi pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-asgi -- -ra
+
+ py38-test-instrumentation-asyncpg_ubuntu-latest:
+ name: instrumentation-asyncpg 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-asyncpg -- -ra
+
+ py39-test-instrumentation-asyncpg_ubuntu-latest:
+ name: instrumentation-asyncpg 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-asyncpg -- -ra
+
+ py310-test-instrumentation-asyncpg_ubuntu-latest:
+ name: instrumentation-asyncpg 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-asyncpg -- -ra
+
+ py311-test-instrumentation-asyncpg_ubuntu-latest:
+ name: instrumentation-asyncpg 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-asyncpg -- -ra
+
+ py312-test-instrumentation-asyncpg_ubuntu-latest:
+ name: instrumentation-asyncpg 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-asyncpg -- -ra
+
+ py38-test-instrumentation-sqlite3_ubuntu-latest:
+ name: instrumentation-sqlite3 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-sqlite3 -- -ra
+
+ py39-test-instrumentation-sqlite3_ubuntu-latest:
+ name: instrumentation-sqlite3 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-sqlite3 -- -ra
+
+ py310-test-instrumentation-sqlite3_ubuntu-latest:
+ name: instrumentation-sqlite3 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-sqlite3 -- -ra
+
+ py311-test-instrumentation-sqlite3_ubuntu-latest:
+ name: instrumentation-sqlite3 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-sqlite3 -- -ra
+
+ py312-test-instrumentation-sqlite3_ubuntu-latest:
+ name: instrumentation-sqlite3 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-sqlite3 -- -ra
+
+ pypy3-test-instrumentation-sqlite3_ubuntu-latest:
+ name: instrumentation-sqlite3 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-sqlite3 -- -ra
+
+ py38-test-instrumentation-wsgi_ubuntu-latest:
+ name: instrumentation-wsgi 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-wsgi -- -ra
+
+ py39-test-instrumentation-wsgi_ubuntu-latest:
+ name: instrumentation-wsgi 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-wsgi -- -ra
+
+ py310-test-instrumentation-wsgi_ubuntu-latest:
+ name: instrumentation-wsgi 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-wsgi -- -ra
+
+ py311-test-instrumentation-wsgi_ubuntu-latest:
+ name: instrumentation-wsgi 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-wsgi -- -ra
+
+ py312-test-instrumentation-wsgi_ubuntu-latest:
+ name: instrumentation-wsgi 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-wsgi -- -ra
+
+ pypy3-test-instrumentation-wsgi_ubuntu-latest:
+ name: instrumentation-wsgi pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-wsgi -- -ra
+
+ py38-test-instrumentation-grpc-0_ubuntu-latest:
+ name: instrumentation-grpc-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-grpc-0 -- -ra
+
+ py38-test-instrumentation-grpc-1_ubuntu-latest:
+ name: instrumentation-grpc-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-grpc-1 -- -ra
+
+ py39-test-instrumentation-grpc-0_ubuntu-latest:
+ name: instrumentation-grpc-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-grpc-0 -- -ra
+
+ py39-test-instrumentation-grpc-1_ubuntu-latest:
+ name: instrumentation-grpc-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-grpc-1 -- -ra
+
+ py310-test-instrumentation-grpc-0_ubuntu-latest:
+ name: instrumentation-grpc-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-grpc-0 -- -ra
+
+ py310-test-instrumentation-grpc-1_ubuntu-latest:
+ name: instrumentation-grpc-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-grpc-1 -- -ra
+
+ py311-test-instrumentation-grpc-0_ubuntu-latest:
+ name: instrumentation-grpc-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-grpc-0 -- -ra
+
+ py311-test-instrumentation-grpc-1_ubuntu-latest:
+ name: instrumentation-grpc-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-grpc-1 -- -ra
+
+ py312-test-instrumentation-grpc-0_ubuntu-latest:
+ name: instrumentation-grpc-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-grpc-0 -- -ra
+
+ py312-test-instrumentation-grpc-1_ubuntu-latest:
+ name: instrumentation-grpc-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-grpc-1 -- -ra
+
+ py38-test-instrumentation-sqlalchemy-1_ubuntu-latest:
+ name: instrumentation-sqlalchemy-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-sqlalchemy-1 -- -ra
+
+ py39-test-instrumentation-sqlalchemy-1_ubuntu-latest:
+ name: instrumentation-sqlalchemy-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-sqlalchemy-1 -- -ra
+
+ py310-test-instrumentation-sqlalchemy-1_ubuntu-latest:
+ name: instrumentation-sqlalchemy-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-sqlalchemy-1 -- -ra
+
+ py311-test-instrumentation-sqlalchemy-1_ubuntu-latest:
+ name: instrumentation-sqlalchemy-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-sqlalchemy-1 -- -ra
+
+ py312-test-instrumentation-sqlalchemy-1_ubuntu-latest:
+ name: instrumentation-sqlalchemy-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-sqlalchemy-1 -- -ra
+
+ pypy3-test-instrumentation-sqlalchemy-0_ubuntu-latest:
+ name: instrumentation-sqlalchemy-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-sqlalchemy-0 -- -ra
+
+ pypy3-test-instrumentation-sqlalchemy-1_ubuntu-latest:
+ name: instrumentation-sqlalchemy-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-sqlalchemy-1 -- -ra
+
+ py38-test-instrumentation-redis_ubuntu-latest:
+ name: instrumentation-redis 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-redis -- -ra
+
+ py39-test-instrumentation-redis_ubuntu-latest:
+ name: instrumentation-redis 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-redis -- -ra
+
+ py310-test-instrumentation-redis_ubuntu-latest:
+ name: instrumentation-redis 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-redis -- -ra
+
+ py311-test-instrumentation-redis_ubuntu-latest:
+ name: instrumentation-redis 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-redis -- -ra
+
+ py312-test-instrumentation-redis_ubuntu-latest:
+ name: instrumentation-redis 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-redis -- -ra
+
+ pypy3-test-instrumentation-redis_ubuntu-latest:
+ name: instrumentation-redis pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-redis -- -ra
+
+ py38-test-instrumentation-remoulade_ubuntu-latest:
+ name: instrumentation-remoulade 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-remoulade -- -ra
+
+ py39-test-instrumentation-remoulade_ubuntu-latest:
+ name: instrumentation-remoulade 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-remoulade -- -ra
+
+ py310-test-instrumentation-remoulade_ubuntu-latest:
+ name: instrumentation-remoulade 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-remoulade -- -ra
+
+ py311-test-instrumentation-remoulade_ubuntu-latest:
+ name: instrumentation-remoulade 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-remoulade -- -ra
+
+ py312-test-instrumentation-remoulade_ubuntu-latest:
+ name: instrumentation-remoulade 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-remoulade -- -ra
+
+ py38-test-instrumentation-celery_ubuntu-latest:
+ name: instrumentation-celery 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-celery -- -ra
+
+ py39-test-instrumentation-celery_ubuntu-latest:
+ name: instrumentation-celery 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-celery -- -ra
+
+ py310-test-instrumentation-celery_ubuntu-latest:
+ name: instrumentation-celery 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-celery -- -ra
+
+ py311-test-instrumentation-celery_ubuntu-latest:
+ name: instrumentation-celery 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-celery -- -ra
+
+ py312-test-instrumentation-celery_ubuntu-latest:
+ name: instrumentation-celery 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-celery -- -ra
+
+ pypy3-test-instrumentation-celery_ubuntu-latest:
+ name: instrumentation-celery pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-celery -- -ra
+
+ py38-test-instrumentation-system-metrics_ubuntu-latest:
+ name: instrumentation-system-metrics 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-system-metrics -- -ra
+
+ py39-test-instrumentation-system-metrics_ubuntu-latest:
+ name: instrumentation-system-metrics 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-system-metrics -- -ra
+
+ py310-test-instrumentation-system-metrics_ubuntu-latest:
+ name: instrumentation-system-metrics 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-system-metrics -- -ra
+
+ py311-test-instrumentation-system-metrics_ubuntu-latest:
+ name: instrumentation-system-metrics 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-system-metrics -- -ra
+
+ py312-test-instrumentation-system-metrics_ubuntu-latest:
+ name: instrumentation-system-metrics 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-system-metrics -- -ra
+
+ pypy3-test-instrumentation-system-metrics_ubuntu-latest:
+ name: instrumentation-system-metrics pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-system-metrics -- -ra
+
+ py38-test-instrumentation-threading_ubuntu-latest:
+ name: instrumentation-threading 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-threading -- -ra
+
+ py39-test-instrumentation-threading_ubuntu-latest:
+ name: instrumentation-threading 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-threading -- -ra
+
+ py310-test-instrumentation-threading_ubuntu-latest:
+ name: instrumentation-threading 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-threading -- -ra
+
+ py311-test-instrumentation-threading_ubuntu-latest:
+ name: instrumentation-threading 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-threading -- -ra
+
+ py312-test-instrumentation-threading_ubuntu-latest:
+ name: instrumentation-threading 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-threading -- -ra
+
+ pypy3-test-instrumentation-threading_ubuntu-latest:
+ name: instrumentation-threading pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-threading -- -ra
+
+ py38-test-instrumentation-tornado_ubuntu-latest:
+ name: instrumentation-tornado 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-tornado -- -ra
+
+ py39-test-instrumentation-tornado_ubuntu-latest:
+ name: instrumentation-tornado 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-tornado -- -ra
+
+ py310-test-instrumentation-tornado_ubuntu-latest:
+ name: instrumentation-tornado 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-tornado -- -ra
+
+ py311-test-instrumentation-tornado_ubuntu-latest:
+ name: instrumentation-tornado 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-tornado -- -ra
+
+ py312-test-instrumentation-tornado_ubuntu-latest:
+ name: instrumentation-tornado 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-tornado -- -ra
+
+ pypy3-test-instrumentation-tornado_ubuntu-latest:
+ name: instrumentation-tornado pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-tornado -- -ra
+
+ py38-test-instrumentation-tortoiseorm_ubuntu-latest:
+ name: instrumentation-tortoiseorm 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-tortoiseorm -- -ra
+
+ py39-test-instrumentation-tortoiseorm_ubuntu-latest:
+ name: instrumentation-tortoiseorm 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-tortoiseorm -- -ra
+
+ py310-test-instrumentation-tortoiseorm_ubuntu-latest:
+ name: instrumentation-tortoiseorm 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-tortoiseorm -- -ra
+
+ py311-test-instrumentation-tortoiseorm_ubuntu-latest:
+ name: instrumentation-tortoiseorm 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-tortoiseorm -- -ra
+
+ py312-test-instrumentation-tortoiseorm_ubuntu-latest:
+ name: instrumentation-tortoiseorm 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-tortoiseorm -- -ra
+
+ pypy3-test-instrumentation-tortoiseorm_ubuntu-latest:
+ name: instrumentation-tortoiseorm pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-tortoiseorm -- -ra
+
+ py38-test-instrumentation-httpx-0_ubuntu-latest:
+ name: instrumentation-httpx-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-httpx-0 -- -ra
+
+ py38-test-instrumentation-httpx-1_ubuntu-latest:
+ name: instrumentation-httpx-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-httpx-1 -- -ra
+
+ py39-test-instrumentation-httpx-0_ubuntu-latest:
+ name: instrumentation-httpx-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-httpx-0 -- -ra
+
+ py39-test-instrumentation-httpx-1_ubuntu-latest:
+ name: instrumentation-httpx-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-httpx-1 -- -ra
+
+ py310-test-instrumentation-httpx-0_ubuntu-latest:
+ name: instrumentation-httpx-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-httpx-0 -- -ra
+
+ py310-test-instrumentation-httpx-1_ubuntu-latest:
+ name: instrumentation-httpx-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-httpx-1 -- -ra
+
+ py311-test-instrumentation-httpx-0_ubuntu-latest:
+ name: instrumentation-httpx-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-httpx-0 -- -ra
+
+ py311-test-instrumentation-httpx-1_ubuntu-latest:
+ name: instrumentation-httpx-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-httpx-1 -- -ra
+
+ py312-test-instrumentation-httpx-0_ubuntu-latest:
+ name: instrumentation-httpx-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-httpx-0 -- -ra
+
+ py312-test-instrumentation-httpx-1_ubuntu-latest:
+ name: instrumentation-httpx-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-httpx-1 -- -ra
+
+ pypy3-test-instrumentation-httpx-0_ubuntu-latest:
+ name: instrumentation-httpx-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-httpx-0 -- -ra
+
+ pypy3-test-instrumentation-httpx-1_ubuntu-latest:
+ name: instrumentation-httpx-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-httpx-1 -- -ra
+
+ py38-test-util-http_ubuntu-latest:
+ name: util-http 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-util-http -- -ra
+
+ py39-test-util-http_ubuntu-latest:
+ name: util-http 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-util-http -- -ra
+
+ py310-test-util-http_ubuntu-latest:
+ name: util-http 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-util-http -- -ra
+
+ py311-test-util-http_ubuntu-latest:
+ name: util-http 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-util-http -- -ra
+
+ py312-test-util-http_ubuntu-latest:
+ name: util-http 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-util-http -- -ra
+
+ pypy3-test-util-http_ubuntu-latest:
+ name: util-http pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-util-http -- -ra
+
+ py38-test-propagator-aws-xray_ubuntu-latest:
+ name: propagator-aws-xray 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-propagator-aws-xray -- -ra
+
+ py39-test-propagator-aws-xray_ubuntu-latest:
+ name: propagator-aws-xray 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-propagator-aws-xray -- -ra
+
+ py310-test-propagator-aws-xray_ubuntu-latest:
+ name: propagator-aws-xray 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-propagator-aws-xray -- -ra
+
+ py311-test-propagator-aws-xray_ubuntu-latest:
+ name: propagator-aws-xray 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-propagator-aws-xray -- -ra
+
+ py312-test-propagator-aws-xray_ubuntu-latest:
+ name: propagator-aws-xray 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-propagator-aws-xray -- -ra
+
+ pypy3-test-propagator-aws-xray_ubuntu-latest:
+ name: propagator-aws-xray pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-propagator-aws-xray -- -ra
+
+ py38-test-propagator-ot-trace_ubuntu-latest:
+ name: propagator-ot-trace 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-propagator-ot-trace -- -ra
+
+ py39-test-propagator-ot-trace_ubuntu-latest:
+ name: propagator-ot-trace 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-propagator-ot-trace -- -ra
+
+ py310-test-propagator-ot-trace_ubuntu-latest:
+ name: propagator-ot-trace 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-propagator-ot-trace -- -ra
+
+ py311-test-propagator-ot-trace_ubuntu-latest:
+ name: propagator-ot-trace 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-propagator-ot-trace -- -ra
+
+ py312-test-propagator-ot-trace_ubuntu-latest:
+ name: propagator-ot-trace 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-propagator-ot-trace -- -ra
+
+ pypy3-test-propagator-ot-trace_ubuntu-latest:
+ name: propagator-ot-trace pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-propagator-ot-trace -- -ra
+
+ py38-test-instrumentation-sio-pika-0_ubuntu-latest:
+ name: instrumentation-sio-pika-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-sio-pika-0 -- -ra
+
+ py38-test-instrumentation-sio-pika-1_ubuntu-latest:
+ name: instrumentation-sio-pika-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-sio-pika-1 -- -ra
+
+ py39-test-instrumentation-sio-pika-0_ubuntu-latest:
+ name: instrumentation-sio-pika-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-sio-pika-0 -- -ra
+
+ py39-test-instrumentation-sio-pika-1_ubuntu-latest:
+ name: instrumentation-sio-pika-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-sio-pika-1 -- -ra
+
+ py310-test-instrumentation-sio-pika-0_ubuntu-latest:
+ name: instrumentation-sio-pika-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-sio-pika-0 -- -ra
+
+ py310-test-instrumentation-sio-pika-1_ubuntu-latest:
+ name: instrumentation-sio-pika-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-sio-pika-1 -- -ra
+
+ py311-test-instrumentation-sio-pika-0_ubuntu-latest:
+ name: instrumentation-sio-pika-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-sio-pika-0 -- -ra
+
+ py311-test-instrumentation-sio-pika-1_ubuntu-latest:
+ name: instrumentation-sio-pika-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-sio-pika-1 -- -ra
+
+ py312-test-instrumentation-sio-pika-0_ubuntu-latest:
+ name: instrumentation-sio-pika-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-sio-pika-0 -- -ra
+
+ py312-test-instrumentation-sio-pika-1_ubuntu-latest:
+ name: instrumentation-sio-pika-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-sio-pika-1 -- -ra
+
+ pypy3-test-instrumentation-sio-pika-0_ubuntu-latest:
+ name: instrumentation-sio-pika-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-sio-pika-0 -- -ra
+
+ pypy3-test-instrumentation-sio-pika-1_ubuntu-latest:
+ name: instrumentation-sio-pika-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-sio-pika-1 -- -ra
+
+ py38-test-instrumentation-aio-pika-0_ubuntu-latest:
+ name: instrumentation-aio-pika-0 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aio-pika-0 -- -ra
+
+ py38-test-instrumentation-aio-pika-1_ubuntu-latest:
+ name: instrumentation-aio-pika-1 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aio-pika-1 -- -ra
+
+ py38-test-instrumentation-aio-pika-2_ubuntu-latest:
+ name: instrumentation-aio-pika-2 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aio-pika-2 -- -ra
+
+ py38-test-instrumentation-aio-pika-3_ubuntu-latest:
+ name: instrumentation-aio-pika-3 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-aio-pika-3 -- -ra
+
+ py39-test-instrumentation-aio-pika-0_ubuntu-latest:
+ name: instrumentation-aio-pika-0 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aio-pika-0 -- -ra
+
+ py39-test-instrumentation-aio-pika-1_ubuntu-latest:
+ name: instrumentation-aio-pika-1 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aio-pika-1 -- -ra
+
+ py39-test-instrumentation-aio-pika-2_ubuntu-latest:
+ name: instrumentation-aio-pika-2 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aio-pika-2 -- -ra
+
+ py39-test-instrumentation-aio-pika-3_ubuntu-latest:
+ name: instrumentation-aio-pika-3 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-aio-pika-3 -- -ra
+
+ py310-test-instrumentation-aio-pika-0_ubuntu-latest:
+ name: instrumentation-aio-pika-0 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aio-pika-0 -- -ra
+
+ py310-test-instrumentation-aio-pika-1_ubuntu-latest:
+ name: instrumentation-aio-pika-1 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aio-pika-1 -- -ra
+
+ py310-test-instrumentation-aio-pika-2_ubuntu-latest:
+ name: instrumentation-aio-pika-2 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aio-pika-2 -- -ra
+
+ py310-test-instrumentation-aio-pika-3_ubuntu-latest:
+ name: instrumentation-aio-pika-3 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-aio-pika-3 -- -ra
+
+ py311-test-instrumentation-aio-pika-0_ubuntu-latest:
+ name: instrumentation-aio-pika-0 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aio-pika-0 -- -ra
+
+ py311-test-instrumentation-aio-pika-1_ubuntu-latest:
+ name: instrumentation-aio-pika-1 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aio-pika-1 -- -ra
+
+ py311-test-instrumentation-aio-pika-2_ubuntu-latest:
+ name: instrumentation-aio-pika-2 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aio-pika-2 -- -ra
+
+ py311-test-instrumentation-aio-pika-3_ubuntu-latest:
+ name: instrumentation-aio-pika-3 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-aio-pika-3 -- -ra
+
+ py312-test-instrumentation-aio-pika-0_ubuntu-latest:
+ name: instrumentation-aio-pika-0 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aio-pika-0 -- -ra
+
+ py312-test-instrumentation-aio-pika-1_ubuntu-latest:
+ name: instrumentation-aio-pika-1 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aio-pika-1 -- -ra
+
+ py312-test-instrumentation-aio-pika-2_ubuntu-latest:
+ name: instrumentation-aio-pika-2 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aio-pika-2 -- -ra
+
+ py312-test-instrumentation-aio-pika-3_ubuntu-latest:
+ name: instrumentation-aio-pika-3 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-aio-pika-3 -- -ra
+
+ pypy3-test-instrumentation-aio-pika-0_ubuntu-latest:
+ name: instrumentation-aio-pika-0 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-aio-pika-0 -- -ra
+
+ pypy3-test-instrumentation-aio-pika-1_ubuntu-latest:
+ name: instrumentation-aio-pika-1 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-aio-pika-1 -- -ra
+
+ pypy3-test-instrumentation-aio-pika-2_ubuntu-latest:
+ name: instrumentation-aio-pika-2 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-aio-pika-2 -- -ra
+
+ pypy3-test-instrumentation-aio-pika-3_ubuntu-latest:
+ name: instrumentation-aio-pika-3 pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-aio-pika-3 -- -ra
+
+ py38-test-instrumentation-kafka-python_ubuntu-latest:
+ name: instrumentation-kafka-python 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-kafka-python -- -ra
+
+ py39-test-instrumentation-kafka-python_ubuntu-latest:
+ name: instrumentation-kafka-python 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-kafka-python -- -ra
+
+ py310-test-instrumentation-kafka-python_ubuntu-latest:
+ name: instrumentation-kafka-python 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-kafka-python -- -ra
+
+ py311-test-instrumentation-kafka-python_ubuntu-latest:
+ name: instrumentation-kafka-python 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-kafka-python -- -ra
+
+ py38-test-instrumentation-kafka-pythonng_ubuntu-latest:
+ name: instrumentation-kafka-pythonng 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-kafka-pythonng -- -ra
+
+ py39-test-instrumentation-kafka-pythonng_ubuntu-latest:
+ name: instrumentation-kafka-pythonng 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-kafka-pythonng -- -ra
+
+ py310-test-instrumentation-kafka-pythonng_ubuntu-latest:
+ name: instrumentation-kafka-pythonng 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-kafka-pythonng -- -ra
+
+ py311-test-instrumentation-kafka-pythonng_ubuntu-latest:
+ name: instrumentation-kafka-pythonng 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-kafka-pythonng -- -ra
+
+ py312-test-instrumentation-kafka-pythonng_ubuntu-latest:
+ name: instrumentation-kafka-pythonng 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-kafka-pythonng -- -ra
+
+ pypy3-test-instrumentation-kafka-python_ubuntu-latest:
+ name: instrumentation-kafka-python pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-kafka-python -- -ra
+
+ pypy3-test-instrumentation-kafka-pythonng_ubuntu-latest:
+ name: instrumentation-kafka-pythonng pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-kafka-pythonng -- -ra
+
+ py38-test-instrumentation-confluent-kafka_ubuntu-latest:
+ name: instrumentation-confluent-kafka 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-confluent-kafka -- -ra
+
+ py39-test-instrumentation-confluent-kafka_ubuntu-latest:
+ name: instrumentation-confluent-kafka 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-confluent-kafka -- -ra
+
+ py310-test-instrumentation-confluent-kafka_ubuntu-latest:
+ name: instrumentation-confluent-kafka 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-confluent-kafka -- -ra
+
+ py311-test-instrumentation-confluent-kafka_ubuntu-latest:
+ name: instrumentation-confluent-kafka 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-confluent-kafka -- -ra
+
+ py312-test-instrumentation-confluent-kafka_ubuntu-latest:
+ name: instrumentation-confluent-kafka 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-confluent-kafka -- -ra
+
+ py38-test-instrumentation-asyncio_ubuntu-latest:
+ name: instrumentation-asyncio 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-asyncio -- -ra
+
+ py39-test-instrumentation-asyncio_ubuntu-latest:
+ name: instrumentation-asyncio 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-asyncio -- -ra
+
+ py310-test-instrumentation-asyncio_ubuntu-latest:
+ name: instrumentation-asyncio 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-asyncio -- -ra
+
+ py311-test-instrumentation-asyncio_ubuntu-latest:
+ name: instrumentation-asyncio 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-asyncio -- -ra
+
+ py312-test-instrumentation-asyncio_ubuntu-latest:
+ name: instrumentation-asyncio 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-asyncio -- -ra
+
+ py38-test-instrumentation-cassandra_ubuntu-latest:
+ name: instrumentation-cassandra 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-instrumentation-cassandra -- -ra
+
+ py39-test-instrumentation-cassandra_ubuntu-latest:
+ name: instrumentation-cassandra 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-instrumentation-cassandra -- -ra
+
+ py310-test-instrumentation-cassandra_ubuntu-latest:
+ name: instrumentation-cassandra 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-instrumentation-cassandra -- -ra
+
+ py311-test-instrumentation-cassandra_ubuntu-latest:
+ name: instrumentation-cassandra 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-instrumentation-cassandra -- -ra
+
+ py312-test-instrumentation-cassandra_ubuntu-latest:
+ name: instrumentation-cassandra 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-instrumentation-cassandra -- -ra
+
+ pypy3-test-instrumentation-cassandra_ubuntu-latest:
+ name: instrumentation-cassandra pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-instrumentation-cassandra -- -ra
+
+ py38-test-processor-baggage_ubuntu-latest:
+ name: processor-baggage 3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py38-test-processor-baggage -- -ra
+
+ py39-test-processor-baggage_ubuntu-latest:
+ name: processor-baggage 3.9 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.9
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.9"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py39-test-processor-baggage -- -ra
+
+ py310-test-processor-baggage_ubuntu-latest:
+ name: processor-baggage 3.10 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.10
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.10"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py310-test-processor-baggage -- -ra
+
+ py311-test-processor-baggage_ubuntu-latest:
+ name: processor-baggage 3.11 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.11
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.11"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py311-test-processor-baggage -- -ra
+
+ py312-test-processor-baggage_ubuntu-latest:
+ name: processor-baggage 3.12 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python 3.12
+ uses: actions/setup-python@v5
+ with:
+ python-version: "3.12"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e py312-test-processor-baggage -- -ra
+
+ pypy3-test-processor-baggage_ubuntu-latest:
+ name: processor-baggage pypy-3.8 Ubuntu
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout repo @ SHA - ${{ github.sha }}
+ uses: actions/checkout@v4
+
+ - name: Set up Python pypy-3.8
+ uses: actions/setup-python@v5
+ with:
+ python-version: "pypy-3.8"
+
+ - name: Install tox
+ run: pip install tox
+
+ - name: Run tests
+ run: tox -e pypy3-test-processor-baggage -- -ra
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3b7bb3153d..48ec62bf87 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
+## Version 1.27.0/0.48b0 ()
+
+### Added
+
+- `opentelemetry-instrumentation-kafka-python` Instrument temporary fork, kafka-python-ng
+ inside kafka-python's instrumentation
+ ([#2537](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2537))
+- `opentelemetry-instrumentation-asgi`, `opentelemetry-instrumentation-fastapi` Add ability to disable internal HTTP send and receive spans
+ ([#2802](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2802))
+
+### Breaking changes
+
+- `opentelemetry-bootstrap` Remove `opentelemetry-instrumentation-aws-lambda` from the defaults instrumentations
+ ([#2786](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2786))
+
+### Fixed
+
+- `opentelemetry-instrumentation-httpx` fix handling of async hooks
+ ([#2823](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2823))
+- `opentelemetry-instrumentation-system-metrics` fix `process.runtime.cpu.utilization` values to be shown in range of 0 to 1
+ ([#2812](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2812))
+- `opentelemetry-instrumentation-fastapi` fix `fastapi` auto-instrumentation by removing `fastapi-slim` support, `fastapi-slim` itself is discontinued from maintainers
+ ([#2783](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2783))
+- `opentelemetry-instrumentation-aws-lambda` Avoid exception when a handler is not present.
+ ([#2750](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2750))
+- `opentelemetry-instrumentation-django` Fix regression - `http.target` re-added back to old semconv duration metrics
+ ([#2746](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2746))
+- `opentelemetry-instrumentation-asgi` do not set `url.full` attribute for server spans
+ ([#2735](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2735))
+- `opentelemetry-instrumentation-grpc` Fixes the issue with the gRPC instrumentation not working with the 1.63.0 and higher version of gRPC
+ ([#2483](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2484))
+- `opentelemetry-instrumentation-aws-lambda` Fixing w3c baggage support
+ ([#2589](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2589))
+- `opentelemetry-instrumentation-celery` propagates baggage
+ ([#2385](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2385))
+- `opentelemetry-instrumentation-asyncio` Fixes async generator coroutines not being awaited
+ ([#2792](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2792))
+- `opentelemetry-instrumentation-tornado` Handle http client exception and record exception info into span
+ ([#2563](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2563))
+- `opentelemetry-instrumentation` fix `http.host` new http semantic convention mapping to depend on `kind` of span
+ ([#2814](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2814))
+- `opentelemetry-instrumentation` Fix the description of `http.server.duration` and `http.server.request.duration`
+ ([#2753](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2753))
+- `opentelemetry-instrumentation-grpc` Fix grpc supported version
+ ([#2845](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2845))
+
## Version 1.26.0/0.47b0 (2024-07-23)
### Added
@@ -47,6 +93,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2715](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2715))
- `opentelemetry-instrumentation-django` Implement new semantic convention opt-in with stable http semantic conventions
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
+- `opentelemetry-instrumentation-urllib` Implement new semantic convention opt-in migration
+ ([#2736](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2736))
### Breaking changes
@@ -62,6 +110,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2682](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2682))
- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `django` middleware
([#2714](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2714))
+- Populate `{method}` as `HTTP` on `_OTHER` methods from scope for `urllib` instrumentation
+ ([#2736](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2736))
- `opentelemetry-instrumentation-httpx`, `opentelemetry-instrumentation-aiohttp-client`,
`opentelemetry-instrumentation-requests` Populate `{method}` as `HTTP` on `_OTHER` methods
([#2726](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2726))
@@ -98,7 +148,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2610](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2610))
- `opentelemetry-instrumentation-asgi` Bugfix: Middleware did not set status code attribute on duration metrics for non-recording spans.
([#2627](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2627))
-
+- `opentelemetry-instrumentation-mysql` Add support for `mysql-connector-python` v9
+ ([#2751](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2751))
## Version 1.25.0/0.46b0 (2024-05-31)
@@ -192,6 +243,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#2367](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2367))
+### Added
+- `opentelemetry-instrumentation-fastapi` Add support for configuring header extraction via runtime constructor parameters
+ ([#2241](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2241))
+
## Version 1.23.0/0.44b0 (2024-02-23)
- Drop support for 3.7
@@ -212,6 +267,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- `opentelemetry-instrumentation-psycopg` Initial release for psycopg 3.x
+- `opentelemetry-instrumentation-asgi` Add support for configuring ASGI middleware header extraction via runtime constructor parameters
+ ([#2026](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2026))
## Version 1.22.0/0.43b0 (2023-12-14)
@@ -251,8 +308,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#1948](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1948))
- Added schema_url (`"https://opentelemetry.io/schemas/1.11.0"`) to all metrics and traces
([#1977](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/1977))
-- Add support for configuring ASGI middleware header extraction via runtime constructor parameters
- ([#2026](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/2026))
### Fixed
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8ab75ce1c6..61f261f001 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -15,7 +15,7 @@ and [**Maintainer**](https://github.com/open-telemetry/community/blob/main/commu
Before you can contribute, you will need to sign the [Contributor License Agreement](https://docs.linuxfoundation.org/lfx/easycla/contributors).
-Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-telemetry/community/blob/main/CONTRIBUTING.md).
+Please also read the [OpenTelemetry Contributor Guide](https://github.com/open-telemetry/community/blob/main/guides/contributor/README.md).
## Index
@@ -235,7 +235,7 @@ Some of the tox targets install packages from the [OpenTelemetry Python Core Rep
CORE_REPO_SHA=c49ad57bfe35cfc69bfa863d74058ca9bec55fc3 tox
```
-The continuous integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test.yml#L9).
+The continuous integration overrides that environment variable with as per the configuration [here](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/main/.github/workflows/test_0.yml#L14).
## Style Guide
@@ -250,7 +250,10 @@ The continuous integration overrides that environment variable with as per the c
Below is a checklist of things to be mindful of when implementing a new instrumentation or working on a specific instrumentation. It is one of our goals as a community to keep the implementation specific details of instrumentations as similar across the board as possible for ease of testing and feature parity. It is also good to abstract as much common functionality as possible.
- Follow semantic conventions
- - The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/opentelemetry-specification/tree/main/specification/semantic-conventions.md)
+ - The instrumentation should follow the semantic conventions defined [here](https://github.com/open-telemetry/semantic-conventions/tree/main/docs).
+ - To ensure consistency, we encourage contributions that align with [STABLE](https://opentelemetry.io/docs/specs/otel/document-status/#lifecycle-status) semantic conventions if available. This approach helps us avoid potential confusion and reduces the need to support multiple outdated versions of semantic conventions. However, we are still open to considering exceptional cases where changes are well justified.
+ - Contributions related to outdated HTTP semantic conventions (conventions prior to becoming [stable](https://github.com/open-telemetry/semantic-conventions/tree/v1.23.0)) will likely be discouraged, as they increase complexity and the potential for misconceptions.
+- Contains a name that is not already claimed in [Pypi](https://pypi.org/). Contact a maintainer, bring the issue up in the weekly Python SIG or create a ticket in Pypi if a desired name has already been taken.
- Extends from [BaseInstrumentor](https://github.com/open-telemetry/opentelemetry-python-contrib/blob/2518a4ac07cb62ad6587dd8f6cbb5f8663a7e179/opentelemetry-instrumentation/src/opentelemetry/instrumentation/instrumentor.py#L35)
- Supports auto-instrumentation
- Add an entry point (ex. )
@@ -272,6 +275,7 @@ Below is a checklist of things to be mindful of when implementing a new instrume
- Isolate sync and async test
- For synchronous tests, the typical test case class is inherited from `opentelemetry.test.test_base.TestBase`. However, if you want to write asynchronous tests, the test case class should inherit also from `IsolatedAsyncioTestCase`. Adding asynchronous tests to a common test class can lead to tests passing without actually running, which can be misleading.
- ex.
+- All instrumentations have the same version. If you are going to develop a new instrumentation it would probably have `X.Y.dev` version and depends on `opentelemetry-instrumentation` and `opentelemetry-semantic-conventions` for the same version. That means that if you want to install your instrumentation you need to install its dependencies from this repo and the core repo also from git.
## Expectations from contributors
diff --git a/README.md b/README.md
index dcb2ebbba5..1a2aaf4f8a 100644
--- a/README.md
+++ b/README.md
@@ -20,8 +20,11 @@
-
-
+
+
+
+
+
@@ -109,12 +112,10 @@ Meeting notes are available as a public [Google doc](https://docs.google.com/doc
Approvers ([@open-telemetry/python-approvers](https://github.com/orgs/open-telemetry/teams/python-approvers)):
-- [Aaron Abbott](https://github.com/aabmass), Google
- [EmÃdio Neto](https://github.com/emdneto), Zenvia
- [Jeremy Voss](https://github.com/jeremydvoss), Microsoft
- [Owais Lone](https://github.com/owais), Splunk
- [Pablo Collins](https://github.com/pmcollins), Splunk
-- [Riccardo Magliocchetti](https://github.com/xrmx), Elastic
- [Sanket Mehta](https://github.com/sanketmehta28), Cisco
- [Srikanth Chekuri](https://github.com/srikanthccv), signoz.io
- [Tammy Baylis](https://github.com/tammy-baylis-swi), SolarWinds
@@ -131,8 +132,10 @@ Emeritus Approvers:
Maintainers ([@open-telemetry/python-maintainers](https://github.com/orgs/open-telemetry/teams/python-maintainers)):
+- [Aaron Abbott](https://github.com/aabmass), Google
- [Diego Hurtado](https://github.com/ocelotl), Lightstep
- [Leighton Chen](https://github.com/lzchen), Microsoft
+- [Riccardo Magliocchetti](https://github.com/xrmx), Elastic
- [Shalev Roda](https://github.com/shalevr), Cisco
Emeritus Maintainers:
diff --git a/RELEASING.md b/RELEASING.md
index 256674d1b8..5a359159fb 100644
--- a/RELEASING.md
+++ b/RELEASING.md
@@ -90,6 +90,10 @@
.
If the build has not run automatically, it can be manually trigger via the readthedocs interface.
+## Releasing dev version of new packages to claim namespace
+
+When a contribution introduces a new package, in order to mitigate name-squatting incidents, release the current development version of the new package under the `opentelemetry` user to simply claim the namespace. This should be done shortly after the PR that introduced this package has been merged into `main`.
+
## Troubleshooting
### Publish failed
diff --git a/_template/version.py b/_template/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/_template/version.py
+++ b/_template/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/eachdist.ini b/eachdist.ini
index 2bcbde9c7c..79c865b334 100644
--- a/eachdist.ini
+++ b/eachdist.ini
@@ -16,7 +16,7 @@ sortfirst=
ext/*
[stable]
-version=1.27.0.dev
+version=1.28.0.dev
packages=
opentelemetry-sdk
@@ -34,7 +34,7 @@ packages=
opentelemetry-api
[prerelease]
-version=0.48b0.dev
+version=0.49b0.dev
packages=
all
diff --git a/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/version.py b/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/version.py
+++ b/exporter/opentelemetry-exporter-prometheus-remote-write/src/opentelemetry/exporter/prometheus_remote_write/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/exporter/opentelemetry-exporter-prometheus-remote-write/test-requirements.txt b/exporter/opentelemetry-exporter-prometheus-remote-write/test-requirements.txt
index f7e66ddd13..5836dc9764 100644
--- a/exporter/opentelemetry-exporter-prometheus-remote-write/test-requirements.txt
+++ b/exporter/opentelemetry-exporter-prometheus-remote-write/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
certifi==2024.7.4
charset-normalizer==3.3.2
# We can drop this after bumping baseline to pypy-39
diff --git a/exporter/opentelemetry-exporter-richconsole/pyproject.toml b/exporter/opentelemetry-exporter-richconsole/pyproject.toml
index 6d38226160..eb00eb0437 100644
--- a/exporter/opentelemetry-exporter-richconsole/pyproject.toml
+++ b/exporter/opentelemetry-exporter-richconsole/pyproject.toml
@@ -27,7 +27,7 @@ classifiers = [
dependencies = [
"opentelemetry-api ~= 1.12",
"opentelemetry-sdk ~= 1.12",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"rich>=10.0.0",
]
diff --git a/exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/version.py b/exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/version.py
+++ b/exporter/opentelemetry-exporter-richconsole/src/opentelemetry/exporter/richconsole/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/exporter/opentelemetry-exporter-richconsole/test-requirements.txt b/exporter/opentelemetry-exporter-richconsole/test-requirements.txt
index dee47c7880..0ef562821f 100644
--- a/exporter/opentelemetry-exporter-richconsole/test-requirements.txt
+++ b/exporter/opentelemetry-exporter-richconsole/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
flaky==3.7.0
importlib-metadata==6.11.0
diff --git a/instrumentation/README.md b/instrumentation/README.md
index 555e0bcd2a..3558027ea9 100644
--- a/instrumentation/README.md
+++ b/instrumentation/README.md
@@ -19,14 +19,14 @@
| [opentelemetry-instrumentation-django](./opentelemetry-instrumentation-django) | django >= 1.10 | Yes | experimental
| [opentelemetry-instrumentation-elasticsearch](./opentelemetry-instrumentation-elasticsearch) | elasticsearch >= 6.0 | No | experimental
| [opentelemetry-instrumentation-falcon](./opentelemetry-instrumentation-falcon) | falcon >= 1.4.1, < 4.0.0 | Yes | experimental
-| [opentelemetry-instrumentation-fastapi](./opentelemetry-instrumentation-fastapi) | fastapi ~= 0.58,fastapi-slim ~= 0.111.0 | Yes | migration
+| [opentelemetry-instrumentation-fastapi](./opentelemetry-instrumentation-fastapi) | fastapi ~= 0.58 | Yes | migration
| [opentelemetry-instrumentation-flask](./opentelemetry-instrumentation-flask) | flask >= 1.0 | Yes | migration
-| [opentelemetry-instrumentation-grpc](./opentelemetry-instrumentation-grpc) | grpcio ~= 1.27 | No | experimental
+| [opentelemetry-instrumentation-grpc](./opentelemetry-instrumentation-grpc) | grpcio >= 1.42.0 | No | experimental
| [opentelemetry-instrumentation-httpx](./opentelemetry-instrumentation-httpx) | httpx >= 0.18.0 | No | migration
| [opentelemetry-instrumentation-jinja2](./opentelemetry-instrumentation-jinja2) | jinja2 >= 2.7, < 4.0 | No | experimental
-| [opentelemetry-instrumentation-kafka-python](./opentelemetry-instrumentation-kafka-python) | kafka-python >= 2.0 | No | experimental
+| [opentelemetry-instrumentation-kafka-python](./opentelemetry-instrumentation-kafka-python) | kafka-python >= 2.0, < 3.0,kafka-python-ng >= 2.0, < 3.0 | No | experimental
| [opentelemetry-instrumentation-logging](./opentelemetry-instrumentation-logging) | logging | No | experimental
-| [opentelemetry-instrumentation-mysql](./opentelemetry-instrumentation-mysql) | mysql-connector-python ~= 8.0 | No | experimental
+| [opentelemetry-instrumentation-mysql](./opentelemetry-instrumentation-mysql) | mysql-connector-python >= 8.0, < 10.0 | No | experimental
| [opentelemetry-instrumentation-mysqlclient](./opentelemetry-instrumentation-mysqlclient) | mysqlclient < 3 | No | experimental
| [opentelemetry-instrumentation-pika](./opentelemetry-instrumentation-pika) | pika >= 0.12.0 | No | experimental
| [opentelemetry-instrumentation-psycopg](./opentelemetry-instrumentation-psycopg) | psycopg >= 3.1.0 | No | experimental
@@ -45,6 +45,6 @@
| [opentelemetry-instrumentation-threading](./opentelemetry-instrumentation-threading) | threading | No | experimental
| [opentelemetry-instrumentation-tornado](./opentelemetry-instrumentation-tornado) | tornado >= 5.1.1 | Yes | experimental
| [opentelemetry-instrumentation-tortoiseorm](./opentelemetry-instrumentation-tortoiseorm) | tortoise-orm >= 0.17.0 | No | experimental
-| [opentelemetry-instrumentation-urllib](./opentelemetry-instrumentation-urllib) | urllib | Yes | experimental
+| [opentelemetry-instrumentation-urllib](./opentelemetry-instrumentation-urllib) | urllib | Yes | migration
| [opentelemetry-instrumentation-urllib3](./opentelemetry-instrumentation-urllib3) | urllib3 >= 1.0.0, < 3.0.0 | Yes | migration
| [opentelemetry-instrumentation-wsgi](./opentelemetry-instrumentation-wsgi) | wsgi | Yes | migration
\ No newline at end of file
diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml
index c8be384fe6..65dfe3c7ac 100644
--- a/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-aio-pika/pyproject.toml
@@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.5",
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/version.py b/instrumentation/opentelemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/version.py
+++ b/instrumentation/opentelemetry-instrumentation-aio-pika/src/opentelemetry/instrumentation/aio_pika/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt
index a08f6427db..de853e16c9 100644
--- a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-0.txt
@@ -1,6 +1,6 @@
aio-pika==7.2.0
aiormq==6.2.3
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt
index 99b5fdfd1f..dbfb89fe82 100644
--- a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-1.txt
@@ -1,6 +1,6 @@
aio-pika==8.3.0
aiormq==6.6.4
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt
index 7051299461..6a95bd69f0 100644
--- a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt
+++ b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-2.txt
@@ -1,6 +1,6 @@
aio-pika==9.0.5
aiormq==6.7.1
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-3.txt b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-3.txt
index de5e8b310f..82e742a1f4 100644
--- a/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-3.txt
+++ b/instrumentation/opentelemetry-instrumentation-aio-pika/test-requirements-3.txt
@@ -1,6 +1,6 @@
aio-pika==9.4.1
aiormq==6.8.0
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
idna==3.7
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml
index cfc53f723a..fbe663a50b 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/version.py b/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/version.py
index aa0c1a911f..49b83ce95e 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/version.py
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/src/opentelemetry/instrumentation/aiohttp_client/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt
index fd44fbbc62..dee4736133 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/test-requirements.txt
@@ -1,6 +1,6 @@
-aiohttp==3.9.4
+aiohttp==3.10.2
aiosignal==1.3.1
-asgiref==3.7.2
+asgiref==3.8.1
async-timeout==4.0.3
blinker==1.7.0
certifi==2024.7.4
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/test_aiohttp_client_integration.py b/instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/test_aiohttp_client_integration.py
index adf54c295b..8474bd436f 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/test_aiohttp_client_integration.py
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-client/tests/test_aiohttp_client_integration.py
@@ -468,7 +468,7 @@ async def request_handler(request):
[
(
"GET",
- (StatusCode.ERROR, "ServerTimeoutError"),
+ (StatusCode.ERROR, "SocketTimeoutError"),
{
SpanAttributes.HTTP_METHOD: "GET",
SpanAttributes.HTTP_URL: f"http://{host}:{port}/test_timeout",
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml
index 6d62bd7956..a8e912e68d 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py
index 659ff24af6..6db7719c76 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/__init__.py
@@ -207,7 +207,7 @@ async def middleware(request, handler):
duration_histogram = meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="Duration of HTTP server requests.",
+ description="Measures the duration of inbound HTTP requests.",
)
active_requests_counter = meter.create_up_down_counter(
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/version.py b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/version.py
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/src/opentelemetry/instrumentation/aiohttp_server/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt
index b83eff27f0..e6dff52db9 100644
--- a/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-aiohttp-server/test-requirements.txt
@@ -1,6 +1,6 @@
-aiohttp==3.9.4
+aiohttp==3.10.2
aiosignal==1.3.1
-asgiref==3.7.2
+asgiref==3.8.1
async-timeout==4.0.3
Deprecated==1.2.14
frozenlist==1.4.1
diff --git a/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml
index 404bc9c445..3a583db3dd 100644
--- a/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-aiopg/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-dbapi == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py b/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py
+++ b/instrumentation/opentelemetry-instrumentation-aiopg/src/opentelemetry/instrumentation/aiopg/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt
index bc61c3d6fc..1443104081 100644
--- a/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-aiopg/test-requirements.txt
@@ -1,5 +1,5 @@
aiopg==1.4.0
-asgiref==3.7.2
+asgiref==3.8.1
async-timeout==4.0.3
Deprecated==1.2.14
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml
index 480ca75df7..45c436aad4 100644
--- a/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-asgi/pyproject.toml
@@ -27,9 +27,9 @@ classifiers = [
dependencies = [
"asgiref ~= 3.0",
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
index 0525181eac..d25ca41017 100644
--- a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py
@@ -215,10 +215,10 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A
_server_duration_attrs_new,
_server_duration_attrs_old,
_set_http_flavor_version,
- _set_http_host,
+ _set_http_host_server,
_set_http_method,
_set_http_net_host_port,
- _set_http_peer_ip,
+ _set_http_peer_ip_server,
_set_http_peer_port_server,
_set_http_scheme,
_set_http_target,
@@ -342,7 +342,7 @@ def collect_request_attributes(
if scheme:
_set_http_scheme(result, scheme, sem_conv_opt_in_mode)
if server_host:
- _set_http_host(result, server_host, sem_conv_opt_in_mode)
+ _set_http_host_server(result, server_host, sem_conv_opt_in_mode)
if port:
_set_http_net_host_port(result, port, sem_conv_opt_in_mode)
flavor = scope.get("http_version")
@@ -354,10 +354,12 @@ def collect_request_attributes(
result, path, path, query_string, sem_conv_opt_in_mode
)
if http_url:
- _set_http_url(
- result, remove_url_credentials(http_url), sem_conv_opt_in_mode
- )
-
+ if _report_old(sem_conv_opt_in_mode):
+ _set_http_url(
+ result,
+ remove_url_credentials(http_url),
+ _HTTPStabilityMode.DEFAULT,
+ )
http_method = scope.get("method", "")
if http_method:
_set_http_method(
@@ -378,7 +380,9 @@ def collect_request_attributes(
_set_http_user_agent(result, http_user_agent[0], sem_conv_opt_in_mode)
if "client" in scope and scope["client"] is not None:
- _set_http_peer_ip(result, scope.get("client")[0], sem_conv_opt_in_mode)
+ _set_http_peer_ip_server(
+ result, scope.get("client")[0], sem_conv_opt_in_mode
+ )
_set_http_peer_port_server(
result, scope.get("client")[1], sem_conv_opt_in_mode
)
@@ -479,7 +483,7 @@ def get_default_span_details(scope: dict) -> Tuple[str, dict]:
def _collect_target_attribute(
- scope: typing.Dict[str, typing.Any]
+ scope: typing.Dict[str, typing.Any],
) -> typing.Optional[str]:
"""
Returns the target path as defined by the Semantic Conventions.
@@ -525,6 +529,7 @@ class OpenTelemetryMiddleware:
the current globally configured one is used.
meter_provider: The optional meter provider to use. If omitted
the current globally configured one is used.
+ exclude_spans: Optionally exclude HTTP `send` and/or `receive` spans from the trace.
"""
# pylint: disable=too-many-branches
@@ -543,6 +548,7 @@ def __init__(
http_capture_headers_server_request: list[str] | None = None,
http_capture_headers_server_response: list[str] | None = None,
http_capture_headers_sanitize_fields: list[str] | None = None,
+ exclude_spans: list[typing.Literal["receive", "send"]] | None = None,
):
# initialize semantic conventions opt-in if needed
_OpenTelemetrySemanticConventionStability._initialize()
@@ -575,7 +581,7 @@ def __init__(
self.duration_histogram_old = self.meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="Duration of HTTP server requests.",
+ description="Measures the duration of inbound HTTP requests.",
)
self.duration_histogram_new = None
if _report_new(sem_conv_opt_in_mode):
@@ -649,6 +655,12 @@ def __init__(
)
or []
)
+ self.exclude_receive_span = (
+ "receive" in exclude_spans if exclude_spans else False
+ )
+ self.exclude_send_span = (
+ "send" in exclude_spans if exclude_spans else False
+ )
# pylint: disable=too-many-statements
async def __call__(
@@ -792,8 +804,10 @@ async def __call__(
span.end()
# pylint: enable=too-many-branches
-
def _get_otel_receive(self, server_span_name, scope, receive):
+ if self.exclude_receive_span:
+ return receive
+
@wraps(receive)
async def otel_receive():
with self.tracer.start_as_current_span(
@@ -817,6 +831,66 @@ async def otel_receive():
return otel_receive
+ def _set_send_span(
+ self,
+ server_span_name,
+ scope,
+ send,
+ message,
+ status_code,
+ expecting_trailers,
+ ):
+ """Set send span attributes and status code."""
+ with self.tracer.start_as_current_span(
+ " ".join((server_span_name, scope["type"], "send"))
+ ) as send_span:
+ if callable(self.client_response_hook):
+ self.client_response_hook(send_span, scope, message)
+
+ if send_span.is_recording():
+ if message["type"] == "http.response.start":
+ expecting_trailers = message.get("trailers", False)
+ send_span.set_attribute("asgi.event.type", message["type"])
+
+ if status_code:
+ set_status_code(
+ send_span,
+ status_code,
+ None,
+ self._sem_conv_opt_in_mode,
+ )
+ return expecting_trailers
+
+ def _set_server_span(
+ self, server_span, message, status_code, duration_attrs
+ ):
+ """Set server span attributes and status code."""
+ if (
+ server_span.is_recording()
+ and server_span.kind == trace.SpanKind.SERVER
+ and "headers" in message
+ ):
+ custom_response_attributes = (
+ collect_custom_headers_attributes(
+ message,
+ self.http_capture_headers_sanitize_fields,
+ self.http_capture_headers_server_response,
+ normalise_response_header_name,
+ )
+ if self.http_capture_headers_server_response
+ else {}
+ )
+ if len(custom_response_attributes) > 0:
+ server_span.set_attributes(custom_response_attributes)
+
+ if status_code:
+ set_status_code(
+ server_span,
+ status_code,
+ duration_attrs,
+ self._sem_conv_opt_in_mode,
+ )
+
def _get_otel_send(
self,
server_span,
@@ -830,74 +904,46 @@ def _get_otel_send(
@wraps(send)
async def otel_send(message: dict[str, Any]):
nonlocal expecting_trailers
- with self.tracer.start_as_current_span(
- " ".join((server_span_name, scope["type"], "send"))
- ) as send_span:
- if callable(self.client_response_hook):
- self.client_response_hook(send_span, scope, message)
- status_code = None
- if message["type"] == "http.response.start":
- status_code = message["status"]
- elif message["type"] == "websocket.send":
- status_code = 200
-
- if send_span.is_recording():
- if message["type"] == "http.response.start":
- expecting_trailers = message.get("trailers", False)
- send_span.set_attribute("asgi.event.type", message["type"])
- if (
- server_span.is_recording()
- and server_span.kind == trace.SpanKind.SERVER
- and "headers" in message
- ):
- custom_response_attributes = (
- collect_custom_headers_attributes(
- message,
- self.http_capture_headers_sanitize_fields,
- self.http_capture_headers_server_response,
- normalise_response_header_name,
- )
- if self.http_capture_headers_server_response
- else {}
- )
- if len(custom_response_attributes) > 0:
- server_span.set_attributes(
- custom_response_attributes
- )
- if status_code:
- # We record metrics only once
- set_status_code(
- server_span,
- status_code,
- duration_attrs,
- self._sem_conv_opt_in_mode,
- )
- set_status_code(
- send_span,
- status_code,
- None,
- self._sem_conv_opt_in_mode,
- )
+ status_code = None
+ if message["type"] == "http.response.start":
+ status_code = message["status"]
+ elif message["type"] == "websocket.send":
+ status_code = 200
- propagator = get_global_response_propagator()
- if propagator:
- propagator.inject(
- message,
- context=set_span_in_context(
- server_span, trace.context_api.Context()
- ),
- setter=asgi_setter,
- )
+ if not self.exclude_send_span:
+ expecting_trailers = self._set_send_span(
+ server_span_name,
+ scope,
+ send,
+ message,
+ status_code,
+ expecting_trailers,
+ )
- content_length = asgi_getter.get(message, "content-length")
- if content_length:
- try:
- self.content_length_header = int(content_length[0])
- except ValueError:
- pass
+ self._set_server_span(
+ server_span, message, status_code, duration_attrs
+ )
+
+ propagator = get_global_response_propagator()
+ if propagator:
+ propagator.inject(
+ message,
+ context=set_span_in_context(
+ server_span, trace.context_api.Context()
+ ),
+ setter=asgi_setter,
+ )
+
+ content_length = asgi_getter.get(message, "content-length")
+ if content_length:
+ try:
+ self.content_length_header = int(content_length[0])
+ except ValueError:
+ pass
+
+ await send(message)
- await send(message)
# pylint: disable=too-many-boolean-expressions
if (
not expecting_trailers
diff --git a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/version.py b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/version.py
+++ b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt
index ebe439d1d2..18a11500e1 100644
--- a/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_custom_headers.py b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_custom_headers.py
index 5394d62ff0..f6cb05fbda 100644
--- a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_custom_headers.py
+++ b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_custom_headers.py
@@ -1,7 +1,21 @@
+# Copyright The OpenTelemetry Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
import os
import opentelemetry.instrumentation.asgi as otel_asgi
-from opentelemetry.test.asgitestutil import AsgiTestBase
+from opentelemetry.test.asgitestutil import AsyncAsgiTestBase
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace import SpanKind
from opentelemetry.util.http import (
@@ -90,7 +104,7 @@ async def websocket_app_with_custom_headers(scope, receive, send):
break
-class TestCustomHeaders(AsgiTestBase, TestBase):
+class TestCustomHeaders(AsyncAsgiTestBase):
constructor_params = {}
__test__ = False
@@ -108,7 +122,7 @@ def setUp(self):
**self.constructor_params,
)
- def test_http_custom_request_headers_in_span_attributes(self):
+ async def test_http_custom_request_headers_in_span_attributes(self):
self.scope["headers"].extend(
[
(b"custom-test-header-1", b"test-header-value-1"),
@@ -119,8 +133,8 @@ def test_http_custom_request_headers_in_span_attributes(self):
]
)
self.seed_app(self.app)
- self.send_default_request()
- self.get_all_output()
+ await self.send_default_request()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
expected = {
"http.request.header.custom_test_header_1": (
@@ -139,7 +153,7 @@ def test_http_custom_request_headers_in_span_attributes(self):
if span.kind == SpanKind.SERVER:
self.assertSpanHasAttributes(span, expected)
- def test_http_repeat_request_headers_in_span_attributes(self):
+ async def test_http_repeat_request_headers_in_span_attributes(self):
self.scope["headers"].extend(
[
(b"custom-test-header-1", b"test-header-value-1"),
@@ -147,8 +161,8 @@ def test_http_repeat_request_headers_in_span_attributes(self):
]
)
self.seed_app(self.app)
- self.send_default_request()
- self.get_all_output()
+ await self.send_default_request()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
expected = {
"http.request.header.custom_test_header_1": (
@@ -159,15 +173,15 @@ def test_http_repeat_request_headers_in_span_attributes(self):
span = next(span for span in span_list if span.kind == SpanKind.SERVER)
self.assertSpanHasAttributes(span, expected)
- def test_http_custom_request_headers_not_in_span_attributes(self):
+ async def test_http_custom_request_headers_not_in_span_attributes(self):
self.scope["headers"].extend(
[
(b"custom-test-header-1", b"test-header-value-1"),
]
)
self.seed_app(self.app)
- self.send_default_request()
- self.get_all_output()
+ await self.send_default_request()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
expected = {
"http.request.header.custom_test_header_1": (
@@ -185,15 +199,15 @@ def test_http_custom_request_headers_not_in_span_attributes(self):
for key, _ in not_expected.items():
self.assertNotIn(key, span.attributes)
- def test_http_custom_response_headers_in_span_attributes(self):
+ async def test_http_custom_response_headers_in_span_attributes(self):
self.app = otel_asgi.OpenTelemetryMiddleware(
http_app_with_custom_headers,
tracer_provider=self.tracer_provider,
**self.constructor_params,
)
self.seed_app(self.app)
- self.send_default_request()
- self.get_all_output()
+ await self.send_default_request()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
expected = {
"http.response.header.custom_test_header_1": (
@@ -214,15 +228,15 @@ def test_http_custom_response_headers_in_span_attributes(self):
if span.kind == SpanKind.SERVER:
self.assertSpanHasAttributes(span, expected)
- def test_http_repeat_response_headers_in_span_attributes(self):
+ async def test_http_repeat_response_headers_in_span_attributes(self):
self.app = otel_asgi.OpenTelemetryMiddleware(
http_app_with_repeat_headers,
tracer_provider=self.tracer_provider,
**self.constructor_params,
)
self.seed_app(self.app)
- self.send_default_request()
- self.get_all_output()
+ await self.send_default_request()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
expected = {
"http.response.header.custom_test_header_1": (
@@ -233,15 +247,15 @@ def test_http_repeat_response_headers_in_span_attributes(self):
span = next(span for span in span_list if span.kind == SpanKind.SERVER)
self.assertSpanHasAttributes(span, expected)
- def test_http_custom_response_headers_not_in_span_attributes(self):
+ async def test_http_custom_response_headers_not_in_span_attributes(self):
self.app = otel_asgi.OpenTelemetryMiddleware(
http_app_with_custom_headers,
tracer_provider=self.tracer_provider,
**self.constructor_params,
)
self.seed_app(self.app)
- self.send_default_request()
- self.get_all_output()
+ await self.send_default_request()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
not_expected = {
"http.response.header.custom_test_header_3": (
@@ -253,7 +267,7 @@ def test_http_custom_response_headers_not_in_span_attributes(self):
for key, _ in not_expected.items():
self.assertNotIn(key, span.attributes)
- def test_websocket_custom_request_headers_in_span_attributes(self):
+ async def test_websocket_custom_request_headers_in_span_attributes(self):
self.scope = {
"type": "websocket",
"http_version": "1.1",
@@ -271,11 +285,11 @@ def test_websocket_custom_request_headers_in_span_attributes(self):
"server": ("127.0.0.1", 80),
}
self.seed_app(self.app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
expected = {
"http.request.header.custom_test_header_1": (
@@ -294,7 +308,9 @@ def test_websocket_custom_request_headers_in_span_attributes(self):
if span.kind == SpanKind.SERVER:
self.assertSpanHasAttributes(span, expected)
- def test_websocket_custom_request_headers_not_in_span_attributes(self):
+ async def test_websocket_custom_request_headers_not_in_span_attributes(
+ self,
+ ):
self.scope = {
"type": "websocket",
"http_version": "1.1",
@@ -309,11 +325,11 @@ def test_websocket_custom_request_headers_not_in_span_attributes(self):
"server": ("127.0.0.1", 80),
}
self.seed_app(self.app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
not_expected = {
"http.request.header.custom_test_header_3": (
@@ -325,7 +341,7 @@ def test_websocket_custom_request_headers_not_in_span_attributes(self):
for key, _ in not_expected.items():
self.assertNotIn(key, span.attributes)
- def test_websocket_custom_response_headers_in_span_attributes(self):
+ async def test_websocket_custom_response_headers_in_span_attributes(self):
self.scope = {
"type": "websocket",
"http_version": "1.1",
@@ -342,10 +358,10 @@ def test_websocket_custom_response_headers_in_span_attributes(self):
**self.constructor_params,
)
self.seed_app(self.app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
expected = {
"http.response.header.custom_test_header_1": (
@@ -366,7 +382,9 @@ def test_websocket_custom_response_headers_in_span_attributes(self):
if span.kind == SpanKind.SERVER:
self.assertSpanHasAttributes(span, expected)
- def test_websocket_custom_response_headers_not_in_span_attributes(self):
+ async def test_websocket_custom_response_headers_not_in_span_attributes(
+ self,
+ ):
self.scope = {
"type": "websocket",
"http_version": "1.1",
@@ -383,10 +401,10 @@ def test_websocket_custom_response_headers_not_in_span_attributes(self):
**self.constructor_params,
)
self.seed_app(self.app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
+ await self.get_all_output()
span_list = self.exporter.get_finished_spans()
not_expected = {
"http.response.header.custom_test_header_3": (
diff --git a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py
index 5bb04adb25..a9d7897ea6 100644
--- a/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py
+++ b/instrumentation/opentelemetry-instrumentation-asgi/tests/test_asgi_middleware.py
@@ -14,7 +14,6 @@
# pylint: disable=too-many-lines
-import asyncio
import sys
import time
import unittest
@@ -53,12 +52,8 @@
from opentelemetry.semconv.attributes.network_attributes import (
NETWORK_PROTOCOL_VERSION,
)
-from opentelemetry.semconv.attributes.server_attributes import (
- SERVER_ADDRESS,
- SERVER_PORT,
-)
+from opentelemetry.semconv.attributes.server_attributes import SERVER_PORT
from opentelemetry.semconv.attributes.url_attributes import (
- URL_FULL,
URL_PATH,
URL_QUERY,
URL_SCHEME,
@@ -68,7 +63,7 @@
)
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.asgitestutil import (
- AsgiTestBase,
+ AsyncAsgiTestBase,
setup_testing_defaults,
)
from opentelemetry.test.test_base import TestBase
@@ -279,7 +274,7 @@ async def error_asgi(scope, receive, send):
# pylint: disable=too-many-public-methods
-class TestAsgiApplication(AsgiTestBase):
+class TestAsgiApplication(AsyncAsgiTestBase):
def setUp(self):
super().setUp()
@@ -407,10 +402,8 @@ def validate_outputs(
HTTP_REQUEST_METHOD: "GET",
URL_SCHEME: "http",
SERVER_PORT: 80,
- SERVER_ADDRESS: "127.0.0.1",
NETWORK_PROTOCOL_VERSION: "1.0",
URL_PATH: "/",
- URL_FULL: "http://127.0.0.1/",
CLIENT_ADDRESS: "127.0.0.1",
CLIENT_PORT: 32767,
HTTP_RESPONSE_STATUS_CODE: 200,
@@ -444,10 +437,8 @@ def validate_outputs(
HTTP_REQUEST_METHOD: "GET",
URL_SCHEME: "http",
SERVER_PORT: 80,
- SERVER_ADDRESS: "127.0.0.1",
NETWORK_PROTOCOL_VERSION: "1.0",
URL_PATH: "/",
- URL_FULL: "http://127.0.0.1/",
CLIENT_ADDRESS: "127.0.0.1",
CLIENT_PORT: 32767,
HTTP_RESPONSE_STATUS_CODE: 200,
@@ -485,31 +476,31 @@ def validate_outputs(
"opentelemetry.instrumentation.asgi",
)
- def test_basic_asgi_call(self):
+ async def test_basic_asgi_call(self):
"""Test that spans are emitted as expected."""
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs)
- def test_basic_asgi_call_new_semconv(self):
+ async def test_basic_asgi_call_new_semconv(self):
"""Test that spans are emitted as expected."""
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs, old_sem_conv=False, new_sem_conv=True)
- def test_basic_asgi_call_both_semconv(self):
+ async def test_basic_asgi_call_both_semconv(self):
"""Test that spans are emitted as expected."""
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs, old_sem_conv=True, new_sem_conv=True)
- def test_asgi_not_recording(self):
+ async def test_asgi_not_recording(self):
mock_tracer = mock.Mock()
mock_span = mock.Mock()
mock_span.is_recording.return_value = False
@@ -522,21 +513,21 @@ def test_asgi_not_recording(self):
tracer.return_value = mock_tracer
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
self.assertFalse(mock_span.is_recording())
self.assertTrue(mock_span.is_recording.called)
self.assertFalse(mock_span.set_attribute.called)
self.assertFalse(mock_span.set_status.called)
- def test_asgi_exc_info(self):
+ async def test_asgi_exc_info(self):
"""Test that exception information is emitted as expected."""
app = otel_asgi.OpenTelemetryMiddleware(error_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs, error=ValueError)
- def test_long_response(self):
+ async def test_long_response(self):
"""Test that the server span is ended on the final response body message.
If the server span is ended early then this test will fail due
@@ -544,8 +535,8 @@ def test_long_response(self):
"""
app = otel_asgi.OpenTelemetryMiddleware(long_response_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
def add_more_body_spans(expected: list):
more_body_span = {
@@ -559,12 +550,12 @@ def add_more_body_spans(expected: list):
self.validate_outputs(outputs, modifiers=[add_more_body_spans])
- def test_background_execution(self):
+ async def test_background_execution(self):
"""Test that the server span is ended BEFORE the background task is finished."""
app = otel_asgi.OpenTelemetryMiddleware(background_execution_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs)
span_list = self.memory_exporter.get_finished_spans()
server_span = span_list[-1]
@@ -575,15 +566,39 @@ def test_background_execution(self):
_SIMULATED_BACKGROUND_TASK_EXECUTION_TIME_S * 10**9,
)
- def test_trailers(self):
+ async def test_exclude_internal_spans(self):
+ """Test that internal spans are excluded from the emitted spans when
+ the `exclude_receive_span` or `exclude_send_span` attributes are set.
+ """
+ cases = [
+ (["receive", "send"], ["GET / http receive", "GET / http send"]),
+ (["send"], ["GET / http send"]),
+ (["receive"], ["GET / http receive"]),
+ ([], []),
+ ]
+ for exclude_spans, excluded_spans in cases:
+ self.memory_exporter.clear()
+ app = otel_asgi.OpenTelemetryMiddleware(
+ simple_asgi, exclude_spans=exclude_spans
+ )
+ self.seed_app(app)
+ await self.send_default_request()
+ await self.get_all_output()
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertTrue(span_list)
+ for span in span_list:
+ for excluded_span in excluded_spans:
+ self.assertNotEqual(span.name, excluded_span)
+
+ async def test_trailers(self):
"""Test that trailers are emitted as expected and that the server span is ended
BEFORE the background task is finished."""
app = otel_asgi.OpenTelemetryMiddleware(
background_execution_trailers_asgi
)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
def add_body_and_trailer_span(expected: list):
body_span = {
@@ -610,7 +625,7 @@ def add_body_and_trailer_span(expected: list):
_SIMULATED_BACKGROUND_TASK_EXECUTION_TIME_S * 10**9,
)
- def test_override_span_name(self):
+ async def test_override_span_name(self):
"""Test that default span_names can be overwritten by our callback function."""
span_name = "Dymaxion"
@@ -631,11 +646,11 @@ def update_expected_span_name(expected):
simple_asgi, default_span_details=get_predefined_span_details
)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs, modifiers=[update_expected_span_name])
- def test_custom_tracer_provider_otel_asgi(self):
+ async def test_custom_tracer_provider_otel_asgi(self):
resource = resources.Resource.create({"service-test-key": "value"})
result = TestBase.create_tracer_provider(resource=resource)
tracer_provider, exporter = result
@@ -644,28 +659,28 @@ def test_custom_tracer_provider_otel_asgi(self):
simple_asgi, tracer_provider=tracer_provider
)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
span_list = exporter.get_finished_spans()
for span in span_list:
self.assertEqual(
span.resource.attributes["service-test-key"], "value"
)
- def test_no_op_tracer_provider_otel_asgi(self):
+ async def test_no_op_tracer_provider_otel_asgi(self):
app = otel_asgi.OpenTelemetryMiddleware(
simple_asgi, tracer_provider=trace_api.NoOpTracerProvider()
)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
- response_start, response_body, *_ = self.get_all_output()
+ response_start, response_body, *_ = await self.get_all_output()
self.assertEqual(response_body["body"], b"*")
self.assertEqual(response_start["status"], 200)
span_list = self.memory_exporter.get_finished_spans()
self.assertEqual(len(span_list), 0)
- def test_behavior_with_scope_server_as_none(self):
+ async def test_behavior_with_scope_server_as_none(self):
"""Test that middleware is ok when server is none in scope."""
def update_expected_server(expected):
@@ -681,19 +696,18 @@ def update_expected_server(expected):
self.scope["server"] = None
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs, modifiers=[update_expected_server])
- def test_behavior_with_scope_server_as_none_new_semconv(self):
+ async def test_behavior_with_scope_server_as_none_new_semconv(self):
"""Test that middleware is ok when server is none in scope."""
def update_expected_server(expected):
expected[3]["attributes"].update(
{
- SERVER_ADDRESS: "0.0.0.0",
+ CLIENT_ADDRESS: "0.0.0.0",
SERVER_PORT: 80,
- URL_FULL: "http://0.0.0.0/",
}
)
return expected
@@ -701,8 +715,8 @@ def update_expected_server(expected):
self.scope["server"] = None
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(
outputs,
modifiers=[update_expected_server],
@@ -710,7 +724,7 @@ def update_expected_server(expected):
new_sem_conv=True,
)
- def test_behavior_with_scope_server_as_none_both_semconv(self):
+ async def test_behavior_with_scope_server_as_none_both_semconv(self):
"""Test that middleware is ok when server is none in scope."""
def update_expected_server(expected):
@@ -719,9 +733,8 @@ def update_expected_server(expected):
SpanAttributes.HTTP_HOST: "0.0.0.0",
SpanAttributes.NET_HOST_PORT: 80,
SpanAttributes.HTTP_URL: "http://0.0.0.0/",
- SERVER_ADDRESS: "0.0.0.0",
+ CLIENT_ADDRESS: "0.0.0.0",
SERVER_PORT: 80,
- URL_FULL: "http://0.0.0.0/",
}
)
return expected
@@ -729,8 +742,8 @@ def update_expected_server(expected):
self.scope["server"] = None
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(
outputs,
modifiers=[update_expected_server],
@@ -738,7 +751,7 @@ def update_expected_server(expected):
new_sem_conv=True,
)
- def test_host_header(self):
+ async def test_host_header(self):
"""Test that host header is converted to http.server_name."""
hostname = b"server_name_1"
@@ -751,11 +764,11 @@ def update_expected_server(expected):
self.scope["headers"].append([b"host", hostname])
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs, modifiers=[update_expected_server])
- def test_host_header_both_semconv(self):
+ async def test_host_header_both_semconv(self):
"""Test that host header is converted to http.server_name."""
hostname = b"server_name_1"
@@ -768,8 +781,8 @@ def update_expected_server(expected):
self.scope["headers"].append([b"host", hostname])
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(
outputs,
modifiers=[update_expected_server],
@@ -777,7 +790,7 @@ def update_expected_server(expected):
new_sem_conv=True,
)
- def test_user_agent(self):
+ async def test_user_agent(self):
"""Test that host header is converted to http.server_name."""
user_agent = b"test-agent"
@@ -790,11 +803,11 @@ def update_expected_user_agent(expected):
self.scope["headers"].append([b"user-agent", user_agent])
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(outputs, modifiers=[update_expected_user_agent])
- def test_user_agent_new_semconv(self):
+ async def test_user_agent_new_semconv(self):
"""Test that host header is converted to http.server_name."""
user_agent = b"test-agent"
@@ -807,8 +820,8 @@ def update_expected_user_agent(expected):
self.scope["headers"].append([b"user-agent", user_agent])
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(
outputs,
modifiers=[update_expected_user_agent],
@@ -816,7 +829,7 @@ def update_expected_user_agent(expected):
new_sem_conv=True,
)
- def test_user_agent_both_semconv(self):
+ async def test_user_agent_both_semconv(self):
"""Test that host header is converted to http.server_name."""
user_agent = b"test-agent"
@@ -832,8 +845,8 @@ def update_expected_user_agent(expected):
self.scope["headers"].append([b"user-agent", user_agent])
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(
outputs,
modifiers=[update_expected_user_agent],
@@ -841,7 +854,7 @@ def update_expected_user_agent(expected):
new_sem_conv=True,
)
- def test_traceresponse_header(self):
+ async def test_traceresponse_header(self):
"""Test a traceresponse header is sent when a global propagator is set."""
orig = get_global_response_propagator()
@@ -849,12 +862,12 @@ def test_traceresponse_header(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ response_start, response_body, *_ = await self.get_all_output()
span = self.memory_exporter.get_finished_spans()[-1]
self.assertEqual(trace_api.SpanKind.SERVER, span.kind)
- response_start, response_body, *_ = self.get_all_output()
self.assertEqual(response_body["body"], b"*")
self.assertEqual(response_start["status"], 200)
@@ -874,7 +887,7 @@ def test_traceresponse_header(self):
set_global_response_propagator(orig)
- def test_websocket(self):
+ async def test_websocket(self):
self.scope = {
"method": "GET",
"type": "websocket",
@@ -888,10 +901,10 @@ def test_websocket(self):
}
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
+ await self.get_all_output()
span_list = self.memory_exporter.get_finished_spans()
self.assertEqual(len(span_list), 6)
expected = [
@@ -948,7 +961,7 @@ def test_websocket(self):
self.assertEqual(span.kind, expected["kind"])
self.assertDictEqual(dict(span.attributes), expected["attributes"])
- def test_websocket_new_semconv(self):
+ async def test_websocket_new_semconv(self):
self.scope = {
"method": "GET",
"type": "websocket",
@@ -962,10 +975,10 @@ def test_websocket_new_semconv(self):
}
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
+ await self.get_all_output()
span_list = self.memory_exporter.get_finished_spans()
self.assertEqual(len(span_list), 6)
expected = [
@@ -1006,10 +1019,8 @@ def test_websocket_new_semconv(self):
"attributes": {
URL_SCHEME: self.scope["scheme"],
SERVER_PORT: self.scope["server"][1],
- SERVER_ADDRESS: self.scope["server"][0],
NETWORK_PROTOCOL_VERSION: self.scope["http_version"],
URL_PATH: self.scope["path"],
- URL_FULL: f'{self.scope["scheme"]}://{self.scope["server"][0]}{self.scope["path"]}',
CLIENT_ADDRESS: self.scope["client"][0],
CLIENT_PORT: self.scope["client"][1],
HTTP_RESPONSE_STATUS_CODE: 200,
@@ -1022,7 +1033,7 @@ def test_websocket_new_semconv(self):
self.assertEqual(span.kind, expected["kind"])
self.assertDictEqual(dict(span.attributes), expected["attributes"])
- def test_websocket_both_semconv(self):
+ async def test_websocket_both_semconv(self):
self.scope = {
"method": "GET",
"type": "websocket",
@@ -1036,10 +1047,10 @@ def test_websocket_both_semconv(self):
}
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
+ await self.get_all_output()
span_list = self.memory_exporter.get_finished_spans()
self.assertEqual(len(span_list), 6)
expected = [
@@ -1092,10 +1103,8 @@ def test_websocket_both_semconv(self):
SpanAttributes.HTTP_METHOD: self.scope["method"],
URL_SCHEME: self.scope["scheme"],
SERVER_PORT: self.scope["server"][1],
- SERVER_ADDRESS: self.scope["server"][0],
NETWORK_PROTOCOL_VERSION: self.scope["http_version"],
URL_PATH: self.scope["path"],
- URL_FULL: f'{self.scope["scheme"]}://{self.scope["server"][0]}{self.scope["path"]}',
CLIENT_ADDRESS: self.scope["client"][0],
CLIENT_PORT: self.scope["client"][1],
HTTP_RESPONSE_STATUS_CODE: 200,
@@ -1108,7 +1117,7 @@ def test_websocket_both_semconv(self):
self.assertEqual(span.kind, expected["kind"])
self.assertDictEqual(dict(span.attributes), expected["attributes"])
- def test_websocket_traceresponse_header(self):
+ async def test_websocket_traceresponse_header(self):
"""Test a traceresponse header is set for websocket messages"""
orig = get_global_response_propagator()
@@ -1126,10 +1135,10 @@ def test_websocket_traceresponse_header(self):
}
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
- _, socket_send, *_ = self.get_all_output()
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
+ _, socket_send, *_ = await self.get_all_output()
span = self.memory_exporter.get_finished_spans()[-1]
self.assertEqual(trace_api.SpanKind.SERVER, span.kind)
@@ -1148,15 +1157,15 @@ def test_websocket_traceresponse_header(self):
set_global_response_propagator(orig)
- def test_lifespan(self):
+ async def test_lifespan(self):
self.scope["type"] = "lifespan"
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
span_list = self.memory_exporter.get_finished_spans()
self.assertEqual(len(span_list), 0)
- def test_hooks(self):
+ async def test_hooks(self):
def server_request_hook(span, scope):
span.update_name("name from server hook")
@@ -1183,20 +1192,23 @@ def update_expected_hook_results(expected):
client_response_hook=client_response_hook,
)
self.seed_app(app)
- self.send_default_request()
- outputs = self.get_all_output()
+ await self.send_default_request()
+ outputs = await self.get_all_output()
self.validate_outputs(
outputs, modifiers=[update_expected_hook_results]
)
- def test_asgi_metrics(self):
+ async def test_asgi_metrics(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
metrics_list = self.memory_metrics_reader.get_metrics_data()
number_data_point_seen = False
histogram_data_point_seen = False
@@ -1225,14 +1237,17 @@ def test_asgi_metrics(self):
)
self.assertTrue(number_data_point_seen and histogram_data_point_seen)
- def test_asgi_metrics_new_semconv(self):
+ async def test_asgi_metrics_new_semconv(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
metrics_list = self.memory_metrics_reader.get_metrics_data()
number_data_point_seen = False
histogram_data_point_seen = False
@@ -1261,14 +1276,17 @@ def test_asgi_metrics_new_semconv(self):
)
self.assertTrue(number_data_point_seen and histogram_data_point_seen)
- def test_asgi_metrics_both_semconv(self):
+ async def test_asgi_metrics_both_semconv(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
metrics_list = self.memory_metrics_reader.get_metrics_data()
number_data_point_seen = False
histogram_data_point_seen = False
@@ -1297,12 +1315,13 @@ def test_asgi_metrics_both_semconv(self):
)
self.assertTrue(number_data_point_seen and histogram_data_point_seen)
- def test_basic_metric_success(self):
+ async def test_basic_metric_success(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
start = default_timer()
- self.send_default_request()
+ await self.send_default_request()
duration = max(round((default_timer() - start) * 1000), 0)
+ await self.get_all_output()
expected_duration_attributes = {
"http.method": "GET",
"http.host": "127.0.0.1",
@@ -1344,7 +1363,7 @@ def test_basic_metric_success(self):
)
self.assertEqual(point.value, 0)
- def test_basic_metric_success_nonrecording_span(self):
+ async def test_basic_metric_success_nonrecording_span(self):
mock_tracer = mock.Mock()
mock_span = mock.Mock()
mock_span.is_recording.return_value = False
@@ -1358,8 +1377,9 @@ def test_basic_metric_success_nonrecording_span(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
start = default_timer()
- self.send_default_request()
+ await self.send_default_request()
duration = max(round((default_timer() - start) * 1000), 0)
+ await self.get_all_output()
expected_duration_attributes = {
"http.method": "GET",
"http.host": "127.0.0.1",
@@ -1388,7 +1408,7 @@ def test_basic_metric_success_nonrecording_span(self):
self.assertEqual(point.count, 1)
if metric.name == "http.server.duration":
self.assertAlmostEqual(
- duration, point.sum, delta=5
+ duration, point.sum, delta=15
)
elif (
metric.name == "http.server.response.size"
@@ -1403,12 +1423,13 @@ def test_basic_metric_success_nonrecording_span(self):
)
self.assertEqual(point.value, 0)
- def test_basic_metric_success_new_semconv(self):
+ async def test_basic_metric_success_new_semconv(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
start = default_timer()
- self.send_default_request()
+ await self.send_default_request()
duration_s = max(default_timer() - start, 0)
+ await self.get_all_output()
expected_duration_attributes = {
"http.request.method": "GET",
"url.scheme": "http",
@@ -1450,13 +1471,14 @@ def test_basic_metric_success_new_semconv(self):
)
self.assertEqual(point.value, 0)
- def test_basic_metric_success_both_semconv(self):
+ async def test_basic_metric_success_both_semconv(self):
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
start = default_timer()
- self.send_default_request()
+ await self.send_default_request()
duration = max(round((default_timer() - start) * 1000), 0)
duration_s = max(default_timer() - start, 0)
+ await self.get_all_output()
expected_duration_attributes_old = {
"http.method": "GET",
"http.host": "127.0.0.1",
@@ -1538,7 +1560,7 @@ def test_basic_metric_success_both_semconv(self):
)
self.assertEqual(point.value, 0)
- def test_metric_target_attribute(self):
+ async def test_metric_target_attribute(self):
expected_target = "/api/user/{id}"
class TestRoute:
@@ -1554,7 +1576,8 @@ async def target_asgi(scope, receive, send):
app = otel_asgi.OpenTelemetryMiddleware(target_asgi)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
metrics_list = self.memory_metrics_reader.get_metrics_data()
assertions = 0
for resource_metric in metrics_list.resource_metrics:
@@ -1571,7 +1594,7 @@ async def target_asgi(scope, receive, send):
assertions += 1
self.assertEqual(assertions, 3)
- def test_no_metric_for_websockets(self):
+ async def test_no_metric_for_websockets(self):
self.scope = {
"type": "websocket",
"http_version": "1.1",
@@ -1584,10 +1607,10 @@ def test_no_metric_for_websockets(self):
}
app = otel_asgi.OpenTelemetryMiddleware(simple_asgi)
self.seed_app(app)
- self.send_input({"type": "websocket.connect"})
- self.send_input({"type": "websocket.receive", "text": "ping"})
- self.send_input({"type": "websocket.disconnect"})
- self.get_all_output()
+ await self.send_input({"type": "websocket.connect"})
+ await self.send_input({"type": "websocket.receive", "text": "ping"})
+ await self.send_input({"type": "websocket.disconnect"})
+ await self.get_all_output()
self.assertIsNone(self.memory_metrics_reader.get_metrics_data())
@@ -1636,10 +1659,8 @@ def test_request_attributes_new_semconv(self):
attrs,
{
HTTP_REQUEST_METHOD: "GET",
- SERVER_ADDRESS: "127.0.0.1",
URL_PATH: "/",
URL_QUERY: "foo=bar",
- URL_FULL: "http://127.0.0.1/?foo=bar",
SERVER_PORT: 80,
URL_SCHEME: "http",
NETWORK_PROTOCOL_VERSION: "1.0",
@@ -1673,10 +1694,8 @@ def test_request_attributes_both_semconv(self):
SpanAttributes.NET_PEER_IP: "127.0.0.1",
SpanAttributes.NET_PEER_PORT: 32767,
HTTP_REQUEST_METHOD: "GET",
- SERVER_ADDRESS: "127.0.0.1",
URL_PATH: "/",
URL_QUERY: "foo=bar",
- URL_FULL: "http://127.0.0.1/?foo=bar",
SERVER_PORT: 80,
URL_SCHEME: "http",
NETWORK_PROTOCOL_VERSION: "1.0",
@@ -1698,7 +1717,10 @@ def test_query_string_new_semconv(self):
self.scope,
_HTTPStabilityMode.HTTP,
)
- self.assertEqual(attrs[URL_FULL], "http://127.0.0.1/?foo=bar")
+ self.assertEqual(attrs[URL_SCHEME], "http")
+ self.assertEqual(attrs[CLIENT_ADDRESS], "127.0.0.1")
+ self.assertEqual(attrs[URL_PATH], "/")
+ self.assertEqual(attrs[URL_QUERY], "foo=bar")
def test_query_string_both_semconv(self):
self.scope["query_string"] = b"foo=bar"
@@ -1706,10 +1728,13 @@ def test_query_string_both_semconv(self):
self.scope,
_HTTPStabilityMode.HTTP_DUP,
)
- self.assertEqual(attrs[URL_FULL], "http://127.0.0.1/?foo=bar")
self.assertEqual(
attrs[SpanAttributes.HTTP_URL], "http://127.0.0.1/?foo=bar"
)
+ self.assertEqual(attrs[URL_SCHEME], "http")
+ self.assertEqual(attrs[CLIENT_ADDRESS], "127.0.0.1")
+ self.assertEqual(attrs[URL_PATH], "/")
+ self.assertEqual(attrs[URL_QUERY], "foo=bar")
def test_query_string_percent_bytes(self):
self.scope["query_string"] = b"foo%3Dbar"
@@ -1802,8 +1827,10 @@ def test_collect_target_attribute_fastapi_starlette_invalid(self):
)
-class TestWrappedApplication(AsgiTestBase):
- def test_mark_span_internal_in_presence_of_span_from_other_framework(self):
+class TestWrappedApplication(AsyncAsgiTestBase):
+ async def test_mark_span_internal_in_presence_of_span_from_other_framework(
+ self,
+ ):
tracer_provider, exporter = TestBase.create_tracer_provider()
tracer = tracer_provider.get_tracer(__name__)
app = otel_asgi.OpenTelemetryMiddleware(
@@ -1818,7 +1845,8 @@ async def wrapped_app(scope, receive, send):
await app(scope, receive, send)
self.seed_app(wrapped_app)
- self.send_default_request()
+ await self.send_default_request()
+ await self.get_all_output()
span_list = exporter.get_finished_spans()
self.assertEqual(SpanKind.INTERNAL, span_list[0].kind)
@@ -1835,11 +1863,11 @@ async def wrapped_app(scope, receive, send):
)
-class TestAsgiApplicationRaisingError(AsgiTestBase):
+class TestAsgiApplicationRaisingError(AsyncAsgiTestBase):
def tearDown(self):
pass
- def test_asgi_issue_1883(self):
+ async def test_asgi_value_error_exception(self):
"""
Test that exception UnboundLocalError local variable 'start' referenced before assignment is not raised
See https://github.com/open-telemetry/opentelemetry-python-contrib/issues/1883
@@ -1850,11 +1878,9 @@ async def bad_app(_scope, _receive, _send):
app = otel_asgi.OpenTelemetryMiddleware(bad_app)
self.seed_app(app)
- self.send_default_request()
+ await self.send_default_request()
try:
- asyncio.get_event_loop().run_until_complete(
- self.communicator.stop()
- )
+ await self.communicator.wait()
except ValueError as exc_info:
self.assertEqual(exc_info.args[0], "whatever")
except Exception as exc_info: # pylint: disable=W0703
diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml b/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml
index bac1400a38..36ed960392 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-asyncio/pyproject.toml
@@ -26,9 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.14",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-test-utils == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py b/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
index f5f0d34c4f..e83f384a8c 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/__init__.py
@@ -14,7 +14,7 @@
"""
.. asyncio: https://github.com/python/asyncio
-The opentelemetry-instrumentation-asycnio package allows tracing asyncio applications.
+The opentelemetry-instrumentation-asyncio package allows tracing asyncio applications.
The metric for coroutine, future, is generated even if there is no setting to generate a span.
Run instrumented application
@@ -262,7 +262,7 @@ def trace_item(self, coro_or_future):
async def trace_coroutine(self, coro):
if not hasattr(coro, "__name__"):
- return coro
+ return await coro
start = default_timer()
attr = {
"type": "coroutine",
diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/version.py b/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/version.py
+++ b/instrumentation/opentelemetry-instrumentation-asyncio/src/opentelemetry/instrumentation/asyncio/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt
index a196e8d4e3..7f20d1497c 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-asyncio/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_anext.py b/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_anext.py
index e51f059ca0..5241b3f2cc 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_anext.py
+++ b/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_anext.py
@@ -43,19 +43,23 @@ def tearDown(self):
# Asyncio anext() does not have __name__ attribute, which is used to determine if the coroutine should be traced.
# This test is to ensure that the instrumentation does not break when the coroutine does not have __name__ attribute.
+ # Additionally, ensure the coroutine is actually awaited.
@skipIf(
sys.version_info < (3, 10), "anext is only available in Python 3.10+"
)
def test_asyncio_anext(self):
async def main():
async def async_gen():
- for it in range(2):
+ # nothing special about this range other than to avoid returning a zero
+ # from a function named 'main' (which might cause confusion about intent)
+ for it in range(2, 4):
yield it
async_gen_instance = async_gen()
agen = anext(async_gen_instance)
- await asyncio.create_task(agen)
+ return await asyncio.create_task(agen)
- asyncio.run(main())
+ ret = asyncio.run(main())
+ self.assertEqual(ret, 2) # first iteration from range()
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 0)
diff --git a/instrumentation/opentelemetry-instrumentation-asyncpg/pyproject.toml b/instrumentation/opentelemetry-instrumentation-asyncpg/pyproject.toml
index 820c86070d..5a6632a028 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncpg/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-asyncpg/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-asyncpg/src/opentelemetry/instrumentation/asyncpg/version.py b/instrumentation/opentelemetry-instrumentation-asyncpg/src/opentelemetry/instrumentation/asyncpg/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncpg/src/opentelemetry/instrumentation/asyncpg/version.py
+++ b/instrumentation/opentelemetry-instrumentation-asyncpg/src/opentelemetry/instrumentation/asyncpg/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-asyncpg/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-asyncpg/test-requirements.txt
index badc61cde8..60cef50a7a 100644
--- a/instrumentation/opentelemetry-instrumentation-asyncpg/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-asyncpg/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
async-timeout==4.0.3
asyncpg==0.29.0
Deprecated==1.2.14
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml b/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml
index 4d6b431d91..debc3ce033 100644
--- a/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/pyproject.toml
@@ -25,9 +25,9 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-propagator-aws-xray == 1.0.1",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-propagator-aws-xray ~= 1.0.1",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
index c320c12bde..fb5da8ce48 100644
--- a/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/__init__.py
@@ -76,6 +76,7 @@ def custom_event_context_extractor(lambda_event):
from wrapt import wrap_function_wrapper
+from opentelemetry import context as context_api
from opentelemetry.context.context import Context
from opentelemetry.instrumentation.aws_lambda.package import _instruments
from opentelemetry.instrumentation.aws_lambda.version import __version__
@@ -303,66 +304,75 @@ def _instrumented_lambda_handler_call( # noqa pylint: disable=too-many-branches
schema_url="https://opentelemetry.io/schemas/1.11.0",
)
- with tracer.start_as_current_span(
- name=orig_handler_name,
- context=parent_context,
- kind=span_kind,
- ) as span:
- if span.is_recording():
- lambda_context = args[1]
- # NOTE: The specs mention an exception here, allowing the
- # `SpanAttributes.CLOUD_RESOURCE_ID` attribute to be set as a span
- # attribute instead of a resource attribute.
- #
- # See more:
- # https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/aws-lambda.md#resource-detector
- span.set_attribute(
- SpanAttributes.CLOUD_RESOURCE_ID,
- lambda_context.invoked_function_arn,
- )
- span.set_attribute(
- SpanAttributes.FAAS_INVOCATION_ID,
- lambda_context.aws_request_id,
- )
-
- # NOTE: `cloud.account.id` can be parsed from the ARN as the fifth item when splitting on `:`
- #
- # See more:
- # https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/aws-lambda.md#all-triggers
- account_id = lambda_context.invoked_function_arn.split(":")[4]
- span.set_attribute(
- ResourceAttributes.CLOUD_ACCOUNT_ID,
- account_id,
- )
+ token = context_api.attach(parent_context)
+ try:
+ with tracer.start_as_current_span(
+ name=orig_handler_name,
+ kind=span_kind,
+ ) as span:
+ if span.is_recording():
+ lambda_context = args[1]
+ # NOTE: The specs mention an exception here, allowing the
+ # `SpanAttributes.CLOUD_RESOURCE_ID` attribute to be set as a span
+ # attribute instead of a resource attribute.
+ #
+ # See more:
+ # https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/aws-lambda.md#resource-detector
+ span.set_attribute(
+ SpanAttributes.CLOUD_RESOURCE_ID,
+ lambda_context.invoked_function_arn,
+ )
+ span.set_attribute(
+ SpanAttributes.FAAS_INVOCATION_ID,
+ lambda_context.aws_request_id,
+ )
- exception = None
- result = None
- try:
- result = call_wrapped(*args, **kwargs)
- except Exception as exc: # pylint: disable=W0703
- exception = exc
- span.set_status(Status(StatusCode.ERROR))
- span.record_exception(exception)
-
- # If the request came from an API Gateway, extract http attributes from the event
- # https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/instrumentation/aws-lambda.md#api-gateway
- # https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-server-semantic-conventions
- if isinstance(lambda_event, dict) and lambda_event.get(
- "requestContext"
- ):
- span.set_attribute(SpanAttributes.FAAS_TRIGGER, "http")
-
- if lambda_event.get("version") == "2.0":
- _set_api_gateway_v2_proxy_attributes(lambda_event, span)
- else:
- _set_api_gateway_v1_proxy_attributes(lambda_event, span)
-
- if isinstance(result, dict) and result.get("statusCode"):
+ # NOTE: `cloud.account.id` can be parsed from the ARN as the fifth item when splitting on `:`
+ #
+ # See more:
+ # https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/aws-lambda.md#all-triggers
+ account_id = lambda_context.invoked_function_arn.split(
+ ":"
+ )[4]
span.set_attribute(
- SpanAttributes.HTTP_STATUS_CODE,
- result.get("statusCode"),
+ ResourceAttributes.CLOUD_ACCOUNT_ID,
+ account_id,
)
+ exception = None
+ result = None
+ try:
+ result = call_wrapped(*args, **kwargs)
+ except Exception as exc: # pylint: disable=W0703
+ exception = exc
+ span.set_status(Status(StatusCode.ERROR))
+ span.record_exception(exception)
+
+ # If the request came from an API Gateway, extract http attributes from the event
+ # https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/instrumentation/aws-lambda.md#api-gateway
+ # https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-server-semantic-conventions
+ if isinstance(lambda_event, dict) and lambda_event.get(
+ "requestContext"
+ ):
+ span.set_attribute(SpanAttributes.FAAS_TRIGGER, "http")
+
+ if lambda_event.get("version") == "2.0":
+ _set_api_gateway_v2_proxy_attributes(
+ lambda_event, span
+ )
+ else:
+ _set_api_gateway_v1_proxy_attributes(
+ lambda_event, span
+ )
+
+ if isinstance(result, dict) and result.get("statusCode"):
+ span.set_attribute(
+ SpanAttributes.HTTP_STATUS_CODE,
+ result.get("statusCode"),
+ )
+ finally:
+ context_api.detach(token)
+
now = time.time()
_tracer_provider = tracer_provider or get_tracer_provider()
if hasattr(_tracer_provider, "force_flush"):
@@ -410,7 +420,7 @@ def _instrument(self, **kwargs):
"""Instruments Lambda Handlers on AWS Lambda.
See more:
- https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/instrumentation/aws-lambda.md#instrumenting-aws-lambda
+ https://github.com/open-telemetry/semantic-conventions/blob/main/docs/faas/aws-lambda.md
Args:
**kwargs: Optional arguments
@@ -422,6 +432,14 @@ def _instrument(self, **kwargs):
request.
"""
lambda_handler = os.environ.get(ORIG_HANDLER, os.environ.get(_HANDLER))
+ if not lambda_handler:
+ logger.warning(
+ (
+ "Could not find the ORIG_HANDLER or _HANDLER in the environment variables. ",
+ "This instrumentation requires the OpenTelemetry Lambda extension installed.",
+ )
+ )
+ return
# pylint: disable=attribute-defined-outside-init
(
self._wrapped_module_name,
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/version.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/version.py
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/src/opentelemetry/instrumentation/aws_lambda/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-aws-lambda/test-requirements.txt
index 6540349a2e..8d9fe19483 100644
--- a/instrumentation/opentelemetry-instrumentation-aws-lambda/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/alb_conventional_headers_event.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/alb_conventional_headers_event.py
new file mode 100644
index 0000000000..7462f2a64e
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/alb_conventional_headers_event.py
@@ -0,0 +1,24 @@
+MOCK_LAMBDA_ALB_EVENT = {
+ "requestContext": {
+ "elb": {
+ "targetGroupArn": "arn:aws:elasticloadbalancing:region:123456789012:targetgroup/my-target-group/6d0ecf831eec9f09"
+ }
+ },
+ "httpMethod": "GET",
+ "path": "/",
+ "queryStringParameters": {"foo": "bar"},
+ "headers": {
+ "accept": "text/html,application/xhtml+xml",
+ "accept-language": "en-US,en;q=0.8",
+ "content-type": "text/plain",
+ "cookie": "cookies",
+ "host": "lambda-846800462-us-east-2.elb.amazonaws.com",
+ "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)",
+ "x-amzn-trace-id": "Root=1-5bdb40ca-556d8b0c50dc66f0511bf520",
+ "x-forwarded-for": "72.21.198.66",
+ "x-forwarded-port": "443",
+ "x-forwarded-proto": "https",
+ },
+ "isBase64Encoded": False,
+ "body": "request_body",
+}
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/alb_multi_value_headers_event.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/alb_multi_value_headers_event.py
new file mode 100644
index 0000000000..bf7c2ae686
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/alb_multi_value_headers_event.py
@@ -0,0 +1,30 @@
+"""
+https://docs.aws.amazon.com/elasticloadbalancing/latest/application/lambda-functions.html#multi-value-headers
+
+When an ALB is configured to send multi-value headers, the headers are sent as a list of values under the key in the multiValueHeaders object.
+"""
+
+MOCK_LAMBDA_ALB_MULTI_VALUE_HEADER_EVENT = {
+ "requestContext": {
+ "elb": {
+ "targetGroupArn": "arn:aws:elasticloadbalancing:region:123456789012:targetgroup/my-target-group/6d0ecf831eec9f09"
+ }
+ },
+ "httpMethod": "GET",
+ "path": "/",
+ "queryStringParameters": {"foo": "bar"},
+ "multiValueHeaders": {
+ "accept": ["text/html,application/xhtml+xml"],
+ "accept-language": ["en-US,en;q=0.8"],
+ "content-type": ["text/plain"],
+ "cookie": ["cookies"],
+ "host": ["lambda-846800462-us-east-2.elb.amazonaws.com"],
+ "user-agent": ["Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6)"],
+ "x-amzn-trace-id": ["Root=1-5bdb40ca-556d8b0c50dc66f0511bf520"],
+ "x-forwarded-for": ["72.21.198.66"],
+ "x-forwarded-port": ["443"],
+ "x-forwarded-proto": ["https"],
+ },
+ "isBase64Encoded": False,
+ "body": "request_body",
+}
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/dynamo_db_event.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/dynamo_db_event.py
new file mode 100644
index 0000000000..ea11237082
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/dynamo_db_event.py
@@ -0,0 +1,48 @@
+"""
+https://docs.aws.amazon.com/lambda/latest/dg/with-ddb.html
+"""
+
+MOCK_LAMBDA_DYNAMO_DB_EVENT = {
+ "Records": [
+ {
+ "eventID": "1",
+ "eventVersion": "1.0",
+ "dynamodb": {
+ "Keys": {"Id": {"N": "101"}},
+ "NewImage": {
+ "Message": {"S": "New item!"},
+ "Id": {"N": "101"},
+ },
+ "StreamViewType": "NEW_AND_OLD_IMAGES",
+ "SequenceNumber": "111",
+ "SizeBytes": 26,
+ },
+ "awsRegion": "us-west-2",
+ "eventName": "INSERT",
+ "eventSourceARN": "arn:aws:dynamodb:us-east-2:123456789012:table/my-table/stream/2023-06-10T19:26:16.525",
+ "eventSource": "aws:dynamodb",
+ },
+ {
+ "eventID": "2",
+ "eventVersion": "1.0",
+ "dynamodb": {
+ "OldImage": {
+ "Message": {"S": "New item!"},
+ "Id": {"N": "101"},
+ },
+ "SequenceNumber": "222",
+ "Keys": {"Id": {"N": "101"}},
+ "SizeBytes": 59,
+ "NewImage": {
+ "Message": {"S": "This item has changed"},
+ "Id": {"N": "101"},
+ },
+ "StreamViewType": "NEW_AND_OLD_IMAGES",
+ },
+ "awsRegion": "us-west-2",
+ "eventName": "MODIFY",
+ "eventSourceARN": "arn:aws:dynamodb:us-east-2:123456789012:table/my-table/stream/2023-06-10T19:26:16.525",
+ "eventSource": "aws:dynamodb",
+ },
+ ]
+}
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/lambda_function.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/lambda_function.py
index 539c896a0b..0387152951 100644
--- a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/lambda_function.py
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/lambda_function.py
@@ -12,9 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import json
+
+from opentelemetry import baggage as baggage_api
+
def handler(event, context):
- return "200 ok"
+ baggage_content = dict(baggage_api.get_all().items())
+ return json.dumps({"baggage_content": baggage_content})
def rest_api_handler(event, context):
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/s3_event.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/s3_event.py
new file mode 100644
index 0000000000..8a866c0d4d
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/s3_event.py
@@ -0,0 +1,36 @@
+"""
+https://docs.aws.amazon.com/lambda/latest/dg/with-s3.html
+"""
+
+MOCK_LAMBDA_S3_EVENT = {
+ "Records": [
+ {
+ "eventVersion": "2.1",
+ "eventSource": "aws:s3",
+ "awsRegion": "us-east-2",
+ "eventTime": "2019-09-03T19:37:27.192Z",
+ "eventName": "ObjectCreated:Put",
+ "userIdentity": {"principalId": "AWS:AIDAINPONIXQXHT3IKHL2"},
+ "requestParameters": {"sourceIPAddress": "205.255.255.255"},
+ "responseElements": {
+ "x-amz-request-id": "D82B88E5F771F645",
+ "x-amz-id-2": "vlR7PnpV2Ce81l0PRw6jlUpck7Jo5ZsQjryTjKlc5aLWGVHPZLj5NeC6qMa0emYBDXOo6QBU0Wo=",
+ },
+ "s3": {
+ "s3SchemaVersion": "1.0",
+ "configurationId": "828aa6fc-f7b5-4305-8584-487c791949c1",
+ "bucket": {
+ "name": "DOC-EXAMPLE-BUCKET",
+ "ownerIdentity": {"principalId": "A3I5XTEXAMAI3E"},
+ "arn": "arn:aws:s3:::lambda-artifacts-deafc19498e3f2df",
+ },
+ "object": {
+ "key": "b21b84d653bb07b05b1e6b33684dc11b",
+ "size": 1305107,
+ "eTag": "b21b84d653bb07b05b1e6b33684dc11b",
+ "sequencer": "0C0F6F405D6ED209E1",
+ },
+ },
+ }
+ ]
+}
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/sns_event.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/sns_event.py
new file mode 100644
index 0000000000..f53155e26f
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/sns_event.py
@@ -0,0 +1,29 @@
+"""
+https://docs.aws.amazon.com/lambda/latest/dg/with-sns.html
+"""
+
+MOCK_LAMBDA_SNS_EVENT = {
+ "Records": [
+ {
+ "EventVersion": "1.0",
+ "EventSubscriptionArn": "arn:aws:sns:us-east-1:123456789012:sns-lambda:21be56ed-a058-49f5-8c98-aedd2564c486",
+ "EventSource": "aws:sns",
+ "Sns": {
+ "SignatureVersion": "1",
+ "Timestamp": "2019-01-02T12:45:07.000Z",
+ "Signature": "mock-signature",
+ "SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-ac565b8b1a6c5d002d285f9598aa1d9b.pem",
+ "MessageId": "95df01b4-ee98-5cb9-9903-4c221d41eb5e",
+ "Message": "Hello from SNS!",
+ "MessageAttributes": {
+ "Test": {"Type": "String", "Value": "TestString"},
+ "TestBinary": {"Type": "Binary", "Value": "TestBinary"},
+ },
+ "Type": "Notification",
+ "UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:123456789012:test-lambda:21be56ed-a058-49f5-8c98-aedd2564c486",
+ "TopicArn": "arn:aws:sns:us-east-1:123456789012:sns-lambda",
+ "Subject": "TestInvoke",
+ },
+ }
+ ]
+}
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/sqs_event.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/sqs_event.py
new file mode 100644
index 0000000000..081ff9debd
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/mocks/sqs_event.py
@@ -0,0 +1,24 @@
+"""
+https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html
+"""
+
+MOCK_LAMBDA_SQS_EVENT = {
+ "Records": [
+ {
+ "messageId": "059f36b4-87a3-44ab-83d2-661975830a7d",
+ "receiptHandle": "AQEBwJnKyrHigUMZj6rYigCgxlaS3SLy0a...",
+ "body": "Test message.",
+ "attributes": {
+ "ApproximateReceiveCount": "1",
+ "SentTimestamp": "1545082649183",
+ "SenderId": "AIDAIENQZJOLO23YVJ4VO",
+ "ApproximateFirstReceiveTimestamp": "1545082649185",
+ },
+ "messageAttributes": {},
+ "md5OfBody": "e4e68fb7bd0e697a0ae8f1bb342846b3",
+ "eventSource": "aws:sqs",
+ "eventSourceARN": "arn:aws:sqs:us-east-2:123456789012:my-queue",
+ "awsRegion": "us-east-2",
+ }
+ ]
+}
diff --git a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py
index 9f25524e43..7f805c327c 100644
--- a/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py
+++ b/instrumentation/opentelemetry-instrumentation-aws-lambda/tests/test_aws_lambda_instrumentation_manual.py
@@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
import os
from dataclasses import dataclass
from importlib import import_module, reload
@@ -19,6 +18,7 @@
from unittest import mock
from opentelemetry import propagate
+from opentelemetry.baggage.propagation import W3CBaggagePropagator
from opentelemetry.environment_variables import OTEL_PROPAGATORS
from opentelemetry.instrumentation.aws_lambda import (
_HANDLER,
@@ -40,10 +40,18 @@
)
from opentelemetry.util._importlib_metadata import entry_points
+from .mocks.alb_conventional_headers_event import MOCK_LAMBDA_ALB_EVENT
+from .mocks.alb_multi_value_headers_event import (
+ MOCK_LAMBDA_ALB_MULTI_VALUE_HEADER_EVENT,
+)
from .mocks.api_gateway_http_api_event import (
MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT,
)
from .mocks.api_gateway_proxy_event import MOCK_LAMBDA_API_GATEWAY_PROXY_EVENT
+from .mocks.dynamo_db_event import MOCK_LAMBDA_DYNAMO_DB_EVENT
+from .mocks.s3_event import MOCK_LAMBDA_S3_EVENT
+from .mocks.sns_event import MOCK_LAMBDA_SNS_EVENT
+from .mocks.sqs_event import MOCK_LAMBDA_SQS_EVENT
class MockLambdaContext:
@@ -57,8 +65,17 @@ def __init__(self, aws_request_id, invoked_function_arn):
invoked_function_arn="arn:aws:lambda:us-east-1:123456:function:myfunction:myalias",
)
-MOCK_XRAY_TRACE_ID = 0x5FB7331105E8BB83207FA31D4D9CDB4C
+MOCK_LAMBDA_CONTEXT_ATTRIBUTES = {
+ SpanAttributes.CLOUD_RESOURCE_ID: MOCK_LAMBDA_CONTEXT.invoked_function_arn,
+ SpanAttributes.FAAS_INVOCATION_ID: MOCK_LAMBDA_CONTEXT.aws_request_id,
+ ResourceAttributes.CLOUD_ACCOUNT_ID: MOCK_LAMBDA_CONTEXT.invoked_function_arn.split(
+ ":"
+ )[
+ 4
+ ],
+}
+MOCK_XRAY_TRACE_ID = 0x5FB7331105E8BB83207FA31D4D9CDB4C
MOCK_XRAY_TRACE_ID_STR = f"{MOCK_XRAY_TRACE_ID:x}"
MOCK_XRAY_PARENT_SPAN_ID = 0x3328B8445A6DBAD2
MOCK_XRAY_TRACE_CONTEXT_COMMON = f"Root={TRACE_ID_VERSION}-{MOCK_XRAY_TRACE_ID_STR[:TRACE_ID_FIRST_PART_LENGTH]}-{MOCK_XRAY_TRACE_ID_STR[TRACE_ID_FIRST_PART_LENGTH:]};Parent={MOCK_XRAY_PARENT_SPAN_ID:x}"
@@ -79,12 +96,14 @@ def __init__(self, aws_request_id, invoked_function_arn):
MOCK_W3C_TRACE_STATE_KEY = "vendor_specific_key"
MOCK_W3C_TRACE_STATE_VALUE = "test_value"
+MOCK_W3C_BAGGAGE_KEY = "baggage_key"
+MOCK_W3C_BAGGAGE_VALUE = "baggage_value"
+
def mock_execute_lambda(event=None):
"""Mocks the AWS Lambda execution.
NOTE: We don't use `moto`'s `mock_lambda` because we are not instrumenting
-
calls to AWS Lambda using the AWS SDK. Instead, we are instrumenting AWS
Lambda itself.
@@ -97,10 +116,10 @@ def mock_execute_lambda(event=None):
module_name, handler_name = os.environ[_HANDLER].rsplit(".", 1)
handler_module = import_module(module_name.replace("/", "."))
- getattr(handler_module, handler_name)(event, MOCK_LAMBDA_CONTEXT)
+ return getattr(handler_module, handler_name)(event, MOCK_LAMBDA_CONTEXT)
-class TestAwsLambdaInstrumentor(TestBase):
+class TestAwsLambdaInstrumentorBase(TestBase):
"""AWS Lambda Instrumentation Testsuite"""
def setUp(self):
@@ -120,6 +139,8 @@ def tearDown(self):
self.common_env_patch.stop()
AwsLambdaInstrumentor().uninstrument()
+
+class TestAwsLambdaInstrumentor(TestAwsLambdaInstrumentorBase):
def test_active_tracing(self):
test_env_patch = mock.patch.dict(
"os.environ",
@@ -149,15 +170,7 @@ def test_active_tracing(self):
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertSpanHasAttributes(
span,
- {
- SpanAttributes.CLOUD_RESOURCE_ID: MOCK_LAMBDA_CONTEXT.invoked_function_arn,
- SpanAttributes.FAAS_INVOCATION_ID: MOCK_LAMBDA_CONTEXT.aws_request_id,
- ResourceAttributes.CLOUD_ACCOUNT_ID: MOCK_LAMBDA_CONTEXT.invoked_function_arn.split(
- ":"
- )[
- 4
- ],
- },
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
)
parent_context = span.parent
@@ -181,6 +194,9 @@ class TestCase:
expected_state_value: str = None
expected_trace_state_len: int = 0
propagators: str = "tracecontext"
+ expected_baggage: str = None
+ disable_aws_context_propagation: bool = False
+ disable_aws_context_propagation_envvar: str = ""
def custom_event_context_extractor(lambda_event):
return get_global_textmap().extract(lambda_event["foo"]["headers"])
@@ -266,49 +282,72 @@ def custom_event_context_extractor(lambda_event):
expected_state_value=MOCK_W3C_TRACE_STATE_VALUE,
xray_traceid=MOCK_XRAY_TRACE_CONTEXT_SAMPLED,
),
+ TestCase(
+ name="baggage_propagation",
+ custom_extractor=None,
+ context={
+ "headers": {
+ TraceContextTextMapPropagator._TRACEPARENT_HEADER_NAME: MOCK_W3C_TRACE_CONTEXT_SAMPLED,
+ TraceContextTextMapPropagator._TRACESTATE_HEADER_NAME: f"{MOCK_W3C_TRACE_STATE_KEY}={MOCK_W3C_TRACE_STATE_VALUE},foo=1,bar=2",
+ W3CBaggagePropagator._BAGGAGE_HEADER_NAME: f"{MOCK_W3C_BAGGAGE_KEY}={MOCK_W3C_BAGGAGE_VALUE}",
+ }
+ },
+ expected_traceid=MOCK_W3C_TRACE_ID,
+ expected_parentid=MOCK_W3C_PARENT_SPAN_ID,
+ expected_trace_state_len=3,
+ expected_state_value=MOCK_W3C_TRACE_STATE_VALUE,
+ xray_traceid=MOCK_XRAY_TRACE_CONTEXT_NOT_SAMPLED,
+ expected_baggage=MOCK_W3C_BAGGAGE_VALUE,
+ propagators="tracecontext,baggage",
+ ),
]
for test in tests:
+ with self.subTest(test_name=test.name):
+ test_env_patch = mock.patch.dict(
+ "os.environ",
+ {
+ **os.environ,
+ # NOT Active Tracing
+ _X_AMZN_TRACE_ID: test.xray_traceid,
+ OTEL_PROPAGATORS: test.propagators,
+ },
+ )
+ test_env_patch.start()
+ reload(propagate)
- test_env_patch = mock.patch.dict(
- "os.environ",
- {
- **os.environ,
- # NOT Active Tracing
- _X_AMZN_TRACE_ID: test.xray_traceid,
- OTEL_PROPAGATORS: test.propagators,
- },
- )
- test_env_patch.start()
- reload(propagate)
+ AwsLambdaInstrumentor().instrument(
+ event_context_extractor=test.custom_extractor,
+ )
- AwsLambdaInstrumentor().instrument(
- event_context_extractor=test.custom_extractor,
- )
- mock_execute_lambda(test.context)
- spans = self.memory_exporter.get_finished_spans()
- assert spans
- self.assertEqual(len(spans), 1)
- span = spans[0]
- self.assertEqual(
- span.get_span_context().trace_id, test.expected_traceid
- )
+ mock_execute_lambda(test.context)
- parent_context = span.parent
- self.assertEqual(
- parent_context.trace_id, span.get_span_context().trace_id
- )
- self.assertEqual(parent_context.span_id, test.expected_parentid)
- self.assertEqual(
- len(parent_context.trace_state), test.expected_trace_state_len
- )
- self.assertEqual(
- parent_context.trace_state.get(MOCK_W3C_TRACE_STATE_KEY),
- test.expected_state_value,
- )
- self.assertTrue(parent_context.is_remote)
- self.memory_exporter.clear()
- AwsLambdaInstrumentor().uninstrument()
- test_env_patch.stop()
+ spans = self.memory_exporter.get_finished_spans()
+ assert spans
+ self.assertEqual(len(spans), 1)
+ span = spans[0]
+ self.assertEqual(
+ span.get_span_context().trace_id, test.expected_traceid
+ )
+
+ parent_context = span.parent
+ self.assertEqual(
+ parent_context.trace_id, span.get_span_context().trace_id
+ )
+ self.assertEqual(
+ parent_context.span_id, test.expected_parentid
+ )
+ self.assertEqual(
+ len(parent_context.trace_state),
+ test.expected_trace_state_len,
+ )
+ self.assertEqual(
+ parent_context.trace_state.get(MOCK_W3C_TRACE_STATE_KEY),
+ test.expected_state_value,
+ )
+ self.assertTrue(parent_context.is_remote)
+ self.memory_exporter.clear()
+ AwsLambdaInstrumentor().uninstrument()
+ test_env_patch.stop()
def test_lambda_no_error_with_invalid_flush_timeout(self):
test_env_patch = mock.patch.dict(
@@ -388,12 +427,99 @@ def test_lambda_handles_invalid_event_source(self):
assert spans
assert len(spans) == 1
- assert (
- spans[0].kind == SpanKind.SERVER
- ) # Default to SERVER for unknown sources
+ # Default to SERVER for unknown sources
+ assert spans[0].kind == SpanKind.SERVER
+
+ for span in spans:
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
test_env_patch.stop()
+ def test_lambda_handles_list_event(self):
+ AwsLambdaInstrumentor().instrument()
+
+ mock_execute_lambda([{"message": "test"}])
+
+ spans = self.memory_exporter.get_finished_spans()
+
+ assert spans
+
+ def test_lambda_handles_handler_exception(self):
+ exc_env_patch = mock.patch.dict(
+ "os.environ",
+ {_HANDLER: "tests.mocks.lambda_function.handler_exc"},
+ )
+ exc_env_patch.start()
+ AwsLambdaInstrumentor().instrument()
+ # instrumentor re-raises the exception
+ with self.assertRaises(Exception):
+ mock_execute_lambda()
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+ span = spans[0]
+ self.assertEqual(span.status.status_code, StatusCode.ERROR)
+ self.assertEqual(len(span.events), 1)
+ event = span.events[0]
+ self.assertEqual(event.name, "exception")
+
+ exc_env_patch.stop()
+
+ def test_lambda_handles_should_do_nothing_when_environment_variables_not_present(
+ self,
+ ):
+ exc_env_patch = mock.patch.dict(
+ "os.environ",
+ {_HANDLER: ""},
+ )
+ exc_env_patch.start()
+ AwsLambdaInstrumentor().instrument()
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 0)
+ exc_env_patch.stop()
+
+ def test_uninstrument(self):
+ AwsLambdaInstrumentor().instrument()
+
+ mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+
+ self.memory_exporter.clear()
+ AwsLambdaInstrumentor().uninstrument()
+
+ mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 0)
+
+ def test_no_op_tracer_provider(self):
+ tracer_provider = NoOpTracerProvider()
+ AwsLambdaInstrumentor().instrument(tracer_provider=tracer_provider)
+
+ mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
+ spans = self.memory_exporter.get_finished_spans()
+ assert spans is not None
+ self.assertEqual(len(spans), 0)
+
+ def test_load_entry_point(self):
+ self.assertIs(
+ next(
+ iter(
+ entry_points(
+ group="opentelemetry_instrumentor", name="aws-lambda"
+ )
+ )
+ ).load(),
+ AwsLambdaInstrumentor,
+ )
+
+
+class TestAwsLambdaInstrumentorMocks(TestAwsLambdaInstrumentorBase):
def test_api_gateway_proxy_event_sets_attributes(self):
handler_patch = mock.patch.dict(
"os.environ",
@@ -405,8 +531,15 @@ def test_api_gateway_proxy_event_sets_attributes(self):
mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_PROXY_EVENT)
- span = self.memory_exporter.get_finished_spans()[0]
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.SERVER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
self.assertSpanHasAttributes(
span,
{
@@ -426,8 +559,15 @@ def test_api_gateway_http_api_proxy_event_sets_attributes(self):
mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
- span = self.memory_exporter.get_finished_spans()[0]
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.SERVER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
self.assertSpanHasAttributes(
span,
{
@@ -440,35 +580,109 @@ def test_api_gateway_http_api_proxy_event_sets_attributes(self):
},
)
- def test_lambda_handles_list_event(self):
+ def test_alb_conventional_event_sets_attributes(self):
AwsLambdaInstrumentor().instrument()
- mock_execute_lambda([{"message": "test"}])
+ mock_execute_lambda(MOCK_LAMBDA_ALB_EVENT)
spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
- assert spans
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.SERVER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
+ self.assertSpanHasAttributes(
+ span,
+ {
+ SpanAttributes.FAAS_TRIGGER: "http",
+ SpanAttributes.HTTP_METHOD: "GET",
+ },
+ )
- def test_lambda_handles_handler_exception(self):
- exc_env_patch = mock.patch.dict(
- "os.environ",
- {_HANDLER: "tests.mocks.lambda_function.handler_exc"},
+ def test_alb_multi_value_header_event_sets_attributes(self):
+ AwsLambdaInstrumentor().instrument()
+
+ mock_execute_lambda(MOCK_LAMBDA_ALB_MULTI_VALUE_HEADER_EVENT)
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.SERVER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
)
- exc_env_patch.start()
+ self.assertSpanHasAttributes(
+ span,
+ {
+ SpanAttributes.FAAS_TRIGGER: "http",
+ SpanAttributes.HTTP_METHOD: "GET",
+ },
+ )
+
+ def test_dynamo_db_event_sets_attributes(self):
AwsLambdaInstrumentor().instrument()
- # instrumentor re-raises the exception
- with self.assertRaises(Exception):
- mock_execute_lambda()
+
+ mock_execute_lambda(MOCK_LAMBDA_DYNAMO_DB_EVENT)
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 1)
- span = spans[0]
- self.assertEqual(span.status.status_code, StatusCode.ERROR)
- self.assertEqual(len(span.events), 1)
- event = span.events[0]
- self.assertEqual(event.name, "exception")
- exc_env_patch.stop()
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.CONSUMER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
+
+ def test_s3_event_sets_attributes(self):
+ AwsLambdaInstrumentor().instrument()
+
+ mock_execute_lambda(MOCK_LAMBDA_S3_EVENT)
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.CONSUMER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
+
+ def test_sns_event_sets_attributes(self):
+ AwsLambdaInstrumentor().instrument()
+
+ mock_execute_lambda(MOCK_LAMBDA_SNS_EVENT)
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.CONSUMER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
+
+ def test_sqs_event_sets_attributes(self):
+ AwsLambdaInstrumentor().instrument()
+
+ mock_execute_lambda(MOCK_LAMBDA_SQS_EVENT)
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 1)
+
+ span, *_ = spans
+ self.assertEqual(span.kind, SpanKind.CONSUMER)
+ self.assertSpanHasAttributes(
+ span,
+ MOCK_LAMBDA_CONTEXT_ATTRIBUTES,
+ )
def test_lambda_handles_handler_exception_with_api_gateway_proxy_event(
self,
@@ -479,6 +693,7 @@ def test_lambda_handles_handler_exception_with_api_gateway_proxy_event(
)
exc_env_patch.start()
AwsLambdaInstrumentor().instrument()
+
# instrumentor re-raises the exception
with self.assertRaises(Exception):
mock_execute_lambda(
@@ -487,46 +702,12 @@ def test_lambda_handles_handler_exception_with_api_gateway_proxy_event(
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 1)
- span = spans[0]
+
+ span, *_ = spans
self.assertEqual(span.status.status_code, StatusCode.ERROR)
self.assertEqual(len(span.events), 1)
- event = span.events[0]
+
+ event, *_ = span.events
self.assertEqual(event.name, "exception")
exc_env_patch.stop()
-
- def test_uninstrument(self):
- AwsLambdaInstrumentor().instrument()
-
- mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
-
- spans = self.memory_exporter.get_finished_spans()
- self.assertEqual(len(spans), 1)
-
- self.memory_exporter.clear()
- AwsLambdaInstrumentor().uninstrument()
-
- mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
- spans = self.memory_exporter.get_finished_spans()
- self.assertEqual(len(spans), 0)
-
- def test_no_op_tracer_provider(self):
- tracer_provider = NoOpTracerProvider()
- AwsLambdaInstrumentor().instrument(tracer_provider=tracer_provider)
-
- mock_execute_lambda(MOCK_LAMBDA_API_GATEWAY_HTTP_API_EVENT)
- spans = self.memory_exporter.get_finished_spans()
- assert spans is not None
- self.assertEqual(len(spans), 0)
-
- def test_load_entry_point(self):
- self.assertIs(
- next(
- iter(
- entry_points(
- group="opentelemetry_instrumentor", name="aws-lambda"
- )
- )
- ).load(),
- AwsLambdaInstrumentor,
- )
diff --git a/instrumentation/opentelemetry-instrumentation-boto/pyproject.toml b/instrumentation/opentelemetry-instrumentation-boto/pyproject.toml
index 3abda7b175..a2bdba302f 100644
--- a/instrumentation/opentelemetry-instrumentation-boto/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-boto/pyproject.toml
@@ -25,8 +25,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/version.py b/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/version.py
+++ b/instrumentation/opentelemetry-instrumentation-boto/src/opentelemetry/instrumentation/boto/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-boto/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-boto/test-requirements.txt
index ab4819b538..fe6467d1c4 100644
--- a/instrumentation/opentelemetry-instrumentation-boto/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-boto/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
boto==2.49.0
boto3==1.34.44
botocore==1.34.44
diff --git a/instrumentation/opentelemetry-instrumentation-boto3sqs/pyproject.toml b/instrumentation/opentelemetry-instrumentation-boto3sqs/pyproject.toml
index cbbf9cd679..72dc38cbec 100644
--- a/instrumentation/opentelemetry-instrumentation-boto3sqs/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-boto3sqs/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/version.py b/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/version.py
+++ b/instrumentation/opentelemetry-instrumentation-boto3sqs/src/opentelemetry/instrumentation/boto3sqs/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-boto3sqs/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-boto3sqs/test-requirements.txt
index c5942b6a72..d8a9c38315 100644
--- a/instrumentation/opentelemetry-instrumentation-boto3sqs/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-boto3sqs/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
boto3==1.34.44
botocore==1.34.44
Deprecated==1.2.14
diff --git a/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml b/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml
index 4714a7261f..797145b728 100644
--- a/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-botocore/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-propagator-aws-xray == 1.0.1",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-propagator-aws-xray ~= 1.0.1",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py b/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py
+++ b/instrumentation/opentelemetry-instrumentation-botocore/src/opentelemetry/instrumentation/botocore/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-botocore/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-botocore/test-requirements.txt
index e45fa6ba44..a89fdf2e30 100644
--- a/instrumentation/opentelemetry-instrumentation-botocore/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-botocore/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
aws-xray-sdk==2.12.1
boto3==1.28.80
botocore==1.31.80
diff --git a/instrumentation/opentelemetry-instrumentation-cassandra/pyproject.toml b/instrumentation/opentelemetry-instrumentation-cassandra/pyproject.toml
index b2ee19bdd2..3e785d1e8b 100644
--- a/instrumentation/opentelemetry-instrumentation-cassandra/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-cassandra/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-cassandra/src/opentelemetry/instrumentation/cassandra/version.py b/instrumentation/opentelemetry-instrumentation-cassandra/src/opentelemetry/instrumentation/cassandra/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-cassandra/src/opentelemetry/instrumentation/cassandra/version.py
+++ b/instrumentation/opentelemetry-instrumentation-cassandra/src/opentelemetry/instrumentation/cassandra/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-cassandra/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-cassandra/test-requirements.txt
index dc2090627d..189b2f65d0 100644
--- a/instrumentation/opentelemetry-instrumentation-cassandra/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-cassandra/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
cassandra-driver==3.29.0
click==8.1.7
Deprecated==1.2.14
diff --git a/instrumentation/opentelemetry-instrumentation-celery/pyproject.toml b/instrumentation/opentelemetry-instrumentation-celery/pyproject.toml
index 0d302a4206..9f0f594581 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-celery/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py
index 10ccca1270..39b3bffe60 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/__init__.py
@@ -67,6 +67,7 @@ def add(x, y):
from billiard.einfo import ExceptionInfo
from celery import signals # pylint: disable=no-name-in-module
+from opentelemetry import context as context_api
from opentelemetry import trace
from opentelemetry.instrumentation.celery import utils
from opentelemetry.instrumentation.celery.package import _instruments
@@ -169,6 +170,7 @@ def _trace_prerun(self, *args, **kwargs):
self.update_task_duration_time(task_id)
request = task.request
tracectx = extract(request, getter=celery_getter) or None
+ token = context_api.attach(tracectx) if tracectx is not None else None
logger.debug("prerun signal start task_id=%s", task_id)
@@ -179,7 +181,7 @@ def _trace_prerun(self, *args, **kwargs):
activation = trace.use_span(span, end_on_exit=True)
activation.__enter__() # pylint: disable=E1101
- utils.attach_span(task, task_id, (span, activation))
+ utils.attach_context(task, task_id, span, activation, token)
def _trace_postrun(self, *args, **kwargs):
task = utils.retrieve_task(kwargs)
@@ -191,11 +193,14 @@ def _trace_postrun(self, *args, **kwargs):
logger.debug("postrun signal task_id=%s", task_id)
# retrieve and finish the Span
- span, activation = utils.retrieve_span(task, task_id)
- if span is None:
+ ctx = utils.retrieve_context(task, task_id)
+
+ if ctx is None:
logger.warning("no existing span found for task_id=%s", task_id)
return
+ span, activation, token = ctx
+
# request context tags
if span.is_recording():
span.set_attribute(_TASK_TAG_KEY, _TASK_RUN)
@@ -204,10 +209,11 @@ def _trace_postrun(self, *args, **kwargs):
span.set_attribute(_TASK_NAME_KEY, task.name)
activation.__exit__(None, None, None)
- utils.detach_span(task, task_id)
+ utils.detach_context(task, task_id)
self.update_task_duration_time(task_id)
labels = {"task": task.name, "worker": task.request.hostname}
self._record_histograms(task_id, labels)
+ context_api.detach(token)
def _trace_before_publish(self, *args, **kwargs):
task = utils.retrieve_task_from_sender(kwargs)
@@ -238,7 +244,9 @@ def _trace_before_publish(self, *args, **kwargs):
activation = trace.use_span(span, end_on_exit=True)
activation.__enter__() # pylint: disable=E1101
- utils.attach_span(task, task_id, (span, activation), is_publish=True)
+ utils.attach_context(
+ task, task_id, span, activation, None, is_publish=True
+ )
headers = kwargs.get("headers")
if headers:
@@ -253,13 +261,16 @@ def _trace_after_publish(*args, **kwargs):
return
# retrieve and finish the Span
- _, activation = utils.retrieve_span(task, task_id, is_publish=True)
- if activation is None:
+ ctx = utils.retrieve_context(task, task_id, is_publish=True)
+
+ if ctx is None:
logger.warning("no existing span found for task_id=%s", task_id)
return
+ _, activation, _ = ctx
+
activation.__exit__(None, None, None) # pylint: disable=E1101
- utils.detach_span(task, task_id, is_publish=True)
+ utils.detach_context(task, task_id, is_publish=True)
@staticmethod
def _trace_failure(*args, **kwargs):
@@ -269,9 +280,14 @@ def _trace_failure(*args, **kwargs):
if task is None or task_id is None:
return
- # retrieve and pass exception info to activation
- span, _ = utils.retrieve_span(task, task_id)
- if span is None or not span.is_recording():
+ ctx = utils.retrieve_context(task, task_id)
+
+ if ctx is None:
+ return
+
+ span, _, _ = ctx
+
+ if not span.is_recording():
return
status_kwargs = {"status_code": StatusCode.ERROR}
@@ -311,8 +327,14 @@ def _trace_retry(*args, **kwargs):
if task is None or task_id is None or reason is None:
return
- span, _ = utils.retrieve_span(task, task_id)
- if span is None or not span.is_recording():
+ ctx = utils.retrieve_context(task, task_id)
+
+ if ctx is None:
+ return
+
+ span, _, _ = ctx
+
+ if not span.is_recording():
return
# Add retry reason metadata to span
diff --git a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/utils.py b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/utils.py
index 6f4f9cbc3a..6af310df5a 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/utils.py
+++ b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/utils.py
@@ -13,10 +13,13 @@
# limitations under the License.
import logging
+from typing import ContextManager, Optional, Tuple
from celery import registry # pylint: disable=no-name-in-module
+from celery.app.task import Task
from opentelemetry.semconv.trace import SpanAttributes
+from opentelemetry.trace import Span
logger = logging.getLogger(__name__)
@@ -81,10 +84,12 @@ def set_attributes_from_context(span, context):
elif key == "delivery_info":
# Get also destination from this
routing_key = value.get("routing_key")
+
if routing_key is not None:
span.set_attribute(
SpanAttributes.MESSAGING_DESTINATION, routing_key
)
+
value = str(value)
elif key == "id":
@@ -114,11 +119,18 @@ def set_attributes_from_context(span, context):
span.set_attribute(attribute_name, value)
-def attach_span(task, task_id, span, is_publish=False):
- """Helper to propagate a `Span` for the given `Task` instance. This
- function uses a `dict` that stores the Span using the
- `(task_id, is_publish)` as a key. This is useful when information must be
- propagated from one Celery signal to another.
+def attach_context(
+ task: Optional[Task],
+ task_id: str,
+ span: Span,
+ activation: ContextManager[Span],
+ token: Optional[object],
+ is_publish: bool = False,
+) -> None:
+ """Helper to propagate a `Span`, `ContextManager` and context token
+ for the given `Task` instance. This function uses a `dict` that stores
+ the Span using the `(task_id, is_publish)` as a key. This is useful
+ when information must be propagated from one Celery signal to another.
We use (task_id, is_publish) for the key to ensure that publishing a
task from within another task does not cause any conflicts.
@@ -134,36 +146,41 @@ def attach_span(task, task_id, span, is_publish=False):
"""
if task is None:
return
- span_dict = getattr(task, CTX_KEY, None)
- if span_dict is None:
- span_dict = {}
- setattr(task, CTX_KEY, span_dict)
- span_dict[(task_id, is_publish)] = span
+ ctx_dict = getattr(task, CTX_KEY, None)
+
+ if ctx_dict is None:
+ ctx_dict = {}
+ setattr(task, CTX_KEY, ctx_dict)
+
+ ctx_dict[(task_id, is_publish)] = (span, activation, token)
-def detach_span(task, task_id, is_publish=False):
- """Helper to remove a `Span` in a Celery task when it's propagated.
- This function handles tasks where the `Span` is not attached.
+def detach_context(task, task_id, is_publish=False) -> None:
+ """Helper to remove `Span`, `ContextManager` and context token in a
+ Celery task when it's propagated.
+ This function handles tasks where no values are attached to the `Task`.
"""
span_dict = getattr(task, CTX_KEY, None)
if span_dict is None:
return
- # See note in `attach_span` for key info
- span_dict.pop((task_id, is_publish), (None, None))
+ # See note in `attach_context` for key info
+ span_dict.pop((task_id, is_publish), None)
-def retrieve_span(task, task_id, is_publish=False):
- """Helper to retrieve an active `Span` stored in a `Task`
- instance
+def retrieve_context(
+ task, task_id, is_publish=False
+) -> Optional[Tuple[Span, ContextManager[Span], Optional[object]]]:
+ """Helper to retrieve an active `Span`, `ContextManager` and context token
+ stored in a `Task` instance
"""
span_dict = getattr(task, CTX_KEY, None)
if span_dict is None:
- return (None, None)
+ return None
- # See note in `attach_span` for key info
- return span_dict.get((task_id, is_publish), (None, None))
+ # See note in `attach_context` for key info
+ return span_dict.get((task_id, is_publish), None)
def retrieve_task(kwargs):
diff --git a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/version.py b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/version.py
+++ b/instrumentation/opentelemetry-instrumentation-celery/src/opentelemetry/instrumentation/celery/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-celery/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-celery/test-requirements-0.txt
index 401921f5e4..fcf838fc32 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-celery/test-requirements-0.txt
@@ -1,5 +1,5 @@
amqp==5.2.0
-asgiref==3.7.2
+asgiref==3.8.1
backports.zoneinfo==0.2.1
billiard==4.2.0
celery==5.3.6
diff --git a/instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt
index 1c5aad2c07..76b2f03d12 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-celery/test-requirements-1.txt
@@ -1,5 +1,5 @@
amqp==5.2.0
-asgiref==3.7.2
+asgiref==3.8.1
billiard==4.2.0
celery==5.3.6
click==8.1.7
diff --git a/instrumentation/opentelemetry-instrumentation-celery/tests/celery_test_tasks.py b/instrumentation/opentelemetry-instrumentation-celery/tests/celery_test_tasks.py
index 9ac78f6d8b..af88f1d4c3 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/tests/celery_test_tasks.py
+++ b/instrumentation/opentelemetry-instrumentation-celery/tests/celery_test_tasks.py
@@ -14,6 +14,8 @@
from celery import Celery
+from opentelemetry import baggage
+
class Config:
result_backend = "rpc"
@@ -36,3 +38,8 @@ def task_add(num_a, num_b):
@app.task
def task_raises():
raise CustomError("The task failed!")
+
+
+@app.task
+def task_returns_baggage():
+ return dict(baggage.get_all())
diff --git a/instrumentation/opentelemetry-instrumentation-celery/tests/test_tasks.py b/instrumentation/opentelemetry-instrumentation-celery/tests/test_tasks.py
index 3ac6a5a70c..0dc668b112 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/tests/test_tasks.py
+++ b/instrumentation/opentelemetry-instrumentation-celery/tests/test_tasks.py
@@ -15,12 +15,13 @@
import threading
import time
+from opentelemetry import baggage, context
from opentelemetry.instrumentation.celery import CeleryInstrumentor
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace import SpanKind, StatusCode
-from .celery_test_tasks import app, task_add, task_raises
+from .celery_test_tasks import app, task_add, task_raises, task_returns_baggage
class TestCeleryInstrumentation(TestBase):
@@ -168,6 +169,22 @@ def test_uninstrument(self):
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 0)
+ def test_baggage(self):
+ CeleryInstrumentor().instrument()
+
+ ctx = baggage.set_baggage("key", "value")
+ context.attach(ctx)
+
+ task = task_returns_baggage.delay()
+
+ timeout = time.time() + 60 * 1 # 1 minutes from now
+ while not task.ready():
+ if time.time() > timeout:
+ break
+ time.sleep(0.05)
+
+ self.assertEqual(task.result, {"key": "value"})
+
class TestCelerySignatureTask(TestBase):
def setUp(self):
diff --git a/instrumentation/opentelemetry-instrumentation-celery/tests/test_utils.py b/instrumentation/opentelemetry-instrumentation-celery/tests/test_utils.py
index 55aa3eec1e..a2f6e4338c 100644
--- a/instrumentation/opentelemetry-instrumentation-celery/tests/test_utils.py
+++ b/instrumentation/opentelemetry-instrumentation-celery/tests/test_utils.py
@@ -167,8 +167,10 @@ def fn_task():
# propagate and retrieve a Span
task_id = "7c6731af-9533-40c3-83a9-25b58f0d837f"
span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext))
- utils.attach_span(fn_task, task_id, span)
- span_after = utils.retrieve_span(fn_task, task_id)
+ utils.attach_context(fn_task, task_id, span, mock.Mock(), "")
+ ctx = utils.retrieve_context(fn_task, task_id)
+ self.assertIsNotNone(ctx)
+ span_after, _, _ = ctx
self.assertIs(span, span_after)
def test_span_delete(self):
@@ -180,17 +182,19 @@ def fn_task():
# propagate a Span
task_id = "7c6731af-9533-40c3-83a9-25b58f0d837f"
span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext))
- utils.attach_span(fn_task, task_id, span)
+ utils.attach_context(fn_task, task_id, span, mock.Mock(), "")
# delete the Span
- utils.detach_span(fn_task, task_id)
- self.assertEqual(utils.retrieve_span(fn_task, task_id), (None, None))
+ utils.detach_context(fn_task, task_id)
+ self.assertEqual(utils.retrieve_context(fn_task, task_id), None)
def test_optional_task_span_attach(self):
task_id = "7c6731af-9533-40c3-83a9-25b58f0d837f"
span = trace._Span("name", mock.Mock(spec=trace_api.SpanContext))
# assert this is is a no-aop
- self.assertIsNone(utils.attach_span(None, task_id, span))
+ self.assertIsNone(
+ utils.attach_context(None, task_id, span, mock.Mock(), "")
+ )
def test_span_delete_empty(self):
# ensure detach_span doesn't raise an exception if span is not present
@@ -201,10 +205,8 @@ def fn_task():
# delete the Span
task_id = "7c6731af-9533-40c3-83a9-25b58f0d837f"
try:
- utils.detach_span(fn_task, task_id)
- self.assertEqual(
- utils.retrieve_span(fn_task, task_id), (None, None)
- )
+ utils.detach_context(fn_task, task_id)
+ self.assertEqual(utils.retrieve_context(fn_task, task_id), None)
except Exception as ex: # pylint: disable=broad-except
self.fail(f"Exception was raised: {ex}")
diff --git a/instrumentation/opentelemetry-instrumentation-confluent-kafka/pyproject.toml b/instrumentation/opentelemetry-instrumentation-confluent-kafka/pyproject.toml
index 13433ba9e2..2edfdeb038 100644
--- a/instrumentation/opentelemetry-instrumentation-confluent-kafka/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-confluent-kafka/pyproject.toml
@@ -25,7 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
"opentelemetry-api ~= 1.12",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/version.py b/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/version.py
+++ b/instrumentation/opentelemetry-instrumentation-confluent-kafka/src/opentelemetry/instrumentation/confluent_kafka/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-confluent-kafka/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-confluent-kafka/test-requirements.txt
index 5400e507f5..f78f498620 100644
--- a/instrumentation/opentelemetry-instrumentation-confluent-kafka/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-confluent-kafka/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
confluent-kafka==2.4.0
Deprecated==1.2.14
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml
index 991c7bb8af..bfa63dbcad 100644
--- a/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-dbapi/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/version.py b/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/version.py
index e0bef4b1e3..79e27849a4 100644
--- a/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/version.py
+++ b/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/version.py
@@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
_instruments = tuple()
diff --git a/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt
index 0d98d28069..f76b488d90 100644
--- a/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-dbapi/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-django/pyproject.toml b/instrumentation/opentelemetry-instrumentation-django/pyproject.toml
index a8b53820bc..27cdf157c4 100644
--- a/instrumentation/opentelemetry-instrumentation-django/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-django/pyproject.toml
@@ -26,15 +26,15 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-wsgi == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-wsgi == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
asgi = [
- "opentelemetry-instrumentation-asgi == 0.48b0.dev",
+ "opentelemetry-instrumentation-asgi == 0.49b0.dev",
]
instruments = [
"django >= 1.10",
diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py
index 651df12043..d37c45993c 100644
--- a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/__init__.py
@@ -344,7 +344,7 @@ def _instrument(self, **kwargs):
_DjangoMiddleware._duration_histogram_old = meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="Duration of HTTP server requests.",
+ description="Measures the duration of inbound HTTP requests.",
)
_DjangoMiddleware._duration_histogram_new = None
if _report_new(sem_conv_opt_in_mode):
diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
index 4530a16506..667d6f1091 100644
--- a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
+++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/middleware/otel_middleware.py
@@ -333,6 +333,7 @@ def process_exception(self, request, exception):
# pylint: disable=too-many-branches
# pylint: disable=too-many-locals
+ # pylint: disable=too-many-statements
def process_response(self, request, response):
if self._excluded_urls.url_disabled(request.build_absolute_uri("?")):
return response
@@ -426,6 +427,10 @@ def process_response(self, request, response):
duration_attrs_old = _parse_duration_attrs(
duration_attrs, _HTTPStabilityMode.DEFAULT
)
+ # http.target to be included in old semantic conventions
+ target = duration_attrs.get(SpanAttributes.HTTP_TARGET)
+ if target:
+ duration_attrs_old[SpanAttributes.HTTP_TARGET] = target
self._duration_histogram_old.record(
max(round(duration_s * 1000), 0), duration_attrs_old
)
diff --git a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version.py b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version.py
+++ b/instrumentation/opentelemetry-instrumentation-django/src/opentelemetry/instrumentation/django/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt
index 5f22f2cadb..9d7ee964fe 100644
--- a/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
Django==2.2.28
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt
index 0a042a1bf5..9c21d2dfd4 100644
--- a/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
Django==3.2.25
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt
index 2ed199fbf3..d3a55aae34 100644
--- a/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt
+++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-2.txt
@@ -1,7 +1,7 @@
-asgiref==3.7.2
+asgiref==3.8.1
backports.zoneinfo==0.2.1
Deprecated==1.2.14
-Django==4.2.14
+Django==4.2.15
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==24.0
diff --git a/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt b/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt
index c3e65be730..89923379d3 100644
--- a/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt
+++ b/instrumentation/opentelemetry-instrumentation-django/test-requirements-3.txt
@@ -1,6 +1,6 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
-Django==4.2.14
+Django==4.2.15
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==24.0
diff --git a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py
index 1b9a904ce1..85ebbd747f 100644
--- a/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py
+++ b/instrumentation/opentelemetry-instrumentation-django/tests/test_middleware.py
@@ -28,10 +28,6 @@
from opentelemetry.instrumentation._semconv import (
OTEL_SEMCONV_STABILITY_OPT_IN,
_OpenTelemetrySemanticConventionStability,
- _server_active_requests_count_attrs_new,
- _server_active_requests_count_attrs_old,
- _server_duration_attrs_new,
- _server_duration_attrs_old,
)
from opentelemetry.instrumentation.django import (
DjangoInstrumentor,
@@ -48,24 +44,6 @@
)
from opentelemetry.sdk.trace import Span
from opentelemetry.sdk.trace.id_generator import RandomIdGenerator
-from opentelemetry.semconv.attributes.client_attributes import CLIENT_ADDRESS
-from opentelemetry.semconv.attributes.error_attributes import ERROR_TYPE
-from opentelemetry.semconv.attributes.exception_attributes import (
- EXCEPTION_MESSAGE,
- EXCEPTION_TYPE,
-)
-from opentelemetry.semconv.attributes.http_attributes import (
- HTTP_REQUEST_METHOD,
- HTTP_REQUEST_METHOD_ORIGINAL,
- HTTP_RESPONSE_STATUS_CODE,
- HTTP_ROUTE,
-)
-from opentelemetry.semconv.attributes.network_attributes import (
- NETWORK_PROTOCOL_VERSION,
-)
-from opentelemetry.semconv.attributes.server_attributes import SERVER_PORT
-from opentelemetry.semconv.attributes.url_attributes import URL_SCHEME
-from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.wsgitestutil import WsgiTestBase
from opentelemetry.trace import (
SpanKind,
@@ -197,18 +175,18 @@ def test_templated_route_get(self):
)
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.UNSET)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "GET")
+ self.assertEqual(span.attributes["http.method"], "GET")
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_URL],
+ span.attributes["http.url"],
"http://testserver/route/2020/template/",
)
if DJANGO_2_2:
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_ROUTE],
+ span.attributes["http.route"],
"^route/(?P[0-9]{4})/template/$",
)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_SCHEME], "http")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_STATUS_CODE], 200)
+ self.assertEqual(span.attributes["http.scheme"], "http")
+ self.assertEqual(span.attributes["http.status_code"], 200)
def test_traced_get(self):
Client().get("/traced/")
@@ -221,17 +199,15 @@ def test_traced_get(self):
self.assertEqual(span.name, "GET ^traced/" if DJANGO_2_2 else "GET")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.UNSET)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "GET")
+ self.assertEqual(span.attributes["http.method"], "GET")
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_URL],
+ span.attributes["http.url"],
"http://testserver/traced/",
)
if DJANGO_2_2:
- self.assertEqual(
- span.attributes[SpanAttributes.HTTP_ROUTE], "^traced/"
- )
- self.assertEqual(span.attributes[SpanAttributes.HTTP_SCHEME], "http")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_STATUS_CODE], 200)
+ self.assertEqual(span.attributes["http.route"], "^traced/")
+ self.assertEqual(span.attributes["http.scheme"], "http")
+ self.assertEqual(span.attributes["http.status_code"], 200)
def test_traced_get_new_semconv(self):
Client().get("/traced/")
@@ -244,14 +220,14 @@ def test_traced_get_new_semconv(self):
self.assertEqual(span.name, "GET ^traced/" if DJANGO_2_2 else "GET")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.UNSET)
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "GET")
- self.assertEqual(span.attributes[URL_SCHEME], "http")
- self.assertEqual(span.attributes[SERVER_PORT], 80)
- self.assertEqual(span.attributes[CLIENT_ADDRESS], "127.0.0.1")
- self.assertEqual(span.attributes[NETWORK_PROTOCOL_VERSION], "1.1")
+ self.assertEqual(span.attributes["http.request.method"], "GET")
+ self.assertEqual(span.attributes["url.scheme"], "http")
+ self.assertEqual(span.attributes["server.port"], 80)
+ self.assertEqual(span.attributes["client.address"], "127.0.0.1")
+ self.assertEqual(span.attributes["network.protocol.version"], "1.1")
if DJANGO_2_2:
- self.assertEqual(span.attributes[HTTP_ROUTE], "^traced/")
- self.assertEqual(span.attributes[HTTP_RESPONSE_STATUS_CODE], 200)
+ self.assertEqual(span.attributes["http.route"], "^traced/")
+ self.assertEqual(span.attributes["http.response.status_code"], 200)
def test_traced_get_both_semconv(self):
Client().get("/traced/")
@@ -264,25 +240,23 @@ def test_traced_get_both_semconv(self):
self.assertEqual(span.name, "GET ^traced/" if DJANGO_2_2 else "GET")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.UNSET)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "GET")
+ self.assertEqual(span.attributes["http.method"], "GET")
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_URL],
+ span.attributes["http.url"],
"http://testserver/traced/",
)
if DJANGO_2_2:
- self.assertEqual(
- span.attributes[SpanAttributes.HTTP_ROUTE], "^traced/"
- )
- self.assertEqual(span.attributes[SpanAttributes.HTTP_SCHEME], "http")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_STATUS_CODE], 200)
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "GET")
- self.assertEqual(span.attributes[URL_SCHEME], "http")
- self.assertEqual(span.attributes[SERVER_PORT], 80)
- self.assertEqual(span.attributes[CLIENT_ADDRESS], "127.0.0.1")
- self.assertEqual(span.attributes[NETWORK_PROTOCOL_VERSION], "1.1")
+ self.assertEqual(span.attributes["http.route"], "^traced/")
+ self.assertEqual(span.attributes["http.scheme"], "http")
+ self.assertEqual(span.attributes["http.status_code"], 200)
+ self.assertEqual(span.attributes["http.request.method"], "GET")
+ self.assertEqual(span.attributes["url.scheme"], "http")
+ self.assertEqual(span.attributes["server.port"], 80)
+ self.assertEqual(span.attributes["client.address"], "127.0.0.1")
+ self.assertEqual(span.attributes["network.protocol.version"], "1.1")
if DJANGO_2_2:
- self.assertEqual(span.attributes[HTTP_ROUTE], "^traced/")
- self.assertEqual(span.attributes[HTTP_RESPONSE_STATUS_CODE], 200)
+ self.assertEqual(span.attributes["http.route"], "^traced/")
+ self.assertEqual(span.attributes["http.response.status_code"], 200)
def test_not_recording(self):
mock_tracer = Mock()
@@ -318,17 +292,15 @@ def test_traced_post(self):
self.assertEqual(span.name, "POST ^traced/" if DJANGO_2_2 else "POST")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.UNSET)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "POST")
+ self.assertEqual(span.attributes["http.method"], "POST")
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_URL],
+ span.attributes["http.url"],
"http://testserver/traced/",
)
if DJANGO_2_2:
- self.assertEqual(
- span.attributes[SpanAttributes.HTTP_ROUTE], "^traced/"
- )
- self.assertEqual(span.attributes[SpanAttributes.HTTP_SCHEME], "http")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_STATUS_CODE], 200)
+ self.assertEqual(span.attributes["http.route"], "^traced/")
+ self.assertEqual(span.attributes["http.scheme"], "http")
+ self.assertEqual(span.attributes["http.status_code"], 200)
def test_traced_post_new_semconv(self):
Client().post("/traced/")
@@ -341,14 +313,14 @@ def test_traced_post_new_semconv(self):
self.assertEqual(span.name, "POST ^traced/" if DJANGO_2_2 else "POST")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.UNSET)
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "POST")
- self.assertEqual(span.attributes[URL_SCHEME], "http")
- self.assertEqual(span.attributes[SERVER_PORT], 80)
- self.assertEqual(span.attributes[CLIENT_ADDRESS], "127.0.0.1")
- self.assertEqual(span.attributes[NETWORK_PROTOCOL_VERSION], "1.1")
+ self.assertEqual(span.attributes["http.request.method"], "POST")
+ self.assertEqual(span.attributes["url.scheme"], "http")
+ self.assertEqual(span.attributes["server.port"], 80)
+ self.assertEqual(span.attributes["client.address"], "127.0.0.1")
+ self.assertEqual(span.attributes["network.protocol.version"], "1.1")
if DJANGO_2_2:
- self.assertEqual(span.attributes[HTTP_ROUTE], "^traced/")
- self.assertEqual(span.attributes[HTTP_RESPONSE_STATUS_CODE], 200)
+ self.assertEqual(span.attributes["http.route"], "^traced/")
+ self.assertEqual(span.attributes["http.response.status_code"], 200)
def test_traced_post_both_semconv(self):
Client().post("/traced/")
@@ -361,21 +333,21 @@ def test_traced_post_both_semconv(self):
self.assertEqual(span.name, "POST ^traced/" if DJANGO_2_2 else "POST")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.UNSET)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "POST")
+ self.assertEqual(span.attributes["http.method"], "POST")
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_URL],
+ span.attributes["http.url"],
"http://testserver/traced/",
)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_SCHEME], "http")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_STATUS_CODE], 200)
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "POST")
- self.assertEqual(span.attributes[URL_SCHEME], "http")
- self.assertEqual(span.attributes[SERVER_PORT], 80)
- self.assertEqual(span.attributes[CLIENT_ADDRESS], "127.0.0.1")
- self.assertEqual(span.attributes[NETWORK_PROTOCOL_VERSION], "1.1")
+ self.assertEqual(span.attributes["http.scheme"], "http")
+ self.assertEqual(span.attributes["http.status_code"], 200)
+ self.assertEqual(span.attributes["http.request.method"], "POST")
+ self.assertEqual(span.attributes["url.scheme"], "http")
+ self.assertEqual(span.attributes["server.port"], 80)
+ self.assertEqual(span.attributes["client.address"], "127.0.0.1")
+ self.assertEqual(span.attributes["network.protocol.version"], "1.1")
if DJANGO_2_2:
- self.assertEqual(span.attributes[HTTP_ROUTE], "^traced/")
- self.assertEqual(span.attributes[HTTP_RESPONSE_STATUS_CODE], 200)
+ self.assertEqual(span.attributes["http.route"], "^traced/")
+ self.assertEqual(span.attributes["http.response.status_code"], 200)
def test_error(self):
with self.assertRaises(ValueError):
@@ -389,27 +361,21 @@ def test_error(self):
self.assertEqual(span.name, "GET ^error/" if DJANGO_2_2 else "GET")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.ERROR)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "GET")
+ self.assertEqual(span.attributes["http.method"], "GET")
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_URL],
+ span.attributes["http.url"],
"http://testserver/error/",
)
if DJANGO_2_2:
- self.assertEqual(
- span.attributes[SpanAttributes.HTTP_ROUTE], "^error/"
- )
- self.assertEqual(span.attributes[SpanAttributes.HTTP_SCHEME], "http")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_STATUS_CODE], 500)
+ self.assertEqual(span.attributes["http.route"], "^error/")
+ self.assertEqual(span.attributes["http.scheme"], "http")
+ self.assertEqual(span.attributes["http.status_code"], 500)
self.assertEqual(len(span.events), 1)
event = span.events[0]
self.assertEqual(event.name, "exception")
- self.assertEqual(
- event.attributes[SpanAttributes.EXCEPTION_TYPE], "ValueError"
- )
- self.assertEqual(
- event.attributes[SpanAttributes.EXCEPTION_MESSAGE], "error"
- )
+ self.assertEqual(event.attributes["exception.type"], "ValueError")
+ self.assertEqual(event.attributes["exception.message"], "error")
def test_error_new_semconv(self):
with self.assertRaises(ValueError):
@@ -423,18 +389,18 @@ def test_error_new_semconv(self):
self.assertEqual(span.name, "GET ^error/" if DJANGO_2_2 else "GET")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.ERROR)
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "GET")
+ self.assertEqual(span.attributes["http.request.method"], "GET")
if DJANGO_2_2:
- self.assertEqual(span.attributes[HTTP_ROUTE], "^error/")
- self.assertEqual(span.attributes[URL_SCHEME], "http")
- self.assertEqual(span.attributes[HTTP_RESPONSE_STATUS_CODE], 500)
+ self.assertEqual(span.attributes["http.route"], "^error/")
+ self.assertEqual(span.attributes["url.scheme"], "http")
+ self.assertEqual(span.attributes["http.response.status_code"], 500)
self.assertEqual(len(span.events), 1)
event = span.events[0]
self.assertEqual(event.name, "exception")
- self.assertEqual(event.attributes[EXCEPTION_TYPE], "ValueError")
- self.assertEqual(event.attributes[EXCEPTION_MESSAGE], "error")
- self.assertEqual(span.attributes[ERROR_TYPE], "500")
+ self.assertEqual(event.attributes["exception.type"], "ValueError")
+ self.assertEqual(event.attributes["exception.message"], "error")
+ self.assertEqual(span.attributes["error.type"], "500")
def test_error_both_semconv(self):
with self.assertRaises(ValueError):
@@ -448,29 +414,27 @@ def test_error_both_semconv(self):
self.assertEqual(span.name, "GET ^error/" if DJANGO_2_2 else "GET")
self.assertEqual(span.kind, SpanKind.SERVER)
self.assertEqual(span.status.status_code, StatusCode.ERROR)
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "GET")
+ self.assertEqual(span.attributes["http.method"], "GET")
self.assertEqual(
- span.attributes[SpanAttributes.HTTP_URL],
+ span.attributes["http.url"],
"http://testserver/error/",
)
if DJANGO_2_2:
- self.assertEqual(
- span.attributes[SpanAttributes.HTTP_ROUTE], "^error/"
- )
- self.assertEqual(span.attributes[SpanAttributes.HTTP_SCHEME], "http")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_STATUS_CODE], 500)
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "GET")
+ self.assertEqual(span.attributes["http.route"], "^error/")
+ self.assertEqual(span.attributes["http.scheme"], "http")
+ self.assertEqual(span.attributes["http.status_code"], 500)
+ self.assertEqual(span.attributes["http.request.method"], "GET")
if DJANGO_2_2:
- self.assertEqual(span.attributes[HTTP_ROUTE], "^error/")
- self.assertEqual(span.attributes[URL_SCHEME], "http")
- self.assertEqual(span.attributes[HTTP_RESPONSE_STATUS_CODE], 500)
+ self.assertEqual(span.attributes["http.route"], "^error/")
+ self.assertEqual(span.attributes["url.scheme"], "http")
+ self.assertEqual(span.attributes["http.response.status_code"], 500)
self.assertEqual(len(span.events), 1)
event = span.events[0]
self.assertEqual(event.name, "exception")
- self.assertEqual(event.attributes[EXCEPTION_TYPE], "ValueError")
- self.assertEqual(event.attributes[EXCEPTION_MESSAGE], "error")
- self.assertEqual(span.attributes[ERROR_TYPE], "500")
+ self.assertEqual(event.attributes["exception.type"], "ValueError")
+ self.assertEqual(event.attributes["exception.message"], "error")
+ self.assertEqual(span.attributes["error.type"], "500")
def test_exclude_lists(self):
client = Client()
@@ -545,7 +509,7 @@ def test_nonstandard_http_method_span_name(self):
span = span_list[0]
self.assertEqual(span.name, "HTTP")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "_OTHER")
+ self.assertEqual(span.attributes["http.method"], "_OTHER")
def test_nonstandard_http_method_span_name_new_semconv(self):
Client().request(
@@ -556,9 +520,9 @@ def test_nonstandard_http_method_span_name_new_semconv(self):
span = span_list[0]
self.assertEqual(span.name, "HTTP")
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "_OTHER")
+ self.assertEqual(span.attributes["http.request.method"], "_OTHER")
self.assertEqual(
- span.attributes[HTTP_REQUEST_METHOD_ORIGINAL], "NONSTANDARD"
+ span.attributes["http.request.method_original"], "NONSTANDARD"
)
def test_nonstandard_http_method_span_name_both_semconv(self):
@@ -570,10 +534,10 @@ def test_nonstandard_http_method_span_name_both_semconv(self):
span = span_list[0]
self.assertEqual(span.name, "HTTP")
- self.assertEqual(span.attributes[SpanAttributes.HTTP_METHOD], "_OTHER")
- self.assertEqual(span.attributes[HTTP_REQUEST_METHOD], "_OTHER")
+ self.assertEqual(span.attributes["http.method"], "_OTHER")
+ self.assertEqual(span.attributes["http.request.method"], "_OTHER")
self.assertEqual(
- span.attributes[HTTP_REQUEST_METHOD_ORIGINAL], "NONSTANDARD"
+ span.attributes["http.request.method_original"], "NONSTANDARD"
)
def test_traced_request_attrs(self):
@@ -711,9 +675,20 @@ def test_wsgi_metrics(self):
"http.server.active_requests",
"http.server.duration",
]
- _recommended_attrs = {
- "http.server.active_requests": _server_active_requests_count_attrs_old,
- "http.server.duration": _server_duration_attrs_old,
+ expected_duration_attributes = {
+ "http.method": "GET",
+ "http.scheme": "http",
+ "http.flavor": "1.1",
+ "http.server_name": "testserver",
+ "net.host.port": 80,
+ "http.status_code": 200,
+ "http.target": "^span_name/([0-9]{4})/$",
+ }
+ expected_requests_count_attributes = {
+ "http.method": "GET",
+ "http.scheme": "http",
+ "http.flavor": "1.1",
+ "http.server_name": "testserver",
}
start = default_timer()
for _ in range(3):
@@ -740,12 +715,16 @@ def test_wsgi_metrics(self):
self.assertAlmostEqual(
duration, point.sum, delta=100
)
+ self.assertDictEqual(
+ expected_duration_attributes,
+ dict(point.attributes),
+ )
if isinstance(point, NumberDataPoint):
number_data_point_seen = True
self.assertEqual(point.value, 0)
- for attr in point.attributes:
- self.assertIn(
- attr, _recommended_attrs[metric.name]
+ self.assertDictEqual(
+ expected_requests_count_attributes,
+ dict(point.attributes),
)
self.assertTrue(histrogram_data_point_seen and number_data_point_seen)
@@ -755,9 +734,16 @@ def test_wsgi_metrics_new_semconv(self):
"http.server.active_requests",
"http.server.request.duration",
]
- _recommended_attrs = {
- "http.server.active_requests": _server_active_requests_count_attrs_new,
- "http.server.request.duration": _server_duration_attrs_new,
+ expected_duration_attributes = {
+ "http.request.method": "GET",
+ "url.scheme": "http",
+ "network.protocol.version": "1.1",
+ "http.response.status_code": 200,
+ "http.route": "^span_name/([0-9]{4})/$",
+ }
+ expected_requests_count_attributes = {
+ "http.request.method": "GET",
+ "url.scheme": "http",
}
start = default_timer()
for _ in range(3):
@@ -784,12 +770,16 @@ def test_wsgi_metrics_new_semconv(self):
self.assertAlmostEqual(
duration_s, point.sum, places=1
)
+ self.assertDictEqual(
+ expected_duration_attributes,
+ dict(point.attributes),
+ )
if isinstance(point, NumberDataPoint):
number_data_point_seen = True
self.assertEqual(point.value, 0)
- for attr in point.attributes:
- self.assertIn(
- attr, _recommended_attrs[metric.name]
+ self.assertDictEqual(
+ expected_requests_count_attributes,
+ dict(point.attributes),
)
self.assertTrue(histrogram_data_point_seen and number_data_point_seen)
@@ -801,12 +791,29 @@ def test_wsgi_metrics_both_semconv(self):
"http.server.active_requests",
"http.server.request.duration",
]
- active_count_both_attrs = list(_server_active_requests_count_attrs_new)
- active_count_both_attrs.extend(_server_active_requests_count_attrs_old)
- _recommended_attrs = {
- "http.server.active_requests": active_count_both_attrs,
- "http.server.request.duration": _server_duration_attrs_new,
- "http.server.duration": _server_duration_attrs_old,
+ expected_duration_attributes_old = {
+ "http.method": "GET",
+ "http.scheme": "http",
+ "http.flavor": "1.1",
+ "http.server_name": "testserver",
+ "net.host.port": 80,
+ "http.status_code": 200,
+ "http.target": "^span_name/([0-9]{4})/$",
+ }
+ expected_duration_attributes_new = {
+ "http.request.method": "GET",
+ "url.scheme": "http",
+ "network.protocol.version": "1.1",
+ "http.response.status_code": 200,
+ "http.route": "^span_name/([0-9]{4})/$",
+ }
+ expected_requests_count_attributes = {
+ "http.method": "GET",
+ "http.scheme": "http",
+ "http.flavor": "1.1",
+ "http.server_name": "testserver",
+ "http.request.method": "GET",
+ "url.scheme": "http",
}
start = default_timer()
for _ in range(3):
@@ -835,16 +842,24 @@ def test_wsgi_metrics_both_semconv(self):
self.assertAlmostEqual(
duration_s, point.sum, places=1
)
+ self.assertDictEqual(
+ expected_duration_attributes_new,
+ dict(point.attributes),
+ )
elif metric.name == "http.server.duration":
self.assertAlmostEqual(
duration, point.sum, delta=100
)
+ self.assertDictEqual(
+ expected_duration_attributes_old,
+ dict(point.attributes),
+ )
if isinstance(point, NumberDataPoint):
number_data_point_seen = True
self.assertEqual(point.value, 0)
- for attr in point.attributes:
- self.assertIn(
- attr, _recommended_attrs[metric.name]
+ self.assertDictEqual(
+ expected_requests_count_attributes,
+ dict(point.attributes),
)
self.assertTrue(histrogram_data_point_seen and number_data_point_seen)
@@ -911,9 +926,7 @@ def test_django_with_wsgi_instrumented(self):
Client().get("/span_name/1234/")
span_list = self.exporter.get_finished_spans()
print(span_list)
- self.assertEqual(
- span_list[0].attributes[SpanAttributes.HTTP_STATUS_CODE], 200
- )
+ self.assertEqual(span_list[0].attributes["http.status_code"], 200)
self.assertEqual(trace.SpanKind.INTERNAL, span_list[0].kind)
self.assertEqual(
parent_span.get_span_context().span_id,
diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml b/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml
index 29d7bec6cc..e086d2c335 100644
--- a/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/version.py b/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/version.py
+++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/src/opentelemetry/instrumentation/elasticsearch/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt
index 07ea98e4d6..55eabe1ef5 100644
--- a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
elasticsearch==6.8.2
elasticsearch-dsl==6.4.0
diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt
index 228601485d..2fab7287ad 100644
--- a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
elasticsearch==7.17.9
elasticsearch-dsl==7.4.1
diff --git a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt
index 272675c119..5f2ccd41ac 100644
--- a/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt
+++ b/instrumentation/opentelemetry-instrumentation-elasticsearch/test-requirements-2.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
elasticsearch==8.13.1
elasticsearch-dsl==8.13.1
diff --git a/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml b/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml
index 6f505f60ae..f118ff4296 100644
--- a/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-falcon/pyproject.toml
@@ -26,10 +26,10 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-wsgi == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-wsgi == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
"packaging >= 20.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py
index 1a252b9a16..2dce5f1ef5 100644
--- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/__init__.py
@@ -268,7 +268,7 @@ def __init__(self, *args, **kwargs):
self.duration_histogram = self._otel_meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="Duration of HTTP server requests.",
+ description="Measures the duration of inbound HTTP requests.",
)
self.active_requests_counter = self._otel_meter.create_up_down_counter(
name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
diff --git a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py
+++ b/instrumentation/opentelemetry-instrumentation-falcon/src/opentelemetry/instrumentation/falcon/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt
index d0f6381b42..6967c57b6d 100644
--- a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
falcon==1.4.1
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt
index 5a84f224f1..e535925b14 100644
--- a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
falcon==2.0.0
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt
index 0790e8a4cb..30d21e2773 100644
--- a/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt
+++ b/instrumentation/opentelemetry-instrumentation-falcon/test-requirements-2.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
falcon==3.1.1
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml
index 4236fde227..89f6602e86 100644
--- a/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/pyproject.toml
@@ -26,16 +26,15 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-asgi == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-asgi == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
instruments = [
"fastapi ~= 0.58",
- "fastapi-slim ~= 0.111.0",
]
[project.entry-points.opentelemetry_instrumentor]
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
index 9356093a45..7e4d0aac07 100644
--- a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py
@@ -86,9 +86,10 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A
Request headers
***************
To capture HTTP request headers as span attributes, set the environment variable
-``OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST`` to a comma delimited list of HTTP header names.
+``OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST`` to a comma delimited list of HTTP header names,
+or pass the ``http_capture_headers_server_request`` keyword argument to the ``instrument_app`` method.
-For example,
+For example using the environment variable,
::
export OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST="content-type,custom_request_header"
@@ -120,9 +121,10 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A
Response headers
****************
To capture HTTP response headers as span attributes, set the environment variable
-``OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE`` to a comma delimited list of HTTP header names.
+``OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE`` to a comma delimited list of HTTP header names,
+or pass the ``http_capture_headers_server_response`` keyword argument to the ``instrument_app`` method.
-For example,
+For example using the environment variable,
::
export OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE="content-type,custom_response_header"
@@ -155,10 +157,12 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A
******************
In order to prevent storing sensitive data such as personally identifiable information (PII), session keys, passwords,
etc, set the environment variable ``OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS``
-to a comma delimited list of HTTP header names to be sanitized. Regexes may be used, and all header names will be
-matched in a case-insensitive manner.
+to a comma delimited list of HTTP header names to be sanitized, or pass the ``http_capture_headers_sanitize_fields``
+keyword argument to the ``instrument_app`` method.
-For example,
+Regexes may be used, and all header names will be matched in a case-insensitive manner.
+
+For example using the environment variable,
::
export OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS=".*session.*,set-cookie"
@@ -171,9 +175,11 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A
API
---
"""
+
+from __future__ import annotations
+
import logging
-from importlib.util import find_spec
-from typing import Collection
+from typing import Collection, Literal
import fastapi
from starlette.routing import Match
@@ -190,11 +196,7 @@ def client_response_hook(span: Span, scope: dict[str, Any], message: dict[str, A
ClientResponseHook,
ServerRequestHook,
)
-from opentelemetry.instrumentation.fastapi.package import (
- _fastapi,
- _fastapi_slim,
- _instruments,
-)
+from opentelemetry.instrumentation.fastapi.package import _instruments
from opentelemetry.instrumentation.fastapi.version import __version__
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
from opentelemetry.metrics import get_meter
@@ -220,15 +222,38 @@ class FastAPIInstrumentor(BaseInstrumentor):
@staticmethod
def instrument_app(
- app: fastapi.FastAPI,
+ app,
server_request_hook: ServerRequestHook = None,
client_request_hook: ClientRequestHook = None,
client_response_hook: ClientResponseHook = None,
tracer_provider=None,
meter_provider=None,
excluded_urls=None,
+ http_capture_headers_server_request: list[str] | None = None,
+ http_capture_headers_server_response: list[str] | None = None,
+ http_capture_headers_sanitize_fields: list[str] | None = None,
+ exclude_spans: list[Literal["receive", "send"]] | None = None,
):
- """Instrument an uninstrumented FastAPI application."""
+ """Instrument an uninstrumented FastAPI application.
+
+ Args:
+ app: The fastapi ASGI application callable to forward requests to.
+ server_request_hook: Optional callback which is called with the server span and ASGI
+ scope object for every incoming request.
+ client_request_hook: Optional callback which is called with the internal span, and ASGI
+ scope and event which are sent as dictionaries for when the method receive is called.
+ client_response_hook: Optional callback which is called with the internal span, and ASGI
+ scope and event which are sent as dictionaries for when the method send is called.
+ tracer_provider: The optional tracer provider to use. If omitted
+ the current globally configured one is used.
+ meter_provider: The optional meter provider to use. If omitted
+ the current globally configured one is used.
+ excluded_urls: Optional comma delimited string of regexes to match URLs that should not be traced.
+ http_capture_headers_server_request: Optional list of HTTP headers to capture from the request.
+ http_capture_headers_server_response: Optional list of HTTP headers to capture from the response.
+ http_capture_headers_sanitize_fields: Optional list of HTTP headers to sanitize.
+ exclude_spans: Optionally exclude HTTP `send` and/or `receive` spans from the trace.
+ """
if not hasattr(app, "_is_instrumented_by_opentelemetry"):
app._is_instrumented_by_opentelemetry = False
@@ -265,6 +290,10 @@ def instrument_app(
# Pass in tracer/meter to get __name__and __version__ of fastapi instrumentation
tracer=tracer,
meter=meter,
+ http_capture_headers_server_request=http_capture_headers_server_request,
+ http_capture_headers_server_response=http_capture_headers_server_response,
+ http_capture_headers_sanitize_fields=http_capture_headers_sanitize_fields,
+ exclude_spans=exclude_spans,
)
app._is_instrumented_by_opentelemetry = True
if app not in _InstrumentedFastAPI._instrumented_fastapi_apps:
@@ -285,11 +314,6 @@ def uninstrument_app(app: fastapi.FastAPI):
app._is_instrumented_by_opentelemetry = False
def instrumentation_dependencies(self) -> Collection[str]:
- if find_spec("fastapi") is not None:
- return (_fastapi,)
- if find_spec("fastapi_slim") is not None:
- return (_fastapi_slim,)
- # If neither is installed, return both as potential dependencies
return _instruments
def _instrument(self, **kwargs):
@@ -304,6 +328,15 @@ def _instrument(self, **kwargs):
_InstrumentedFastAPI._client_response_hook = kwargs.get(
"client_response_hook"
)
+ _InstrumentedFastAPI._http_capture_headers_server_request = kwargs.get(
+ "http_capture_headers_server_request"
+ )
+ _InstrumentedFastAPI._http_capture_headers_server_response = (
+ kwargs.get("http_capture_headers_server_response")
+ )
+ _InstrumentedFastAPI._http_capture_headers_sanitize_fields = (
+ kwargs.get("http_capture_headers_sanitize_fields")
+ )
_excluded_urls = kwargs.get("excluded_urls")
_InstrumentedFastAPI._excluded_urls = (
_excluded_urls_from_env
@@ -311,6 +344,7 @@ def _instrument(self, **kwargs):
else parse_excluded_urls(_excluded_urls)
)
_InstrumentedFastAPI._meter_provider = kwargs.get("meter_provider")
+ _InstrumentedFastAPI._exclude_spans = kwargs.get("exclude_spans")
fastapi.FastAPI = _InstrumentedFastAPI
def _uninstrument(self, **kwargs):
@@ -358,6 +392,10 @@ def __init__(self, *args, **kwargs):
# Pass in tracer/meter to get __name__and __version__ of fastapi instrumentation
tracer=tracer,
meter=meter,
+ http_capture_headers_server_request=_InstrumentedFastAPI._http_capture_headers_server_request,
+ http_capture_headers_server_response=_InstrumentedFastAPI._http_capture_headers_server_response,
+ http_capture_headers_sanitize_fields=_InstrumentedFastAPI._http_capture_headers_sanitize_fields,
+ exclude_spans=_InstrumentedFastAPI._exclude_spans,
)
self._is_instrumented_by_opentelemetry = True
_InstrumentedFastAPI._instrumented_fastapi_apps.add(self)
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/package.py b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/package.py
index 55e1059d7a..d95a2cf6d5 100644
--- a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/package.py
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/package.py
@@ -13,10 +13,7 @@
# limitations under the License.
-_fastapi = "fastapi ~= 0.58"
-_fastapi_slim = "fastapi-slim ~= 0.111.0"
-
-_instruments = (_fastapi, _fastapi_slim)
+_instruments = ("fastapi ~= 0.58",)
_supports_metrics = True
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements-slim.txt b/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements-slim.txt
deleted file mode 100644
index 2ea55f1b91..0000000000
--- a/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements-slim.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-annotated-types==0.6.0
-anyio==4.3.0
-asgiref==3.7.2
-certifi==2024.7.4
-charset-normalizer==3.3.2
-Deprecated==1.2.14
-exceptiongroup==1.2.0
-fastapi-slim==0.111.0
-h11==0.14.0
-httpcore==1.0.4
-httpx==0.27.0
-idna==3.7
-importlib-metadata==6.11.0
-iniconfig==2.0.0
-packaging==24.0
-pluggy==1.5.0
-py-cpuinfo==9.0.0
-pydantic==2.6.2
-pydantic_core==2.16.3
-pytest==7.4.4
-requests==2.32.3
-sniffio==1.3.0
-starlette==0.37.2
-tomli==2.0.1
-typing_extensions==4.9.0
-urllib3==2.2.2
-wrapt==1.16.0
-zipp==3.19.2
--e opentelemetry-instrumentation
--e instrumentation/opentelemetry-instrumentation-asgi
--e util/opentelemetry-util-http
--e instrumentation/opentelemetry-instrumentation-fastapi
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt
index 00242d5410..927e68f94e 100644
--- a/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt
@@ -1,6 +1,6 @@
annotated-types==0.6.0
anyio==4.3.0
-asgiref==3.7.2
+asgiref==3.8.1
certifi==2024.7.4
charset-normalizer==3.3.2
Deprecated==1.2.14
diff --git a/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py b/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
index 69c5d312e5..634c74af6b 100644
--- a/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
+++ b/instrumentation/opentelemetry-instrumentation-fastapi/tests/test_fastapi_instrumentation.py
@@ -20,9 +20,11 @@
import fastapi
from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
+from fastapi.responses import JSONResponse
from fastapi.testclient import TestClient
import opentelemetry.instrumentation.fastapi as otel_fastapi
+from opentelemetry import trace
from opentelemetry.instrumentation._semconv import (
OTEL_SEMCONV_STABILITY_OPT_IN,
_OpenTelemetrySemanticConventionStability,
@@ -47,8 +49,14 @@
)
from opentelemetry.semconv.attributes.url_attributes import URL_SCHEME
from opentelemetry.semconv.trace import SpanAttributes
+from opentelemetry.test.globals_test import reset_trace_globals
from opentelemetry.test.test_base import TestBase
-from opentelemetry.util.http import get_excluded_urls
+from opentelemetry.util.http import (
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS,
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST,
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE,
+ get_excluded_urls,
+)
_expected_metric_names_old = [
"http.server.active_requests",
@@ -522,7 +530,7 @@ def test_basic_metric_success(self):
dict(point.attributes),
)
self.assertEqual(point.count, 1)
- self.assertAlmostEqual(duration, point.sum, delta=40)
+ self.assertAlmostEqual(duration, point.sum, delta=350)
if isinstance(point, NumberDataPoint):
self.assertDictEqual(
expected_requests_count_attributes,
@@ -557,7 +565,9 @@ def test_basic_metric_success_new_semconv(self):
)
self.assertEqual(point.count, 1)
if metric.name == "http.server.request.duration":
- self.assertAlmostEqual(duration_s, point.sum, places=1)
+ self.assertAlmostEqual(
+ duration_s * 0.1, point.sum, places=1
+ )
elif metric.name == "http.server.response.body.size":
self.assertEqual(25, point.sum)
elif metric.name == "http.server.request.body.size":
@@ -607,9 +617,11 @@ def test_basic_metric_success_both_semconv(self):
for point in list(metric.data.data_points):
if isinstance(point, HistogramDataPoint):
self.assertEqual(point.count, 1)
- self.assertAlmostEqual(duration, point.sum, delta=40)
+ self.assertAlmostEqual(duration, point.sum, delta=350)
if metric.name == "http.server.request.duration":
- self.assertAlmostEqual(duration_s, point.sum, places=1)
+ self.assertAlmostEqual(
+ duration_s * 0.1, point.sum, places=1
+ )
self.assertDictEqual(
expected_duration_attributes_new,
dict(point.attributes),
@@ -627,7 +639,7 @@ def test_basic_metric_success_both_semconv(self):
dict(point.attributes),
)
elif metric.name == "http.server.duration":
- self.assertAlmostEqual(duration, point.sum, delta=40)
+ self.assertAlmostEqual(duration, point.sum, delta=350)
self.assertDictEqual(
expected_duration_attributes_old,
dict(point.attributes),
@@ -683,7 +695,7 @@ def test_basic_metric_nonstandard_http_method_success(self):
dict(point.attributes),
)
self.assertEqual(point.count, 1)
- self.assertAlmostEqual(duration, point.sum, delta=40)
+ self.assertAlmostEqual(duration, point.sum, delta=350)
if isinstance(point, NumberDataPoint):
self.assertDictEqual(
expected_requests_count_attributes,
@@ -718,7 +730,9 @@ def test_basic_metric_nonstandard_http_method_success_new_semconv(self):
)
self.assertEqual(point.count, 1)
if metric.name == "http.server.request.duration":
- self.assertAlmostEqual(duration_s, point.sum, places=1)
+ self.assertAlmostEqual(
+ duration_s * 0.1, point.sum, places=1
+ )
elif metric.name == "http.server.response.body.size":
self.assertEqual(31, point.sum)
elif metric.name == "http.server.request.body.size":
@@ -768,9 +782,10 @@ def test_basic_metric_nonstandard_http_method_success_both_semconv(self):
for point in list(metric.data.data_points):
if isinstance(point, HistogramDataPoint):
self.assertEqual(point.count, 1)
- self.assertAlmostEqual(duration, point.sum, delta=40)
if metric.name == "http.server.request.duration":
- self.assertAlmostEqual(duration_s, point.sum, places=1)
+ self.assertAlmostEqual(
+ duration_s * 0.1, point.sum, places=1
+ )
self.assertDictEqual(
expected_duration_attributes_new,
dict(point.attributes),
@@ -788,7 +803,7 @@ def test_basic_metric_nonstandard_http_method_success_both_semconv(self):
dict(point.attributes),
)
elif metric.name == "http.server.duration":
- self.assertAlmostEqual(duration, point.sum, delta=40)
+ self.assertAlmostEqual(duration, point.sum, delta=350)
self.assertDictEqual(
expected_duration_attributes_old,
dict(point.attributes),
@@ -829,7 +844,7 @@ def test_basic_post_request_metric_success(self):
if isinstance(point, HistogramDataPoint):
self.assertEqual(point.count, 1)
if metric.name == "http.server.duration":
- self.assertAlmostEqual(duration, point.sum, delta=40)
+ self.assertAlmostEqual(duration, point.sum, delta=350)
elif metric.name == "http.server.response.size":
self.assertEqual(response_size, point.sum)
elif metric.name == "http.server.request.size":
@@ -854,7 +869,9 @@ def test_basic_post_request_metric_success_new_semconv(self):
if isinstance(point, HistogramDataPoint):
self.assertEqual(point.count, 1)
if metric.name == "http.server.request.duration":
- self.assertAlmostEqual(duration_s, point.sum, places=1)
+ self.assertAlmostEqual(
+ duration_s * 0.1, point.sum, places=1
+ )
elif metric.name == "http.server.response.body.size":
self.assertEqual(response_size, point.sum)
elif metric.name == "http.server.request.body.size":
@@ -880,13 +897,15 @@ def test_basic_post_request_metric_success_both_semconv(self):
if isinstance(point, HistogramDataPoint):
self.assertEqual(point.count, 1)
if metric.name == "http.server.request.duration":
- self.assertAlmostEqual(duration_s, point.sum, places=1)
+ self.assertAlmostEqual(
+ duration_s * 0.1, point.sum, places=1
+ )
elif metric.name == "http.server.response.body.size":
self.assertEqual(response_size, point.sum)
elif metric.name == "http.server.request.body.size":
self.assertEqual(request_size, point.sum)
elif metric.name == "http.server.duration":
- self.assertAlmostEqual(duration, point.sum, delta=40)
+ self.assertAlmostEqual(duration, point.sum, delta=350)
elif metric.name == "http.server.response.size":
self.assertEqual(response_size, point.sum)
elif metric.name == "http.server.request.size":
@@ -1062,6 +1081,18 @@ def test_uninstrument_after_instrument(self):
spans = self.memory_exporter.get_finished_spans()
self.assertEqual(len(spans), 3)
+ def test_no_op_tracer_provider(self):
+ self._instrumentor.uninstrument()
+ self._instrumentor.instrument(
+ tracer_provider=trace.NoOpTracerProvider()
+ )
+
+ app = self._create_fastapi_app()
+ client = TestClient(app)
+ client.get("/foobar")
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 0)
+
def tearDown(self):
self._instrumentor.uninstrument()
super().tearDown()
@@ -1228,3 +1259,527 @@ def test_instrumentation(self):
should_be_original = fastapi.FastAPI
self.assertIs(original, should_be_original)
+
+
+class TestWrappedApplication(TestBase):
+ def setUp(self):
+ super().setUp()
+
+ self.app = fastapi.FastAPI()
+
+ @self.app.get("/foobar")
+ async def _():
+ return {"message": "hello world"}
+
+ otel_fastapi.FastAPIInstrumentor().instrument_app(self.app)
+ self.client = TestClient(self.app)
+ self.tracer = self.tracer_provider.get_tracer(__name__)
+
+ def tearDown(self) -> None:
+ super().tearDown()
+ with self.disable_logging():
+ otel_fastapi.FastAPIInstrumentor().uninstrument_app(self.app)
+
+ def test_mark_span_internal_in_presence_of_span_from_other_framework(self):
+ with self.tracer.start_as_current_span(
+ "test", kind=trace.SpanKind.SERVER
+ ) as parent_span:
+ resp = self.client.get("/foobar")
+ self.assertEqual(200, resp.status_code)
+
+ span_list = self.memory_exporter.get_finished_spans()
+ for span in span_list:
+ print(str(span.__class__) + ": " + str(span.__dict__))
+
+ # there should be 4 spans - single SERVER "test" and three INTERNAL "FastAPI"
+ self.assertEqual(trace.SpanKind.INTERNAL, span_list[0].kind)
+ self.assertEqual(trace.SpanKind.INTERNAL, span_list[1].kind)
+ # main INTERNAL span - child of test
+ self.assertEqual(trace.SpanKind.INTERNAL, span_list[2].kind)
+ self.assertEqual(
+ parent_span.context.span_id, span_list[2].parent.span_id
+ )
+ # SERVER "test"
+ self.assertEqual(trace.SpanKind.SERVER, span_list[3].kind)
+ self.assertEqual(
+ parent_span.context.span_id, span_list[3].context.span_id
+ )
+
+
+@patch.dict(
+ "os.environ",
+ {
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS: ".*my-secret.*",
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST: "Custom-Test-Header-1,Custom-Test-Header-2,Custom-Test-Header-3,Regex-Test-Header-.*,Regex-Invalid-Test-Header-.*,.*my-secret.*",
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE: "Custom-Test-Header-1,Custom-Test-Header-2,Custom-Test-Header-3,my-custom-regex-header-.*,invalid-regex-header-.*,.*my-secret.*",
+ },
+)
+class TestHTTPAppWithCustomHeaders(TestBase):
+ def setUp(self):
+ super().setUp()
+ self.app = self._create_app()
+ otel_fastapi.FastAPIInstrumentor().instrument_app(self.app)
+ self.client = TestClient(self.app)
+
+ def tearDown(self) -> None:
+ super().tearDown()
+ with self.disable_logging():
+ otel_fastapi.FastAPIInstrumentor().uninstrument_app(self.app)
+
+ @staticmethod
+ def _create_app():
+ app = fastapi.FastAPI()
+
+ @app.get("/foobar")
+ async def _():
+ headers = {
+ "custom-test-header-1": "test-header-value-1",
+ "custom-test-header-2": "test-header-value-2",
+ "my-custom-regex-header-1": "my-custom-regex-value-1,my-custom-regex-value-2",
+ "My-Custom-Regex-Header-2": "my-custom-regex-value-3,my-custom-regex-value-4",
+ "My-Secret-Header": "My Secret Value",
+ }
+ content = {"message": "hello world"}
+ return JSONResponse(content=content, headers=headers)
+
+ return app
+
+ def test_http_custom_request_headers_in_span_attributes(self):
+ expected = {
+ "http.request.header.custom_test_header_1": (
+ "test-header-value-1",
+ ),
+ "http.request.header.custom_test_header_2": (
+ "test-header-value-2",
+ ),
+ "http.request.header.regex_test_header_1": ("Regex Test Value 1",),
+ "http.request.header.regex_test_header_2": (
+ "RegexTestValue2,RegexTestValue3",
+ ),
+ "http.request.header.my_secret_header": ("[REDACTED]",),
+ }
+ resp = self.client.get(
+ "/foobar",
+ headers={
+ "custom-test-header-1": "test-header-value-1",
+ "custom-test-header-2": "test-header-value-2",
+ "Regex-Test-Header-1": "Regex Test Value 1",
+ "regex-test-header-2": "RegexTestValue2,RegexTestValue3",
+ "My-Secret-Header": "My Secret Value",
+ },
+ )
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ self.assertSpanHasAttributes(server_span, expected)
+
+ def test_http_custom_request_headers_not_in_span_attributes(self):
+ not_expected = {
+ "http.request.header.custom_test_header_3": (
+ "test-header-value-3",
+ ),
+ }
+ resp = self.client.get(
+ "/foobar",
+ headers={
+ "custom-test-header-1": "test-header-value-1",
+ "custom-test-header-2": "test-header-value-2",
+ "Regex-Test-Header-1": "Regex Test Value 1",
+ "regex-test-header-2": "RegexTestValue2,RegexTestValue3",
+ "My-Secret-Header": "My Secret Value",
+ },
+ )
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ for key, _ in not_expected.items():
+ self.assertNotIn(key, server_span.attributes)
+
+ def test_http_custom_response_headers_in_span_attributes(self):
+ expected = {
+ "http.response.header.custom_test_header_1": (
+ "test-header-value-1",
+ ),
+ "http.response.header.custom_test_header_2": (
+ "test-header-value-2",
+ ),
+ "http.response.header.my_custom_regex_header_1": (
+ "my-custom-regex-value-1,my-custom-regex-value-2",
+ ),
+ "http.response.header.my_custom_regex_header_2": (
+ "my-custom-regex-value-3,my-custom-regex-value-4",
+ ),
+ "http.response.header.my_secret_header": ("[REDACTED]",),
+ }
+ resp = self.client.get("/foobar")
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+ self.assertSpanHasAttributes(server_span, expected)
+
+ def test_http_custom_response_headers_not_in_span_attributes(self):
+ not_expected = {
+ "http.response.header.custom_test_header_3": (
+ "test-header-value-3",
+ ),
+ }
+ resp = self.client.get("/foobar")
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ for key, _ in not_expected.items():
+ self.assertNotIn(key, server_span.attributes)
+
+
+class TestHTTPAppWithCustomHeadersParameters(TestBase):
+ """Minimal tests here since the behavior of this logic is tested above and in the ASGI tests."""
+
+ def setUp(self):
+ super().setUp()
+ self.instrumentor = otel_fastapi.FastAPIInstrumentor()
+ self.kwargs = {
+ "http_capture_headers_server_request": ["a.*", "b.*"],
+ "http_capture_headers_server_response": ["c.*", "d.*"],
+ "http_capture_headers_sanitize_fields": [".*secret.*"],
+ }
+ self.app = None
+
+ def tearDown(self) -> None:
+ super().tearDown()
+ with self.disable_logging():
+ if self.app:
+ self.instrumentor.uninstrument_app(self.app)
+ else:
+ self.instrumentor.uninstrument()
+
+ @staticmethod
+ def _create_app():
+ app = fastapi.FastAPI()
+
+ @app.get("/foobar")
+ async def _():
+ headers = {
+ "carrot": "bar",
+ "date-secret": "yellow",
+ "egg": "ham",
+ }
+ content = {"message": "hello world"}
+ return JSONResponse(content=content, headers=headers)
+
+ return app
+
+ def test_http_custom_request_headers_in_span_attributes_app(self):
+ self.app = self._create_app()
+ self.instrumentor.instrument_app(self.app, **self.kwargs)
+
+ resp = TestClient(self.app).get(
+ "/foobar",
+ headers={
+ "apple": "red",
+ "banana-secret": "yellow",
+ "fig": "green",
+ },
+ )
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ expected = {
+ # apple should be included because it starts with a
+ "http.request.header.apple": ("red",),
+ # same with banana because it starts with b,
+ # redacted because it contains "secret"
+ "http.request.header.banana_secret": ("[REDACTED]",),
+ }
+ self.assertSpanHasAttributes(server_span, expected)
+ self.assertNotIn("http.request.header.fig", server_span.attributes)
+
+ def test_http_custom_request_headers_in_span_attributes_instr(self):
+ """As above, but use instrument(), not instrument_app()."""
+ self.instrumentor.instrument(**self.kwargs)
+
+ resp = TestClient(self._create_app()).get(
+ "/foobar",
+ headers={
+ "apple": "red",
+ "banana-secret": "yellow",
+ "fig": "green",
+ },
+ )
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ expected = {
+ # apple should be included because it starts with a
+ "http.request.header.apple": ("red",),
+ # same with banana because it starts with b,
+ # redacted because it contains "secret"
+ "http.request.header.banana_secret": ("[REDACTED]",),
+ }
+ self.assertSpanHasAttributes(server_span, expected)
+ self.assertNotIn("http.request.header.fig", server_span.attributes)
+
+ def test_http_custom_response_headers_in_span_attributes_app(self):
+ self.app = self._create_app()
+ self.instrumentor.instrument_app(self.app, **self.kwargs)
+ resp = TestClient(self.app).get("/foobar")
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ expected = {
+ "http.response.header.carrot": ("bar",),
+ "http.response.header.date_secret": ("[REDACTED]",),
+ }
+ self.assertSpanHasAttributes(server_span, expected)
+ self.assertNotIn("http.response.header.egg", server_span.attributes)
+
+ def test_http_custom_response_headers_in_span_attributes_inst(self):
+ """As above, but use instrument(), not instrument_app()."""
+ self.instrumentor.instrument(**self.kwargs)
+
+ resp = TestClient(self._create_app()).get("/foobar")
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 3)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ expected = {
+ "http.response.header.carrot": ("bar",),
+ "http.response.header.date_secret": ("[REDACTED]",),
+ }
+ self.assertSpanHasAttributes(server_span, expected)
+ self.assertNotIn("http.response.header.egg", server_span.attributes)
+
+
+@patch.dict(
+ "os.environ",
+ {
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS: ".*my-secret.*",
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST: "Custom-Test-Header-1,Custom-Test-Header-2,Custom-Test-Header-3,Regex-Test-Header-.*,Regex-Invalid-Test-Header-.*,.*my-secret.*",
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE: "Custom-Test-Header-1,Custom-Test-Header-2,Custom-Test-Header-3,my-custom-regex-header-.*,invalid-regex-header-.*,.*my-secret.*",
+ },
+)
+class TestWebSocketAppWithCustomHeaders(TestBase):
+ def setUp(self):
+ super().setUp()
+ self.app = self._create_app()
+ otel_fastapi.FastAPIInstrumentor().instrument_app(self.app)
+ self.client = TestClient(self.app)
+
+ def tearDown(self) -> None:
+ super().tearDown()
+ with self.disable_logging():
+ otel_fastapi.FastAPIInstrumentor().uninstrument_app(self.app)
+
+ @staticmethod
+ def _create_app():
+ app = fastapi.FastAPI()
+
+ @app.websocket("/foobar_web")
+ async def _(websocket: fastapi.WebSocket):
+ message = await websocket.receive()
+ if message.get("type") == "websocket.connect":
+ await websocket.send(
+ {
+ "type": "websocket.accept",
+ "headers": [
+ (b"custom-test-header-1", b"test-header-value-1"),
+ (b"custom-test-header-2", b"test-header-value-2"),
+ (b"Regex-Test-Header-1", b"Regex Test Value 1"),
+ (
+ b"regex-test-header-2",
+ b"RegexTestValue2,RegexTestValue3",
+ ),
+ (b"My-Secret-Header", b"My Secret Value"),
+ ],
+ }
+ )
+ await websocket.send_json({"message": "hello world"})
+ await websocket.close()
+ if message.get("type") == "websocket.disconnect":
+ pass
+
+ return app
+
+ def test_web_socket_custom_request_headers_in_span_attributes(self):
+ expected = {
+ "http.request.header.custom_test_header_1": (
+ "test-header-value-1",
+ ),
+ "http.request.header.custom_test_header_2": (
+ "test-header-value-2",
+ ),
+ }
+
+ with self.client.websocket_connect(
+ "/foobar_web",
+ headers={
+ "custom-test-header-1": "test-header-value-1",
+ "custom-test-header-2": "test-header-value-2",
+ },
+ ) as websocket:
+ data = websocket.receive_json()
+ self.assertEqual(data, {"message": "hello world"})
+
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 5)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ self.assertSpanHasAttributes(server_span, expected)
+
+ @patch.dict(
+ "os.environ",
+ {
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SANITIZE_FIELDS: ".*my-secret.*",
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST: "Custom-Test-Header-1,Custom-Test-Header-2,Custom-Test-Header-3,Regex-Test-Header-.*,Regex-Invalid-Test-Header-.*,.*my-secret.*",
+ },
+ )
+ def test_web_socket_custom_request_headers_not_in_span_attributes(self):
+ not_expected = {
+ "http.request.header.custom_test_header_3": (
+ "test-header-value-3",
+ ),
+ }
+
+ with self.client.websocket_connect(
+ "/foobar_web",
+ headers={
+ "custom-test-header-1": "test-header-value-1",
+ "custom-test-header-2": "test-header-value-2",
+ },
+ ) as websocket:
+ data = websocket.receive_json()
+ self.assertEqual(data, {"message": "hello world"})
+
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 5)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ for key, _ in not_expected.items():
+ self.assertNotIn(key, server_span.attributes)
+
+ def test_web_socket_custom_response_headers_in_span_attributes(self):
+ expected = {
+ "http.response.header.custom_test_header_1": (
+ "test-header-value-1",
+ ),
+ "http.response.header.custom_test_header_2": (
+ "test-header-value-2",
+ ),
+ }
+
+ with self.client.websocket_connect("/foobar_web") as websocket:
+ data = websocket.receive_json()
+ self.assertEqual(data, {"message": "hello world"})
+
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 5)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ self.assertSpanHasAttributes(server_span, expected)
+
+ def test_web_socket_custom_response_headers_not_in_span_attributes(self):
+ not_expected = {
+ "http.response.header.custom_test_header_3": (
+ "test-header-value-3",
+ ),
+ }
+
+ with self.client.websocket_connect("/foobar_web") as websocket:
+ data = websocket.receive_json()
+ self.assertEqual(data, {"message": "hello world"})
+
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 5)
+
+ server_span = [
+ span for span in span_list if span.kind == trace.SpanKind.SERVER
+ ][0]
+
+ for key, _ in not_expected.items():
+ self.assertNotIn(key, server_span.attributes)
+
+
+@patch.dict(
+ "os.environ",
+ {
+ OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST: "Custom-Test-Header-1,Custom-Test-Header-2,Custom-Test-Header-3",
+ },
+)
+class TestNonRecordingSpanWithCustomHeaders(TestBase):
+ def setUp(self):
+ super().setUp()
+ self.app = fastapi.FastAPI()
+
+ @self.app.get("/foobar")
+ async def _():
+ return {"message": "hello world"}
+
+ reset_trace_globals()
+ tracer_provider = trace.NoOpTracerProvider()
+ trace.set_tracer_provider(tracer_provider=tracer_provider)
+
+ self._instrumentor = otel_fastapi.FastAPIInstrumentor()
+ self._instrumentor.instrument_app(self.app)
+ self.client = TestClient(self.app)
+
+ def tearDown(self) -> None:
+ super().tearDown()
+ with self.disable_logging():
+ self._instrumentor.uninstrument_app(self.app)
+
+ def test_custom_header_not_present_in_non_recording_span(self):
+ resp = self.client.get(
+ "/foobar",
+ headers={
+ "custom-test-header-1": "test-header-value-1",
+ },
+ )
+ self.assertEqual(200, resp.status_code)
+ span_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(span_list), 0)
diff --git a/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml b/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml
index ffafdbacc6..0e74ca331f 100644
--- a/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-flask/pyproject.toml
@@ -26,10 +26,10 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-wsgi == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-wsgi == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
"packaging >= 21.0",
"importlib-metadata >= 4.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
index 9bc5e85a12..192e044655 100644
--- a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/__init__.py
@@ -395,6 +395,7 @@ def _start_response(status, response_headers, *args, **kwargs):
)
if request_route:
+ # http.target to be included in old semantic conventions
duration_attrs_old[SpanAttributes.HTTP_TARGET] = str(
request_route
)
@@ -567,14 +568,14 @@ def __init__(self, *args, **kwargs):
duration_histogram_old = meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="measures the duration of the inbound HTTP request",
+ description="Measures the duration of inbound HTTP requests.",
)
duration_histogram_new = None
if _report_new(_InstrumentedFlask._sem_conv_opt_in_mode):
duration_histogram_new = meter.create_histogram(
name=HTTP_SERVER_REQUEST_DURATION,
unit="s",
- description="measures the duration of the inbound HTTP request",
+ description="Duration of HTTP server requests.",
)
active_requests_counter = meter.create_up_down_counter(
name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
@@ -700,14 +701,14 @@ def instrument_app(
duration_histogram_old = meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="measures the duration of the inbound HTTP request",
+ description="Measures the duration of inbound HTTP requests.",
)
duration_histogram_new = None
if _report_new(sem_conv_opt_in_mode):
duration_histogram_new = meter.create_histogram(
name=HTTP_SERVER_REQUEST_DURATION,
unit="s",
- description="measures the duration of the inbound HTTP request",
+ description="Duration of HTTP server requests.",
)
active_requests_counter = meter.create_up_down_counter(
name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
diff --git a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/version.py b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/version.py
+++ b/instrumentation/opentelemetry-instrumentation-flask/src/opentelemetry/instrumentation/flask/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt
index a222e011a7..0bd176848d 100644
--- a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
click==8.1.7
Deprecated==1.2.14
Flask==2.1.3
diff --git a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt
index e799218273..d73ab497b5 100644
--- a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
click==8.1.7
Deprecated==1.2.14
Flask==2.2.0
diff --git a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt
index 91ae64700c..299a347d66 100644
--- a/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt
+++ b/instrumentation/opentelemetry-instrumentation-flask/test-requirements-2.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
blinker==1.7.0
click==8.1.7
Deprecated==1.2.14
diff --git a/instrumentation/opentelemetry-instrumentation-grpc/pyproject.toml b/instrumentation/opentelemetry-instrumentation-grpc/pyproject.toml
index d0a7d54298..fd84d6aac0 100644
--- a/instrumentation/opentelemetry-instrumentation-grpc/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-grpc/pyproject.toml
@@ -26,14 +26,14 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
[project.optional-dependencies]
instruments = [
- "grpcio ~= 1.27",
+ "grpcio >= 1.42.0",
]
[project.entry-points.opentelemetry_instrumentor]
diff --git a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/grpcext/_interceptor.py b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/grpcext/_interceptor.py
index 53ee46a20d..32cec6dee0 100644
--- a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/grpcext/_interceptor.py
+++ b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/grpcext/_interceptor.py
@@ -272,11 +272,23 @@ def unsubscribe(self, *args, **kwargs):
self._channel.unsubscribe(*args, **kwargs)
def unary_unary(
- self, method, request_serializer=None, response_deserializer=None
+ self,
+ method,
+ request_serializer=None,
+ response_deserializer=None,
+ _registered_method=False,
):
- base_callable = self._channel.unary_unary(
- method, request_serializer, response_deserializer
- )
+ if _registered_method:
+ base_callable = self._channel.unary_unary(
+ method,
+ request_serializer,
+ response_deserializer,
+ _registered_method,
+ )
+ else:
+ base_callable = self._channel.unary_unary(
+ method, request_serializer, response_deserializer
+ )
if isinstance(self._interceptor, grpcext.UnaryClientInterceptor):
return _InterceptorUnaryUnaryMultiCallable(
method, base_callable, self._interceptor
@@ -284,11 +296,23 @@ def unary_unary(
return base_callable
def unary_stream(
- self, method, request_serializer=None, response_deserializer=None
+ self,
+ method,
+ request_serializer=None,
+ response_deserializer=None,
+ _registered_method=False,
):
- base_callable = self._channel.unary_stream(
- method, request_serializer, response_deserializer
- )
+ if _registered_method:
+ base_callable = self._channel.unary_stream(
+ method,
+ request_serializer,
+ response_deserializer,
+ _registered_method,
+ )
+ else:
+ base_callable = self._channel.unary_stream(
+ method, request_serializer, response_deserializer
+ )
if isinstance(self._interceptor, grpcext.StreamClientInterceptor):
return _InterceptorUnaryStreamMultiCallable(
method, base_callable, self._interceptor
@@ -296,11 +320,23 @@ def unary_stream(
return base_callable
def stream_unary(
- self, method, request_serializer=None, response_deserializer=None
+ self,
+ method,
+ request_serializer=None,
+ response_deserializer=None,
+ _registered_method=False,
):
- base_callable = self._channel.stream_unary(
- method, request_serializer, response_deserializer
- )
+ if _registered_method:
+ base_callable = self._channel.stream_unary(
+ method,
+ request_serializer,
+ response_deserializer,
+ _registered_method,
+ )
+ else:
+ base_callable = self._channel.stream_unary(
+ method, request_serializer, response_deserializer
+ )
if isinstance(self._interceptor, grpcext.StreamClientInterceptor):
return _InterceptorStreamUnaryMultiCallable(
method, base_callable, self._interceptor
@@ -308,11 +344,23 @@ def stream_unary(
return base_callable
def stream_stream(
- self, method, request_serializer=None, response_deserializer=None
+ self,
+ method,
+ request_serializer=None,
+ response_deserializer=None,
+ _registered_method=False,
):
- base_callable = self._channel.stream_stream(
- method, request_serializer, response_deserializer
- )
+ if _registered_method:
+ base_callable = self._channel.stream_stream(
+ method,
+ request_serializer,
+ response_deserializer,
+ _registered_method,
+ )
+ else:
+ base_callable = self._channel.stream_stream(
+ method, request_serializer, response_deserializer
+ )
if isinstance(self._interceptor, grpcext.StreamClientInterceptor):
return _InterceptorStreamStreamMultiCallable(
method, base_callable, self._interceptor
diff --git a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/package.py b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/package.py
index 91bdeab555..66ef914bdb 100644
--- a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/package.py
+++ b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/package.py
@@ -13,4 +13,4 @@
# limitations under the License.
-_instruments = ("grpcio ~= 1.27",)
+_instruments = ("grpcio >= 1.42.0",)
diff --git a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/version.py b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/version.py
+++ b/instrumentation/opentelemetry-instrumentation-grpc/src/opentelemetry/instrumentation/grpc/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-grpc/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-0.txt
similarity index 95%
rename from instrumentation/opentelemetry-instrumentation-grpc/test-requirements.txt
rename to instrumentation/opentelemetry-instrumentation-grpc/test-requirements-0.txt
index 457c285715..83ec6e8e70 100644
--- a/instrumentation/opentelemetry-instrumentation-grpc/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
grpcio==1.62.0
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-1.txt
new file mode 100644
index 0000000000..d77d67148a
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-1.txt
@@ -0,0 +1,16 @@
+asgiref==3.8.1
+Deprecated==1.2.14
+grpcio==1.63.0
+importlib-metadata==6.11.0
+iniconfig==2.0.0
+packaging==24.0
+pluggy==1.5.0
+protobuf==3.20.3
+py-cpuinfo==9.0.0
+pytest==7.4.4
+tomli==2.0.1
+typing_extensions==4.9.0
+wrapt==1.16.0
+zipp==3.19.2
+-e opentelemetry-instrumentation
+-e instrumentation/opentelemetry-instrumentation-grpc
diff --git a/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml b/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml
index 5e4629e281..599091716b 100644
--- a/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-httpx/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py
index f2a18a2770..15ee59a183 100644
--- a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py
@@ -192,6 +192,7 @@ async def async_response_hook(span, request, response):
"""
import logging
import typing
+from asyncio import iscoroutinefunction
from types import TracebackType
import httpx
@@ -202,7 +203,7 @@ async def async_response_hook(span, request, response):
_OpenTelemetrySemanticConventionStability,
_OpenTelemetryStabilitySignalType,
_report_new,
- _set_http_host,
+ _set_http_host_client,
_set_http_method,
_set_http_network_protocol_version,
_set_http_peer_port_client,
@@ -342,7 +343,7 @@ def _apply_request_client_attributes_to_span(
if _report_new(semconv):
if url.host:
# http semconv transition: http.host -> server.address
- _set_http_host(span_attributes, url.host, semconv)
+ _set_http_host_client(span_attributes, url.host, semconv)
# http semconv transition: net.sock.peer.addr -> network.peer.address
span_attributes[NETWORK_PEER_ADDRESS] = url.host
if url.port:
@@ -731,15 +732,19 @@ def _instrument(self, **kwargs):
self._original_async_client = httpx.AsyncClient
request_hook = kwargs.get("request_hook")
response_hook = kwargs.get("response_hook")
- async_request_hook = kwargs.get("async_request_hook", request_hook)
- async_response_hook = kwargs.get("async_response_hook", response_hook)
+ async_request_hook = kwargs.get("async_request_hook")
+ async_response_hook = kwargs.get("async_response_hook")
if callable(request_hook):
_InstrumentedClient._request_hook = request_hook
- if callable(async_request_hook):
+ if callable(async_request_hook) and iscoroutinefunction(
+ async_request_hook
+ ):
_InstrumentedAsyncClient._request_hook = async_request_hook
if callable(response_hook):
_InstrumentedClient._response_hook = response_hook
- if callable(async_response_hook):
+ if callable(async_response_hook) and iscoroutinefunction(
+ async_response_hook
+ ):
_InstrumentedAsyncClient._response_hook = async_response_hook
tracer_provider = kwargs.get("tracer_provider")
_InstrumentedClient._tracer_provider = tracer_provider
diff --git a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/version.py b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/version.py
+++ b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt
index 35ebe6b954..28b475a3a4 100644
--- a/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-0.txt
@@ -1,5 +1,5 @@
anyio==3.7.1
-asgiref==3.7.2
+asgiref==3.8.1
certifi==2024.7.4
Deprecated==1.2.14
exceptiongroup==1.2.0
diff --git a/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt
index c70677f06b..42c032a546 100644
--- a/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-httpx/test-requirements-1.txt
@@ -1,5 +1,5 @@
anyio==4.3.0
-asgiref==3.7.2
+asgiref==3.8.1
certifi==2024.7.4
Deprecated==1.2.14
exceptiongroup==1.2.0
diff --git a/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py b/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py
index 011b5e57d2..27535800cb 100644
--- a/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py
+++ b/instrumentation/opentelemetry-instrumentation-httpx/tests/test_httpx_integration.py
@@ -723,6 +723,7 @@ def test_client_mounts_with_instrumented_transport(self):
spans[1].attributes[SpanAttributes.HTTP_URL], https_url
)
+ @mock.patch.dict("os.environ", {"NO_PROXY": ""}, clear=True)
class BaseInstrumentorTest(BaseTest, metaclass=abc.ABCMeta):
@abc.abstractmethod
def create_client(
@@ -780,9 +781,15 @@ def test_custom_tracer_provider(self):
HTTPXClientInstrumentor().uninstrument()
def test_response_hook(self):
+ response_hook_key = (
+ "async_response_hook"
+ if asyncio.iscoroutinefunction(self.response_hook)
+ else "response_hook"
+ )
+ response_hook_kwargs = {response_hook_key: self.response_hook}
HTTPXClientInstrumentor().instrument(
tracer_provider=self.tracer_provider,
- response_hook=self.response_hook,
+ **response_hook_kwargs,
)
client = self.create_client()
result = self.perform_request(self.URL, client=client)
@@ -823,9 +830,15 @@ def test_response_hook_sync_async_kwargs(self):
HTTPXClientInstrumentor().uninstrument()
def test_request_hook(self):
+ request_hook_key = (
+ "async_request_hook"
+ if asyncio.iscoroutinefunction(self.request_hook)
+ else "request_hook"
+ )
+ request_hook_kwargs = {request_hook_key: self.request_hook}
HTTPXClientInstrumentor().instrument(
tracer_provider=self.tracer_provider,
- request_hook=self.request_hook,
+ **request_hook_kwargs,
)
client = self.create_client()
result = self.perform_request(self.URL, client=client)
@@ -1214,3 +1227,36 @@ def test_basic_multiple(self):
self.perform_request(self.URL, client=self.client)
self.perform_request(self.URL, client=self.client2)
self.assert_span(num_spans=2)
+
+ def test_async_response_hook_does_nothing_if_not_coroutine(self):
+ HTTPXClientInstrumentor().instrument(
+ tracer_provider=self.tracer_provider,
+ async_response_hook=_response_hook,
+ )
+ client = self.create_client()
+ result = self.perform_request(self.URL, client=client)
+
+ self.assertEqual(result.text, "Hello!")
+ span = self.assert_span()
+ self.assertEqual(
+ dict(span.attributes),
+ {
+ SpanAttributes.HTTP_METHOD: "GET",
+ SpanAttributes.HTTP_URL: self.URL,
+ SpanAttributes.HTTP_STATUS_CODE: 200,
+ },
+ )
+ HTTPXClientInstrumentor().uninstrument()
+
+ def test_async_request_hook_does_nothing_if_not_coroutine(self):
+ HTTPXClientInstrumentor().instrument(
+ tracer_provider=self.tracer_provider,
+ async_request_hook=_request_hook,
+ )
+ client = self.create_client()
+ result = self.perform_request(self.URL, client=client)
+
+ self.assertEqual(result.text, "Hello!")
+ span = self.assert_span()
+ self.assertEqual(span.name, "GET")
+ HTTPXClientInstrumentor().uninstrument()
diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/pyproject.toml b/instrumentation/opentelemetry-instrumentation-jinja2/pyproject.toml
index f74b8ca488..40159c3485 100644
--- a/instrumentation/opentelemetry-instrumentation-jinja2/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-jinja2/pyproject.toml
@@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/version.py b/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/version.py
+++ b/instrumentation/opentelemetry-instrumentation-jinja2/src/opentelemetry/instrumentation/jinja2/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-jinja2/test-requirements.txt
index 05d94d6fb0..59eabe6997 100644
--- a/instrumentation/opentelemetry-instrumentation-jinja2/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-jinja2/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-jinja2/tests/test_jinja2.py b/instrumentation/opentelemetry-instrumentation-jinja2/tests/test_jinja2.py
index 542a65d220..98344c47e4 100644
--- a/instrumentation/opentelemetry-instrumentation-jinja2/tests/test_jinja2.py
+++ b/instrumentation/opentelemetry-instrumentation-jinja2/tests/test_jinja2.py
@@ -143,7 +143,7 @@ def test_generate_inline_template(self):
def test_file_template_with_root(self):
with self.tracer.start_as_current_span("root"):
loader = jinja2.loaders.FileSystemLoader(TMPL_DIR)
- env = jinja2.Environment(loader=loader)
+ env = jinja2.Environment(loader=loader, autoescape=True)
template = env.get_template("template.html")
self.assertEqual(
template.render(name="Jinja"), "Message: Hello Jinja!"
@@ -164,7 +164,7 @@ def test_file_template_with_root(self):
def test_file_template(self):
loader = jinja2.loaders.FileSystemLoader(TMPL_DIR)
- env = jinja2.Environment(loader=loader)
+ env = jinja2.Environment(loader=loader, autoescape=True)
template = env.get_template("template.html")
self.assertEqual(
template.render(name="Jinja"), "Message: Hello Jinja!"
@@ -219,3 +219,14 @@ def test_uninstrumented(self):
self.assertEqual(len(spans), 0)
Jinja2Instrumentor().instrument()
+
+ def test_no_op_tracer_provider(self):
+ self.memory_exporter.clear()
+ Jinja2Instrumentor().uninstrument()
+ Jinja2Instrumentor().instrument(
+ tracer_provider=trace_api.NoOpTracerProvider()
+ )
+ template = jinja2.environment.Template("Hello {{name}}!")
+ self.assertEqual(template.render(name="Jinja"), "Hello Jinja!")
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 0)
diff --git a/instrumentation/opentelemetry-instrumentation-kafka-python/pyproject.toml b/instrumentation/opentelemetry-instrumentation-kafka-python/pyproject.toml
index f9c0cf8332..d47672fa07 100644
--- a/instrumentation/opentelemetry-instrumentation-kafka-python/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-kafka-python/pyproject.toml
@@ -22,16 +22,18 @@ classifiers = [
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
+ "Programming Language :: Python :: 3.12",
]
dependencies = [
"opentelemetry-api ~= 1.5",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
instruments = [
- "kafka-python >= 2.0",
+ "kafka-python >= 2.0, < 3.0",
+ "kafka-python-ng >= 2.0, < 3.0"
]
[project.entry-points.opentelemetry_instrumentor]
diff --git a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py
index 8d7378dfdf..b29990d6e3 100644
--- a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/__init__.py
@@ -67,6 +67,7 @@ def consume_hook(span, record, args, kwargs):
API
___
"""
+from importlib.metadata import PackageNotFoundError, distribution
from typing import Collection
import kafka
@@ -74,7 +75,11 @@ def consume_hook(span, record, args, kwargs):
from opentelemetry import trace
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
-from opentelemetry.instrumentation.kafka.package import _instruments
+from opentelemetry.instrumentation.kafka.package import (
+ _instruments,
+ _instruments_kafka_python,
+ _instruments_kafka_python_ng,
+)
from opentelemetry.instrumentation.kafka.utils import _wrap_next, _wrap_send
from opentelemetry.instrumentation.kafka.version import __version__
from opentelemetry.instrumentation.utils import unwrap
@@ -86,6 +91,23 @@ class KafkaInstrumentor(BaseInstrumentor):
"""
def instrumentation_dependencies(self) -> Collection[str]:
+ # Determine which package of kafka-python is installed
+ # Right now there are two packages, kafka-python and kafka-python-ng
+ # The latter is a fork of the former because the former is connected
+ # to a pypi namespace that the current maintainers cannot access
+ # https://github.com/dpkp/kafka-python/issues/2431
+ try:
+ distribution("kafka-python-ng")
+ return (_instruments_kafka_python_ng,)
+ except PackageNotFoundError:
+ pass
+
+ try:
+ distribution("kafka-python")
+ return (_instruments_kafka_python,)
+ except PackageNotFoundError:
+ pass
+
return _instruments
def _instrument(self, **kwargs):
diff --git a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/package.py b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/package.py
index 04863fb7b4..3a4a5e5de6 100644
--- a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/package.py
+++ b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/package.py
@@ -13,4 +13,7 @@
# limitations under the License.
-_instruments = ("kafka-python >= 2.0",)
+_instruments_kafka_python = "kafka-python >= 2.0, < 3.0"
+_instruments_kafka_python_ng = "kafka-python-ng >= 2.0, < 3.0"
+
+_instruments = (_instruments_kafka_python, _instruments_kafka_python_ng)
diff --git a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/version.py b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/version.py
+++ b/instrumentation/opentelemetry-instrumentation-kafka-python/src/opentelemetry/instrumentation/kafka/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements-ng.txt b/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements-ng.txt
new file mode 100644
index 0000000000..05e169a7e3
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements-ng.txt
@@ -0,0 +1,15 @@
+asgiref==3.8.1
+Deprecated==1.2.14
+importlib-metadata==6.11.0
+iniconfig==2.0.0
+kafka-python-ng==2.2.2
+packaging==24.0
+pluggy==1.5.0
+py-cpuinfo==9.0.0
+pytest==7.4.4
+tomli==2.0.1
+typing_extensions==4.9.0
+wrapt==1.16.0
+zipp==3.19.2
+-e opentelemetry-instrumentation
+-e instrumentation/opentelemetry-instrumentation-kafka-python
diff --git a/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.txt
index 4adc515de7..6582cf875b 100644
--- a/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-logging/pyproject.toml b/instrumentation/opentelemetry-instrumentation-logging/pyproject.toml
index 2c1b2ad897..62656bea22 100644
--- a/instrumentation/opentelemetry-instrumentation-logging/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-logging/pyproject.toml
@@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/version.py b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/version.py
index e0bef4b1e3..79e27849a4 100644
--- a/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/version.py
+++ b/instrumentation/opentelemetry-instrumentation-logging/src/opentelemetry/instrumentation/logging/version.py
@@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
_instruments = tuple()
diff --git a/instrumentation/opentelemetry-instrumentation-logging/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-logging/test-requirements.txt
index eca8ce5f34..c0d2f044c8 100644
--- a/instrumentation/opentelemetry-instrumentation-logging/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-logging/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-mysql/pyproject.toml b/instrumentation/opentelemetry-instrumentation-mysql/pyproject.toml
index cb1c51b082..629ab5325e 100644
--- a/instrumentation/opentelemetry-instrumentation-mysql/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-mysql/pyproject.toml
@@ -26,13 +26,13 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-dbapi == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi == 0.49b0.dev",
]
[project.optional-dependencies]
instruments = [
- "mysql-connector-python ~= 8.0",
+ "mysql-connector-python >= 8.0, < 10.0",
]
[project.entry-points.opentelemetry_instrumentor]
diff --git a/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/package.py b/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/package.py
index efb8ece73b..4d84c1161b 100644
--- a/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/package.py
+++ b/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/package.py
@@ -13,4 +13,4 @@
# limitations under the License.
-_instruments = ("mysql-connector-python ~= 8.0",)
+_instruments = ("mysql-connector-python >= 8.0, < 10.0",)
diff --git a/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/version.py b/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/version.py
+++ b/instrumentation/opentelemetry-instrumentation-mysql/src/opentelemetry/instrumentation/mysql/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-mysql/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-0.txt
similarity index 96%
rename from instrumentation/opentelemetry-instrumentation-mysql/test-requirements.txt
rename to instrumentation/opentelemetry-instrumentation-mysql/test-requirements-0.txt
index 75ee9797b8..bf93434850 100644
--- a/instrumentation/opentelemetry-instrumentation-mysql/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-1.txt
new file mode 100644
index 0000000000..1a58c16a05
--- /dev/null
+++ b/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-1.txt
@@ -0,0 +1,16 @@
+asgiref==3.8.1
+Deprecated==1.2.14
+importlib-metadata==6.11.0
+iniconfig==2.0.0
+mysql-connector-python==9.0.0
+packaging==24.0
+pluggy==1.5.0
+py-cpuinfo==9.0.0
+pytest==7.4.4
+tomli==2.0.1
+typing_extensions==4.9.0
+wrapt==1.16.0
+zipp==3.19.2
+-e opentelemetry-instrumentation
+-e instrumentation/opentelemetry-instrumentation-dbapi
+-e instrumentation/opentelemetry-instrumentation-mysql
diff --git a/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml b/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml
index 0ede691e36..0cc4553384 100644
--- a/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-mysqlclient/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-dbapi == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-mysqlclient/src/opentelemetry/instrumentation/mysqlclient/version.py b/instrumentation/opentelemetry-instrumentation-mysqlclient/src/opentelemetry/instrumentation/mysqlclient/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-mysqlclient/src/opentelemetry/instrumentation/mysqlclient/version.py
+++ b/instrumentation/opentelemetry-instrumentation-mysqlclient/src/opentelemetry/instrumentation/mysqlclient/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt
index 534c7869cb..8c3ed72f35 100644
--- a/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-mysqlclient/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pika/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pika/pyproject.toml
index 145439b242..bc01323ee4 100644
--- a/instrumentation/opentelemetry-instrumentation-pika/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-pika/pyproject.toml
@@ -25,7 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
"opentelemetry-api ~= 1.5",
"packaging >= 20.0",
"wrapt >= 1.0.0, < 2.0.0",
diff --git a/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/version.py b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/version.py
+++ b/instrumentation/opentelemetry-instrumentation-pika/src/opentelemetry/instrumentation/pika/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-pika/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-pika/test-requirements-0.txt
index cc874af2cc..e06bc0b395 100644
--- a/instrumentation/opentelemetry-instrumentation-pika/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-pika/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pika/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-pika/test-requirements-1.txt
index 4a09147744..8928f655c8 100644
--- a/instrumentation/opentelemetry-instrumentation-pika/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-pika/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg/pyproject.toml b/instrumentation/opentelemetry-instrumentation-psycopg/pyproject.toml
index 717257821d..513064ae7f 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-psycopg/pyproject.toml
@@ -27,8 +27,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-dbapi == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/version.py b/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/version.py
+++ b/instrumentation/opentelemetry-instrumentation-psycopg/src/opentelemetry/instrumentation/psycopg/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-0.txt
index e60531b112..42bbac77d9 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
backports.zoneinfo==0.2.1
Deprecated==1.2.14
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt
index 6ad211f9c0..1f7fb59f2d 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-psycopg/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml b/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml
index 7db83dcc5c..592c15b4db 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-psycopg2/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-dbapi == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/version.py b/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/version.py
+++ b/instrumentation/opentelemetry-instrumentation-psycopg2/src/opentelemetry/instrumentation/psycopg2/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt
index 4d6682b3d6..aa98fa93d0 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-psycopg2/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py b/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py
index 369d63d5cf..6671073043 100644
--- a/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py
+++ b/instrumentation/opentelemetry-instrumentation-psycopg2/tests/test_psycopg2_integration.py
@@ -18,6 +18,7 @@
import psycopg2
import opentelemetry.instrumentation.psycopg2
+from opentelemetry import trace
from opentelemetry.instrumentation.psycopg2 import Psycopg2Instrumentor
from opentelemetry.sdk import resources
from opentelemetry.test.test_base import TestBase
@@ -269,3 +270,14 @@ def test_sqlcommenter_disabled(self, event_mocked):
cursor.execute(query)
kwargs = event_mocked.call_args[1]
self.assertEqual(kwargs["enable_commenter"], False)
+
+ def test_no_op_tracer_provider(self):
+ Psycopg2Instrumentor().instrument(
+ tracer_provider=trace.NoOpTracerProvider()
+ )
+ cnx = psycopg2.connect(database="test")
+ cursor = cnx.cursor()
+ query = "SELECT * FROM test"
+ cursor.execute(query)
+ spans_list = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans_list), 0)
diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml
index 47df236c42..c20ffd3dee 100644
--- a/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-pymemcache/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/src/opentelemetry/instrumentation/pymemcache/version.py b/instrumentation/opentelemetry-instrumentation-pymemcache/src/opentelemetry/instrumentation/pymemcache/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-pymemcache/src/opentelemetry/instrumentation/pymemcache/version.py
+++ b/instrumentation/opentelemetry-instrumentation-pymemcache/src/opentelemetry/instrumentation/pymemcache/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt
index 28a62d84b4..2c6e0e2749 100644
--- a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt
index 4be0dbee52..36db8d4416 100644
--- a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt
index f07d79374a..3e0359f731 100644
--- a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt
+++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-2.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt
index 4e4871147c..916c9c9c3a 100644
--- a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt
+++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-3.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt
index 28fe27f0ef..e90a138ff8 100644
--- a/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt
+++ b/instrumentation/opentelemetry-instrumentation-pymemcache/test-requirements-4.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pymongo/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pymongo/pyproject.toml
index ccd75ffeaa..61f4fd2b72 100644
--- a/instrumentation/opentelemetry-instrumentation-pymongo/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-pymongo/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/version.py b/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/version.py
+++ b/instrumentation/opentelemetry-instrumentation-pymongo/src/opentelemetry/instrumentation/pymongo/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-pymongo/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-pymongo/test-requirements.txt
index eb41ee6bd9..6c8de553b6 100644
--- a/instrumentation/opentelemetry-instrumentation-pymongo/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-pymongo/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
dnspython==2.6.1
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml
index 08ee94fd9e..9e1bc1a881 100644
--- a/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-pymysql/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-dbapi == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-pymysql/src/opentelemetry/instrumentation/pymysql/version.py b/instrumentation/opentelemetry-instrumentation-pymysql/src/opentelemetry/instrumentation/pymysql/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-pymysql/src/opentelemetry/instrumentation/pymysql/version.py
+++ b/instrumentation/opentelemetry-instrumentation-pymysql/src/opentelemetry/instrumentation/pymysql/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt
index 8338f79b65..7ad69f2b81 100644
--- a/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-pymysql/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml b/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml
index 9da43f444c..2a559e6c60 100644
--- a/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/pyproject.toml
@@ -26,10 +26,10 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-wsgi == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-wsgi == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py
index 09f1645384..6a526f2235 100644
--- a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py
@@ -141,7 +141,7 @@ def trace_tween_factory(handler, registry):
duration_histogram = meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="Duration of HTTP server requests.",
+ description="Measures the duration of inbound HTTP requests.",
)
active_requests_counter = meter.create_up_down_counter(
name=MetricInstruments.HTTP_SERVER_ACTIVE_REQUESTS,
diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/version.py b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/version.py
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt
index 56f89f8e8e..6f33f33449 100644
--- a/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-pyramid/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
hupper==1.12.1
importlib-metadata==6.11.0
@@ -15,7 +15,7 @@ tomli==2.0.1
translationstring==1.4
typing_extensions==4.9.0
venusian==3.1.0
-WebOb==1.8.7
+WebOb==1.8.8
Werkzeug==3.0.3
wrapt==1.16.0
zipp==3.19.2
diff --git a/instrumentation/opentelemetry-instrumentation-redis/pyproject.toml b/instrumentation/opentelemetry-instrumentation-redis/pyproject.toml
index d39bda20a5..c262363fab 100644
--- a/instrumentation/opentelemetry-instrumentation-redis/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-redis/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"wrapt >= 1.12.1",
]
diff --git a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/version.py b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/version.py
+++ b/instrumentation/opentelemetry-instrumentation-redis/src/opentelemetry/instrumentation/redis/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-redis/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-redis/test-requirements.txt
index 43d4bd9788..7b8d8459b7 100644
--- a/instrumentation/opentelemetry-instrumentation-redis/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-redis/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
async-timeout==4.0.3
Deprecated==1.2.14
fakeredis==2.23.3
diff --git a/instrumentation/opentelemetry-instrumentation-remoulade/pyproject.toml b/instrumentation/opentelemetry-instrumentation-remoulade/pyproject.toml
index 8b2b3679a9..7f3041b887 100644
--- a/instrumentation/opentelemetry-instrumentation-remoulade/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-remoulade/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-remoulade/src/opentelemetry/instrumentation/remoulade/version.py b/instrumentation/opentelemetry-instrumentation-remoulade/src/opentelemetry/instrumentation/remoulade/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-remoulade/src/opentelemetry/instrumentation/remoulade/version.py
+++ b/instrumentation/opentelemetry-instrumentation-remoulade/src/opentelemetry/instrumentation/remoulade/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-remoulade/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-remoulade/test-requirements.txt
index 727c15ec4e..b850e46f9f 100644
--- a/instrumentation/opentelemetry-instrumentation-remoulade/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-remoulade/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml b/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml
index 88996d2540..dafe3b4d3a 100644
--- a/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-requests/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py
index 3aa1b476f5..db67d378d9 100644
--- a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/__init__.py
@@ -92,7 +92,7 @@ def response_hook(span, request_obj, response)
_OpenTelemetryStabilitySignalType,
_report_new,
_report_old,
- _set_http_host,
+ _set_http_host_client,
_set_http_method,
_set_http_net_peer_name_client,
_set_http_network_protocol_version,
@@ -212,14 +212,14 @@ def get_or_create_headers():
metric_labels, parsed_url.scheme, sem_conv_opt_in_mode
)
if parsed_url.hostname:
- _set_http_host(
+ _set_http_host_client(
metric_labels, parsed_url.hostname, sem_conv_opt_in_mode
)
_set_http_net_peer_name_client(
metric_labels, parsed_url.hostname, sem_conv_opt_in_mode
)
if _report_new(sem_conv_opt_in_mode):
- _set_http_host(
+ _set_http_host_client(
span_attributes,
parsed_url.hostname,
sem_conv_opt_in_mode,
diff --git a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/version.py b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/version.py
+++ b/instrumentation/opentelemetry-instrumentation-requests/src/opentelemetry/instrumentation/requests/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt
index 03d0a793a6..9f40c6d5b2 100644
--- a/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-requests/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
certifi==2024.7.4
charset-normalizer==3.3.2
Deprecated==1.2.14
diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml
index 21021fb590..d6cc3f71d9 100644
--- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
"packaging >= 21.0",
"wrapt >= 1.11.2",
]
diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/version.py b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/version.py
+++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/src/opentelemetry/instrumentation/sqlalchemy/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt
index af0e495a39..45992bc2e1 100644
--- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-0.txt
@@ -1,15 +1,12 @@
-asgiref==3.7.2
+asgiref==3.8.1
cffi==1.15.1
Deprecated==1.2.14
-greenlet==0.4.13
-hpy==0.0.4.dev179+g9b5d200
importlib-metadata==6.11.0
iniconfig==2.0.0
packaging==24.0
pluggy==1.5.0
py-cpuinfo==9.0.0
pytest==7.4.4
-readline==6.2.4.1
SQLAlchemy==1.1.18
tomli==2.0.1
typing_extensions==4.10.0
diff --git a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt
index 9b1b15debc..eb1ee371b7 100644
--- a/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-sqlalchemy/test-requirements-1.txt
@@ -1,5 +1,5 @@
aiosqlite==0.20.0
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
greenlet==3.0.3
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-sqlite3/pyproject.toml b/instrumentation/opentelemetry-instrumentation-sqlite3/pyproject.toml
index e86fb99235..60ec47b16e 100644
--- a/instrumentation/opentelemetry-instrumentation-sqlite3/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-sqlite3/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-dbapi == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/version.py b/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/version.py
index e0bef4b1e3..79e27849a4 100644
--- a/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/version.py
+++ b/instrumentation/opentelemetry-instrumentation-sqlite3/src/opentelemetry/instrumentation/sqlite3/version.py
@@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
_instruments = tuple()
diff --git a/instrumentation/opentelemetry-instrumentation-sqlite3/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-sqlite3/test-requirements.txt
index 8c98e702b4..e260861814 100644
--- a/instrumentation/opentelemetry-instrumentation-sqlite3/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-sqlite3/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml b/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml
index 6e6d370b53..9cdd968ca0 100644
--- a/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-starlette/pyproject.toml
@@ -26,10 +26,10 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-instrumentation-asgi == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-instrumentation-asgi == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py b/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py
+++ b/instrumentation/opentelemetry-instrumentation-starlette/src/opentelemetry/instrumentation/starlette/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt
index 1d5b91e188..d81a15a40c 100644
--- a/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-starlette/test-requirements.txt
@@ -1,5 +1,5 @@
anyio==4.3.0
-asgiref==3.7.2
+asgiref==3.8.1
certifi==2024.7.4
charset-normalizer==3.3.2
Deprecated==1.2.14
diff --git a/instrumentation/opentelemetry-instrumentation-system-metrics/pyproject.toml b/instrumentation/opentelemetry-instrumentation-system-metrics/pyproject.toml
index 6a1e83912f..a405c668f7 100644
--- a/instrumentation/opentelemetry-instrumentation-system-metrics/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-system-metrics/pyproject.toml
@@ -25,7 +25,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
"opentelemetry-api ~= 1.11",
"psutil >= 5.9.0, < 7",
]
diff --git a/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py b/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py
index b7ffb25431..1b9a36c4cb 100644
--- a/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/__init__.py
@@ -729,7 +729,7 @@ def _get_runtime_cpu_utilization(
"""Observer callback for runtime CPU utilization"""
proc_cpu_percent = self._proc.cpu_percent()
yield Observation(
- proc_cpu_percent,
+ proc_cpu_percent / 100,
self._runtime_cpu_utilization_labels.copy(),
)
diff --git a/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/version.py b/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/version.py
+++ b/instrumentation/opentelemetry-instrumentation-system-metrics/src/opentelemetry/instrumentation/system_metrics/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-system-metrics/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-system-metrics/test-requirements.txt
index 506499ea13..76f2f2a4e7 100644
--- a/instrumentation/opentelemetry-instrumentation-system-metrics/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-system-metrics/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-system-metrics/tests/test_system_metrics.py b/instrumentation/opentelemetry-instrumentation-system-metrics/tests/test_system_metrics.py
index 1d6f08892e..bf3a5c6ee2 100644
--- a/instrumentation/opentelemetry-instrumentation-system-metrics/tests/test_system_metrics.py
+++ b/instrumentation/opentelemetry-instrumentation-system-metrics/tests/test_system_metrics.py
@@ -839,7 +839,7 @@ def test_runtime_thread_num(self, mock_process_thread_num):
def test_runtime_cpu_percent(self, mock_process_cpu_percent):
mock_process_cpu_percent.configure_mock(**{"return_value": 42})
- expected = [_SystemMetricsResult({}, 42)]
+ expected = [_SystemMetricsResult({}, 0.42)]
self._test_metrics(
f"process.runtime.{self.implementation}.cpu.utilization", expected
)
diff --git a/instrumentation/opentelemetry-instrumentation-threading/pyproject.toml b/instrumentation/opentelemetry-instrumentation-threading/pyproject.toml
index 16088e7de3..43f92d2034 100644
--- a/instrumentation/opentelemetry-instrumentation-threading/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-threading/pyproject.toml
@@ -26,7 +26,7 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-threading/src/opentelemetry/instrumentation/threading/version.py b/instrumentation/opentelemetry-instrumentation-threading/src/opentelemetry/instrumentation/threading/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-threading/src/opentelemetry/instrumentation/threading/version.py
+++ b/instrumentation/opentelemetry-instrumentation-threading/src/opentelemetry/instrumentation/threading/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-threading/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-threading/test-requirements.txt
index 45ee66cf01..2d13857e9e 100644
--- a/instrumentation/opentelemetry-instrumentation-threading/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-threading/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml b/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml
index 0096deb8fd..f3f9a4b4fc 100644
--- a/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-tornado/pyproject.toml
@@ -25,9 +25,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py
index 1b56db3876..0b5e06b526 100644
--- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/__init__.py
@@ -296,7 +296,7 @@ def _create_server_histograms(meter) -> Dict[str, Histogram]:
MetricInstruments.HTTP_SERVER_DURATION: meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="Duration of HTTP server requests.",
+ description="Measures the duration of inbound HTTP requests.",
),
MetricInstruments.HTTP_SERVER_REQUEST_SIZE: meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_REQUEST_SIZE,
diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py
index 090f87a88b..fa0e53bf95 100644
--- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py
+++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py
@@ -21,7 +21,7 @@
from opentelemetry.instrumentation.utils import http_status_to_status_code
from opentelemetry.propagate import inject
from opentelemetry.semconv.trace import SpanAttributes
-from opentelemetry.trace.status import Status
+from opentelemetry.trace.status import Status, StatusCode
from opentelemetry.util.http import remove_url_credentials
@@ -105,37 +105,53 @@ def _finish_tracing_callback(
request_size_histogram,
response_size_histogram,
):
+ response = None
status_code = None
+ status = None
description = None
- exc = future.exception()
-
- response = future.result()
- if span.is_recording() and exc:
+ exc = future.exception()
+ if exc:
+ description = f"{type(exc).__qualname__}: {exc}"
if isinstance(exc, HTTPError):
+ response = exc.response
status_code = exc.code
- description = f"{type(exc).__name__}: {exc}"
+ status = Status(
+ status_code=http_status_to_status_code(status_code),
+ description=description,
+ )
+ else:
+ status = Status(
+ status_code=StatusCode.ERROR,
+ description=description,
+ )
+ span.record_exception(exc)
else:
+ response = future.result()
status_code = response.code
+ status = Status(
+ status_code=http_status_to_status_code(status_code),
+ description=description,
+ )
if status_code is not None:
span.set_attribute(SpanAttributes.HTTP_STATUS_CODE, status_code)
- span.set_status(
- Status(
- status_code=http_status_to_status_code(status_code),
- description=description,
- )
- )
+ span.set_status(status)
- metric_attributes = _create_metric_attributes(response)
- request_size = int(response.request.headers.get("Content-Length", 0))
- response_size = int(response.headers.get("Content-Length", 0))
+ if response is not None:
+ metric_attributes = _create_metric_attributes(response)
+ request_size = int(response.request.headers.get("Content-Length", 0))
+ response_size = int(response.headers.get("Content-Length", 0))
- duration_histogram.record(
- response.request_time, attributes=metric_attributes
- )
- request_size_histogram.record(request_size, attributes=metric_attributes)
- response_size_histogram.record(response_size, attributes=metric_attributes)
+ duration_histogram.record(
+ response.request_time, attributes=metric_attributes
+ )
+ request_size_histogram.record(
+ request_size, attributes=metric_attributes
+ )
+ response_size_histogram.record(
+ response_size, attributes=metric_attributes
+ )
if response_hook:
response_hook(span, future)
diff --git a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/version.py b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/version.py
+++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt
index fb542966de..236c45f87b 100644
--- a/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-tornado/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
blinker==1.7.0
certifi==2024.7.4
charset-normalizer==3.3.2
diff --git a/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py b/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py
index 01cdddceed..daf2ddd846 100644
--- a/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py
+++ b/instrumentation/opentelemetry-instrumentation-tornado/tests/test_instrumentation.py
@@ -16,6 +16,7 @@
from unittest.mock import Mock, patch
from http_server_mock import HttpServerMock
+from tornado.httpclient import HTTPClientError
from tornado.testing import AsyncHTTPTestCase
from opentelemetry import trace
@@ -32,7 +33,7 @@
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.test_base import TestBase
from opentelemetry.test.wsgitestutil import WsgiTestBase
-from opentelemetry.trace import SpanKind
+from opentelemetry.trace import SpanKind, StatusCode
from opentelemetry.util.http import (
OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_REQUEST,
OTEL_INSTRUMENTATION_HTTP_CAPTURE_HEADERS_SERVER_RESPONSE,
@@ -493,7 +494,6 @@ def test_response_headers(self):
self.assertEqual(len(spans), 3)
self.assertTraceResponseHeaderMatchesSpan(response.headers, spans[1])
- self.memory_exporter.clear()
set_global_response_propagator(orig)
def test_credential_removal(self):
@@ -602,6 +602,49 @@ def client_response_hook(span, response):
self.memory_exporter.clear()
+class TestTornadoHTTPClientInstrumentation(TornadoTest, WsgiTestBase):
+ def test_http_client_success_response(self):
+ response = self.fetch("/")
+ self.assertEqual(response.code, 201)
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 3)
+ manual, server, client = self.sorted_spans(spans)
+ self.assertEqual(manual.name, "manual")
+ self.assertEqual(server.name, "GET /")
+ self.assertEqual(client.name, "GET")
+ self.assertEqual(client.status.status_code, StatusCode.UNSET)
+ self.memory_exporter.clear()
+
+ def test_http_client_failed_response(self):
+ # when an exception isn't thrown
+ response = self.fetch("/some-404")
+ self.assertEqual(response.code, 404)
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 2)
+ server, client = self.sorted_spans(spans)
+ self.assertEqual(server.name, "GET /some-404")
+ self.assertEqual(client.name, "GET")
+ self.assertEqual(client.status.status_code, StatusCode.ERROR)
+ self.memory_exporter.clear()
+
+ # when an exception is thrown
+ try:
+ response = self.fetch("/some-404", raise_error=True)
+ self.assertEqual(response.code, 404)
+ except HTTPClientError:
+ pass # expected exception - continue
+
+ spans = self.memory_exporter.get_finished_spans()
+ self.assertEqual(len(spans), 2)
+ server, client = self.sorted_spans(spans)
+ self.assertEqual(server.name, "GET /some-404")
+ self.assertEqual(client.name, "GET")
+ self.assertEqual(client.status.status_code, StatusCode.ERROR)
+ self.memory_exporter.clear()
+
+
class TestTornadoUninstrument(TornadoTest):
def test_uninstrument(self):
response = self.fetch("/")
diff --git a/instrumentation/opentelemetry-instrumentation-tortoiseorm/pyproject.toml b/instrumentation/opentelemetry-instrumentation-tortoiseorm/pyproject.toml
index 04d81e1894..82ccbc6a79 100644
--- a/instrumentation/opentelemetry-instrumentation-tortoiseorm/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-tortoiseorm/pyproject.toml
@@ -26,8 +26,8 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-tortoiseorm/src/opentelemetry/instrumentation/tortoiseorm/version.py b/instrumentation/opentelemetry-instrumentation-tortoiseorm/src/opentelemetry/instrumentation/tortoiseorm/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-tortoiseorm/src/opentelemetry/instrumentation/tortoiseorm/version.py
+++ b/instrumentation/opentelemetry-instrumentation-tortoiseorm/src/opentelemetry/instrumentation/tortoiseorm/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-tortoiseorm/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-tortoiseorm/test-requirements.txt
index cb31845d66..31b044a2f3 100644
--- a/instrumentation/opentelemetry-instrumentation-tortoiseorm/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-tortoiseorm/test-requirements.txt
@@ -1,6 +1,6 @@
aiosqlite==0.17.0
annotated-types==0.6.0
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml b/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml
index 4f0d2681f9..97b611b095 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-urllib/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py
index befc022b35..d9072ba727 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/__init__.py
@@ -85,25 +85,49 @@ def response_hook(span, request_obj, response)
Request,
)
+from opentelemetry.instrumentation._semconv import (
+ _client_duration_attrs_new,
+ _client_duration_attrs_old,
+ _filter_semconv_duration_attrs,
+ _get_schema_url,
+ _HTTPStabilityMode,
+ _OpenTelemetrySemanticConventionStability,
+ _OpenTelemetryStabilitySignalType,
+ _report_new,
+ _report_old,
+ _set_http_method,
+ _set_http_network_protocol_version,
+ _set_http_url,
+ _set_status,
+)
from opentelemetry.instrumentation.instrumentor import BaseInstrumentor
from opentelemetry.instrumentation.urllib.package import _instruments
from opentelemetry.instrumentation.urllib.version import __version__
from opentelemetry.instrumentation.utils import (
- http_status_to_status_code,
is_http_instrumentation_enabled,
suppress_http_instrumentation,
)
from opentelemetry.metrics import Histogram, get_meter
from opentelemetry.propagate import inject
+from opentelemetry.semconv._incubating.metrics.http_metrics import (
+ HTTP_CLIENT_REQUEST_BODY_SIZE,
+ HTTP_CLIENT_RESPONSE_BODY_SIZE,
+ create_http_client_request_body_size,
+ create_http_client_response_body_size,
+)
+from opentelemetry.semconv.attributes.error_attributes import ERROR_TYPE
from opentelemetry.semconv.metrics import MetricInstruments
+from opentelemetry.semconv.metrics.http_metrics import (
+ HTTP_CLIENT_REQUEST_DURATION,
+)
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.trace import Span, SpanKind, get_tracer
-from opentelemetry.trace.status import Status
from opentelemetry.util.http import (
ExcludeList,
get_excluded_urls,
parse_excluded_urls,
remove_url_credentials,
+ sanitize_method,
)
_excluded_urls_from_env = get_excluded_urls("URLLIB")
@@ -133,12 +157,18 @@ def _instrument(self, **kwargs):
``excluded_urls``: A string containing a comma-delimited
list of regexes used to exclude URLs from tracking
"""
+ # initialize semantic conventions opt-in if needed
+ _OpenTelemetrySemanticConventionStability._initialize()
+ sem_conv_opt_in_mode = _OpenTelemetrySemanticConventionStability._get_opentelemetry_stability_opt_in_mode(
+ _OpenTelemetryStabilitySignalType.HTTP,
+ )
+ schema_url = _get_schema_url(sem_conv_opt_in_mode)
tracer_provider = kwargs.get("tracer_provider")
tracer = get_tracer(
__name__,
__version__,
tracer_provider,
- schema_url="https://opentelemetry.io/schemas/1.11.0",
+ schema_url=schema_url,
)
excluded_urls = kwargs.get("excluded_urls")
meter_provider = kwargs.get("meter_provider")
@@ -146,10 +176,10 @@ def _instrument(self, **kwargs):
__name__,
__version__,
meter_provider,
- schema_url="https://opentelemetry.io/schemas/1.11.0",
+ schema_url=schema_url,
)
- histograms = _create_client_histograms(meter)
+ histograms = _create_client_histograms(meter, sem_conv_opt_in_mode)
_instrument(
tracer,
@@ -161,6 +191,7 @@ def _instrument(self, **kwargs):
if excluded_urls is None
else parse_excluded_urls(excluded_urls)
),
+ sem_conv_opt_in_mode=sem_conv_opt_in_mode,
)
def _uninstrument(self, **kwargs):
@@ -173,12 +204,14 @@ def uninstrument_opener(
_uninstrument_from(opener, restore_as_bound_func=True)
+# pylint: disable=too-many-statements
def _instrument(
tracer,
histograms: Dict[str, Histogram],
request_hook: _RequestHookT = None,
response_hook: _ResponseHookT = None,
excluded_urls: ExcludeList = None,
+ sem_conv_opt_in_mode: _HTTPStabilityMode = _HTTPStabilityMode.DEFAULT,
):
"""Enables tracing of all requests calls that go through
:code:`urllib.Client._make_request`"""
@@ -214,14 +247,22 @@ def _instrumented_open_call(
method = request.get_method().upper()
- span_name = method.strip()
+ span_name = _get_span_name(method)
url = remove_url_credentials(url)
- labels = {
- SpanAttributes.HTTP_METHOD: method,
- SpanAttributes.HTTP_URL: url,
- }
+ data = getattr(request, "data", None)
+ request_size = 0 if data is None else len(data)
+
+ labels = {}
+
+ _set_http_method(
+ labels,
+ method,
+ sanitize_method(method),
+ sem_conv_opt_in_mode,
+ )
+ _set_http_url(labels, url, sem_conv_opt_in_mode)
with tracer.start_as_current_span(
span_name, kind=SpanKind.CLIENT, attributes=labels
@@ -241,24 +282,50 @@ def _instrumented_open_call(
exception = exc
result = getattr(exc, "file", None)
finally:
- elapsed_time = round((default_timer() - start_time) * 1000)
-
+ duration_s = default_timer() - start_time
+ response_size = 0
if result is not None:
+ response_size = int(result.headers.get("Content-Length", 0))
code_ = result.getcode()
- labels[SpanAttributes.HTTP_STATUS_CODE] = str(code_)
-
- if span.is_recording() and code_ is not None:
- span.set_attribute(SpanAttributes.HTTP_STATUS_CODE, code_)
- span.set_status(Status(http_status_to_status_code(code_)))
+ # set http status code based on semconv
+ if code_:
+ _set_status_code_attribute(
+ span, code_, labels, sem_conv_opt_in_mode
+ )
ver_ = str(getattr(result, "version", ""))
if ver_:
- labels[SpanAttributes.HTTP_FLAVOR] = (
- f"{ver_[:1]}.{ver_[:-1]}"
+ _set_http_network_protocol_version(
+ labels, f"{ver_[:1]}.{ver_[:-1]}", sem_conv_opt_in_mode
)
+ if exception is not None and _report_new(sem_conv_opt_in_mode):
+ span.set_attribute(ERROR_TYPE, type(exception).__qualname__)
+ labels[ERROR_TYPE] = type(exception).__qualname__
+
+ duration_attrs_old = _filter_semconv_duration_attrs(
+ labels,
+ _client_duration_attrs_old,
+ _client_duration_attrs_new,
+ sem_conv_opt_in_mode=_HTTPStabilityMode.DEFAULT,
+ )
+ duration_attrs_new = _filter_semconv_duration_attrs(
+ labels,
+ _client_duration_attrs_old,
+ _client_duration_attrs_new,
+ sem_conv_opt_in_mode=_HTTPStabilityMode.HTTP,
+ )
+
+ duration_attrs_old[SpanAttributes.HTTP_URL] = url
+
_record_histograms(
- histograms, labels, request, result, elapsed_time
+ histograms,
+ duration_attrs_old,
+ duration_attrs_new,
+ request_size,
+ response_size,
+ duration_s,
+ sem_conv_opt_in_mode,
)
if callable(response_hook):
@@ -296,43 +363,108 @@ def _uninstrument_from(instr_root, restore_as_bound_func=False):
setattr(instr_root, instr_func_name, original)
-def _create_client_histograms(meter) -> Dict[str, Histogram]:
- histograms = {
- MetricInstruments.HTTP_CLIENT_DURATION: meter.create_histogram(
- name=MetricInstruments.HTTP_CLIENT_DURATION,
- unit="ms",
- description="Measures the duration of outbound HTTP requests.",
- ),
- MetricInstruments.HTTP_CLIENT_REQUEST_SIZE: meter.create_histogram(
- name=MetricInstruments.HTTP_CLIENT_REQUEST_SIZE,
- unit="By",
- description="Measures the size of HTTP request messages.",
- ),
- MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE: meter.create_histogram(
- name=MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE,
- unit="By",
- description="Measures the size of HTTP response messages.",
- ),
- }
+def _get_span_name(method: str) -> str:
+ method = sanitize_method(method.strip())
+ if method == "_OTHER":
+ method = "HTTP"
+ return method
+
+
+def _set_status_code_attribute(
+ span: Span,
+ status_code: int,
+ metric_attributes: dict = None,
+ sem_conv_opt_in_mode: _HTTPStabilityMode = _HTTPStabilityMode.DEFAULT,
+) -> None:
+
+ status_code_str = str(status_code)
+ try:
+ status_code = int(status_code)
+ except ValueError:
+ status_code = -1
+
+ if metric_attributes is None:
+ metric_attributes = {}
+
+ _set_status(
+ span,
+ metric_attributes,
+ status_code,
+ status_code_str,
+ server_span=False,
+ sem_conv_opt_in_mode=sem_conv_opt_in_mode,
+ )
+
+
+def _create_client_histograms(
+ meter, sem_conv_opt_in_mode=_HTTPStabilityMode.DEFAULT
+) -> Dict[str, Histogram]:
+ histograms = {}
+ if _report_old(sem_conv_opt_in_mode):
+ histograms[MetricInstruments.HTTP_CLIENT_DURATION] = (
+ meter.create_histogram(
+ name=MetricInstruments.HTTP_CLIENT_DURATION,
+ unit="ms",
+ description="Measures the duration of the outbound HTTP request",
+ )
+ )
+ histograms[MetricInstruments.HTTP_CLIENT_REQUEST_SIZE] = (
+ meter.create_histogram(
+ name=MetricInstruments.HTTP_CLIENT_REQUEST_SIZE,
+ unit="By",
+ description="Measures the size of HTTP request messages.",
+ )
+ )
+ histograms[MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE] = (
+ meter.create_histogram(
+ name=MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE,
+ unit="By",
+ description="Measures the size of HTTP response messages.",
+ )
+ )
+ if _report_new(sem_conv_opt_in_mode):
+ histograms[HTTP_CLIENT_REQUEST_DURATION] = meter.create_histogram(
+ name=HTTP_CLIENT_REQUEST_DURATION,
+ unit="s",
+ description="Duration of HTTP client requests.",
+ )
+ histograms[HTTP_CLIENT_REQUEST_BODY_SIZE] = (
+ create_http_client_request_body_size(meter)
+ )
+ histograms[HTTP_CLIENT_RESPONSE_BODY_SIZE] = (
+ create_http_client_response_body_size(meter)
+ )
return histograms
def _record_histograms(
- histograms, metric_attributes, request, response, elapsed_time
+ histograms: Dict[str, Histogram],
+ metric_attributes_old: dict,
+ metric_attributes_new: dict,
+ request_size: int,
+ response_size: int,
+ duration_s: float,
+ sem_conv_opt_in_mode: _HTTPStabilityMode = _HTTPStabilityMode.DEFAULT,
):
- histograms[MetricInstruments.HTTP_CLIENT_DURATION].record(
- elapsed_time, attributes=metric_attributes
- )
-
- data = getattr(request, "data", None)
- request_size = 0 if data is None else len(data)
- histograms[MetricInstruments.HTTP_CLIENT_REQUEST_SIZE].record(
- request_size, attributes=metric_attributes
- )
-
- if response is not None:
- response_size = int(response.headers.get("Content-Length", 0))
+ if _report_old(sem_conv_opt_in_mode):
+ duration = max(round(duration_s * 1000), 0)
+ histograms[MetricInstruments.HTTP_CLIENT_DURATION].record(
+ duration, attributes=metric_attributes_old
+ )
+ histograms[MetricInstruments.HTTP_CLIENT_REQUEST_SIZE].record(
+ request_size, attributes=metric_attributes_old
+ )
histograms[MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE].record(
- response_size, attributes=metric_attributes
+ response_size, attributes=metric_attributes_old
+ )
+ if _report_new(sem_conv_opt_in_mode):
+ histograms[HTTP_CLIENT_REQUEST_DURATION].record(
+ duration_s, attributes=metric_attributes_new
+ )
+ histograms[HTTP_CLIENT_REQUEST_BODY_SIZE].record(
+ request_size, attributes=metric_attributes_new
+ )
+ histograms[HTTP_CLIENT_RESPONSE_BODY_SIZE].record(
+ response_size, attributes=metric_attributes_new
)
diff --git a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/package.py b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/package.py
index 942f175da1..1bb8350a06 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/package.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/package.py
@@ -16,3 +16,5 @@
_instruments = tuple()
_supports_metrics = True
+
+_semconv_status = "migration"
diff --git a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py
index e0bef4b1e3..79e27849a4 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib/src/opentelemetry/instrumentation/urllib/version.py
@@ -12,6 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
_instruments = tuple()
diff --git a/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt
index 9e11fb272f..06bc8322dc 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-urllib/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
httpretty==1.1.4
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_metrics_instrumentation.py b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_metrics_instrumentation.py
index f79749dfd8..7a9bfd38f1 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_metrics_instrumentation.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_metrics_instrumentation.py
@@ -15,16 +15,28 @@
from platform import python_implementation
from timeit import default_timer
+from unittest.mock import patch
from urllib import request
from urllib.parse import urlencode
import httpretty
from pytest import mark
+from opentelemetry.instrumentation._semconv import (
+ OTEL_SEMCONV_STABILITY_OPT_IN,
+ _OpenTelemetrySemanticConventionStability,
+)
from opentelemetry.instrumentation.urllib import ( # pylint: disable=no-name-in-module,import-error
URLLibInstrumentor,
)
+from opentelemetry.semconv._incubating.metrics.http_metrics import (
+ HTTP_CLIENT_REQUEST_BODY_SIZE,
+ HTTP_CLIENT_RESPONSE_BODY_SIZE,
+)
from opentelemetry.semconv.metrics import MetricInstruments
+from opentelemetry.semconv.metrics.http_metrics import (
+ HTTP_CLIENT_REQUEST_DURATION,
+)
from opentelemetry.test.test_base import TestBase
@@ -34,6 +46,23 @@ class TestUrllibMetricsInstrumentation(TestBase):
def setUp(self):
super().setUp()
+ test_name = ""
+ if hasattr(self, "_testMethodName"):
+ test_name = self._testMethodName
+ sem_conv_mode = "default"
+ if "new_semconv" in test_name:
+ sem_conv_mode = "http"
+ elif "both_semconv" in test_name:
+ sem_conv_mode = "http/dup"
+
+ self.env_patch = patch.dict(
+ "os.environ",
+ {
+ OTEL_SEMCONV_STABILITY_OPT_IN: sem_conv_mode,
+ },
+ )
+ _OpenTelemetrySemanticConventionStability._initialized = False
+ self.env_patch.start()
URLLibInstrumentor().instrument()
httpretty.enable()
httpretty.register_uri(httpretty.GET, self.URL, body=b"Hello!")
@@ -71,18 +100,19 @@ def test_basic_metric(self):
self.assertEqual(
client_duration.name, MetricInstruments.HTTP_CLIENT_DURATION
)
+
self.assert_metric_expected(
client_duration,
self.create_histogram_data_points(
client_duration_estimated,
attributes={
- "http.status_code": str(result.code),
+ "http.status_code": int(result.code),
"http.method": "GET",
"http.url": str(result.url),
"http.flavor": "1.1",
},
),
- est_value_delta=200,
+ est_value_delta=40,
)
self.assertEqual(
@@ -94,7 +124,7 @@ def test_basic_metric(self):
self.create_histogram_data_points(
0,
attributes={
- "http.status_code": str(result.code),
+ "http.status_code": int(result.code),
"http.method": "GET",
"http.url": str(result.url),
"http.flavor": "1.1",
@@ -111,7 +141,7 @@ def test_basic_metric(self):
self.create_histogram_data_points(
result.length,
attributes={
- "http.status_code": str(result.code),
+ "http.status_code": int(result.code),
"http.method": "GET",
"http.url": str(result.url),
"http.flavor": "1.1",
@@ -119,6 +149,188 @@ def test_basic_metric(self):
),
)
+ def test_basic_metric_new_semconv(self):
+ start_time = default_timer()
+ with request.urlopen(self.URL) as result:
+ duration_s = default_timer() - start_time
+
+ metrics = self.get_sorted_metrics()
+ self.assertEqual(len(metrics), 3)
+
+ (
+ client_request_body_size,
+ client_request_duration,
+ client_response_body_size,
+ ) = metrics[:3]
+
+ self.assertEqual(
+ client_request_duration.name, HTTP_CLIENT_REQUEST_DURATION
+ )
+
+ self.assert_metric_expected(
+ client_request_duration,
+ self.create_histogram_data_points(
+ duration_s,
+ attributes={
+ "http.response.status_code": int(result.code),
+ "http.request.method": "GET",
+ "network.protocol.version": "1.1",
+ },
+ ),
+ est_value_delta=40,
+ )
+
+ self.assertEqual(
+ client_request_body_size.name,
+ HTTP_CLIENT_REQUEST_BODY_SIZE,
+ )
+ self.assert_metric_expected(
+ client_request_body_size,
+ self.create_histogram_data_points(
+ 0,
+ attributes={
+ "http.response.status_code": int(result.code),
+ "http.request.method": "GET",
+ "network.protocol.version": "1.1",
+ },
+ ),
+ )
+
+ self.assertEqual(
+ client_response_body_size.name,
+ HTTP_CLIENT_RESPONSE_BODY_SIZE,
+ )
+ self.assert_metric_expected(
+ client_response_body_size,
+ self.create_histogram_data_points(
+ result.length,
+ attributes={
+ "http.response.status_code": int(result.code),
+ "http.request.method": "GET",
+ "network.protocol.version": "1.1",
+ },
+ ),
+ )
+
+ def test_basic_metric_both_semconv(self):
+ start_time = default_timer()
+ with request.urlopen(self.URL) as result:
+ duration_s = default_timer() - start_time
+ duration = max(round(duration_s * 1000), 0)
+
+ metrics = self.get_sorted_metrics()
+ self.assertEqual(len(metrics), 6)
+
+ (
+ client_duration,
+ client_request_body_size,
+ client_request_duration,
+ client_request_size,
+ client_response_body_size,
+ client_response_size,
+ ) = metrics[:6]
+
+ self.assertEqual(
+ client_duration.name, MetricInstruments.HTTP_CLIENT_DURATION
+ )
+
+ self.assert_metric_expected(
+ client_duration,
+ self.create_histogram_data_points(
+ duration,
+ attributes={
+ "http.status_code": int(result.code),
+ "http.method": "GET",
+ "http.url": str(result.url),
+ "http.flavor": "1.1",
+ },
+ ),
+ est_value_delta=40,
+ )
+
+ self.assertEqual(
+ client_request_size.name,
+ MetricInstruments.HTTP_CLIENT_REQUEST_SIZE,
+ )
+ self.assert_metric_expected(
+ client_request_size,
+ self.create_histogram_data_points(
+ 0,
+ attributes={
+ "http.status_code": int(result.code),
+ "http.method": "GET",
+ "http.url": str(result.url),
+ "http.flavor": "1.1",
+ },
+ ),
+ )
+
+ self.assertEqual(
+ client_response_size.name,
+ MetricInstruments.HTTP_CLIENT_RESPONSE_SIZE,
+ )
+ self.assert_metric_expected(
+ client_response_size,
+ self.create_histogram_data_points(
+ result.length,
+ attributes={
+ "http.status_code": int(result.code),
+ "http.method": "GET",
+ "http.url": str(result.url),
+ "http.flavor": "1.1",
+ },
+ ),
+ )
+
+ self.assertEqual(
+ client_request_duration.name, HTTP_CLIENT_REQUEST_DURATION
+ )
+
+ self.assert_metric_expected(
+ client_request_duration,
+ self.create_histogram_data_points(
+ duration_s,
+ attributes={
+ "http.response.status_code": int(result.code),
+ "http.request.method": "GET",
+ "network.protocol.version": "1.1",
+ },
+ ),
+ est_value_delta=40,
+ )
+
+ self.assertEqual(
+ client_request_body_size.name,
+ HTTP_CLIENT_REQUEST_BODY_SIZE,
+ )
+ self.assert_metric_expected(
+ client_request_body_size,
+ self.create_histogram_data_points(
+ 0,
+ attributes={
+ "http.response.status_code": int(result.code),
+ "http.request.method": "GET",
+ "network.protocol.version": "1.1",
+ },
+ ),
+ )
+
+ self.assertEqual(
+ client_response_body_size.name,
+ HTTP_CLIENT_RESPONSE_BODY_SIZE,
+ )
+ self.assert_metric_expected(
+ client_response_body_size,
+ self.create_histogram_data_points(
+ result.length,
+ attributes={
+ "http.response.status_code": int(result.code),
+ "http.request.method": "GET",
+ "network.protocol.version": "1.1",
+ },
+ ),
+ )
+
def test_basic_metric_request_not_empty(self):
data = {"header1": "value1", "header2": "value2"}
data_encoded = urlencode(data).encode()
@@ -144,13 +356,13 @@ def test_basic_metric_request_not_empty(self):
self.create_histogram_data_points(
client_duration_estimated,
attributes={
- "http.status_code": str(result.code),
+ "http.status_code": int(result.code),
"http.method": "POST",
"http.url": str(result.url),
"http.flavor": "1.1",
},
),
- est_value_delta=200,
+ est_value_delta=40,
)
self.assertEqual(
@@ -162,7 +374,7 @@ def test_basic_metric_request_not_empty(self):
self.create_histogram_data_points(
len(data_encoded),
attributes={
- "http.status_code": str(result.code),
+ "http.status_code": int(result.code),
"http.method": "POST",
"http.url": str(result.url),
"http.flavor": "1.1",
@@ -179,7 +391,7 @@ def test_basic_metric_request_not_empty(self):
self.create_histogram_data_points(
result.length,
attributes={
- "http.status_code": str(result.code),
+ "http.status_code": int(result.code),
"http.method": "POST",
"http.url": str(result.url),
"http.flavor": "1.1",
diff --git a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py
index f73f0d1b97..8ac0284939 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib/tests/test_urllib_integration.py
@@ -25,6 +25,10 @@
import opentelemetry.instrumentation.urllib # pylint: disable=no-name-in-module,import-error
from opentelemetry import trace
+from opentelemetry.instrumentation._semconv import (
+ OTEL_SEMCONV_STABILITY_OPT_IN,
+ _OpenTelemetrySemanticConventionStability,
+)
from opentelemetry.instrumentation.urllib import ( # pylint: disable=no-name-in-module,import-error
URLLibInstrumentor,
)
@@ -34,6 +38,12 @@
)
from opentelemetry.propagate import get_global_textmap, set_global_textmap
from opentelemetry.sdk import resources
+from opentelemetry.semconv.attributes.error_attributes import ERROR_TYPE
+from opentelemetry.semconv.attributes.http_attributes import (
+ HTTP_REQUEST_METHOD,
+ HTTP_RESPONSE_STATUS_CODE,
+)
+from opentelemetry.semconv.attributes.url_attributes import URL_FULL
from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.mock_textmap import MockTextMapPropagator
from opentelemetry.test.test_base import TestBase
@@ -43,7 +53,7 @@
# pylint: disable=too-many-public-methods
-class RequestsIntegrationTestBase(abc.ABC):
+class URLLibIntegrationTestBase(abc.ABC):
# pylint: disable=no-member
URL = "http://mock/status/200"
@@ -54,12 +64,23 @@ class RequestsIntegrationTestBase(abc.ABC):
def setUp(self):
super().setUp()
+ test_name = ""
+ if hasattr(self, "_testMethodName"):
+ test_name = self._testMethodName
+ sem_conv_mode = "default"
+ if "new_semconv" in test_name:
+ sem_conv_mode = "http"
+ elif "both_semconv" in test_name:
+ sem_conv_mode = "http/dup"
+
self.env_patch = mock.patch.dict(
"os.environ",
{
- "OTEL_PYTHON_URLLIB_EXCLUDED_URLS": "http://localhost/env_excluded_arg/123,env_excluded_noarg"
+ "OTEL_PYTHON_URLLIB_EXCLUDED_URLS": "http://localhost/env_excluded_arg/123,env_excluded_noarg",
+ OTEL_SEMCONV_STABILITY_OPT_IN: sem_conv_mode,
},
)
+ _OpenTelemetrySemanticConventionStability._initialized = False
self.env_patch.start()
self.exclude_patch = mock.patch(
@@ -141,6 +162,57 @@ def test_basic(self):
span, opentelemetry.instrumentation.urllib
)
+ def test_basic_new_semconv(self):
+ result = self.perform_request(self.URL)
+
+ self.assertEqual(result.read(), b"Hello!")
+ span = self.assert_span()
+
+ self.assertIs(span.kind, trace.SpanKind.CLIENT)
+ self.assertEqual(span.name, "GET")
+
+ self.assertEqual(
+ span.attributes,
+ {
+ HTTP_REQUEST_METHOD: "GET",
+ URL_FULL: self.URL,
+ HTTP_RESPONSE_STATUS_CODE: 200,
+ },
+ )
+
+ self.assertIs(span.status.status_code, trace.StatusCode.UNSET)
+
+ self.assertEqualSpanInstrumentationInfo(
+ span, opentelemetry.instrumentation.urllib
+ )
+
+ def test_basic_both_semconv(self):
+ result = self.perform_request(self.URL)
+
+ self.assertEqual(result.read(), b"Hello!")
+ span = self.assert_span()
+
+ self.assertIs(span.kind, trace.SpanKind.CLIENT)
+ self.assertEqual(span.name, "GET")
+
+ self.assertEqual(
+ span.attributes,
+ {
+ SpanAttributes.HTTP_METHOD: "GET",
+ SpanAttributes.HTTP_URL: self.URL,
+ SpanAttributes.HTTP_STATUS_CODE: 200,
+ HTTP_REQUEST_METHOD: "GET",
+ URL_FULL: self.URL,
+ HTTP_RESPONSE_STATUS_CODE: 200,
+ },
+ )
+
+ self.assertIs(span.status.status_code, trace.StatusCode.UNSET)
+
+ self.assertEqualSpanInstrumentationInfo(
+ span, opentelemetry.instrumentation.urllib
+ )
+
def test_excluded_urls_explicit(self):
url_201 = "http://mock/status/201"
httpretty.register_uri(
@@ -197,6 +269,57 @@ def test_not_foundbasic(self):
trace.StatusCode.ERROR,
)
+ def test_not_foundbasic_new_semconv(self):
+ url_404 = "http://mock/status/404/"
+ httpretty.register_uri(
+ httpretty.GET,
+ url_404,
+ status=404,
+ )
+ exception = None
+ try:
+ self.perform_request(url_404)
+ except Exception as err: # pylint: disable=broad-except
+ exception = err
+ code = exception.code
+ self.assertEqual(code, 404)
+
+ span = self.assert_span()
+
+ self.assertEqual(span.attributes.get(HTTP_RESPONSE_STATUS_CODE), 404)
+
+ self.assertIs(
+ span.status.status_code,
+ trace.StatusCode.ERROR,
+ )
+
+ def test_not_foundbasic_both_semconv(self):
+ url_404 = "http://mock/status/404/"
+ httpretty.register_uri(
+ httpretty.GET,
+ url_404,
+ status=404,
+ )
+ exception = None
+ try:
+ self.perform_request(url_404)
+ except Exception as err: # pylint: disable=broad-except
+ exception = err
+ code = exception.code
+ self.assertEqual(code, 404)
+
+ span = self.assert_span()
+
+ self.assertEqual(
+ span.attributes.get(SpanAttributes.HTTP_STATUS_CODE), 404
+ )
+ self.assertEqual(span.attributes.get(HTTP_RESPONSE_STATUS_CODE), 404)
+
+ self.assertIs(
+ span.status.status_code,
+ trace.StatusCode.ERROR,
+ )
+
@staticmethod
def mock_get_code(*args, **kwargs):
return None
@@ -339,6 +462,41 @@ def test_requests_exception_with_response(self, *_, **__):
)
self.assertEqual(span.status.status_code, StatusCode.ERROR)
+ def test_requests_exception_with_response_new_semconv(self, *_, **__):
+ with self.assertRaises(HTTPError):
+ self.perform_request("http://mock/status/500")
+
+ span = self.assert_span()
+ self.assertEqual(
+ dict(span.attributes),
+ {
+ HTTP_REQUEST_METHOD: "GET",
+ URL_FULL: "http://mock/status/500",
+ HTTP_RESPONSE_STATUS_CODE: 500,
+ ERROR_TYPE: "HTTPError",
+ },
+ )
+ self.assertEqual(span.status.status_code, StatusCode.ERROR)
+
+ def test_requests_exception_with_response_both_semconv(self, *_, **__):
+ with self.assertRaises(HTTPError):
+ self.perform_request("http://mock/status/500")
+
+ span = self.assert_span()
+ self.assertEqual(
+ dict(span.attributes),
+ {
+ SpanAttributes.HTTP_METHOD: "GET",
+ SpanAttributes.HTTP_URL: "http://mock/status/500",
+ SpanAttributes.HTTP_STATUS_CODE: 500,
+ HTTP_REQUEST_METHOD: "GET",
+ URL_FULL: "http://mock/status/500",
+ HTTP_RESPONSE_STATUS_CODE: 500,
+ ERROR_TYPE: "HTTPError",
+ },
+ )
+ self.assertEqual(span.status.status_code, StatusCode.ERROR)
+
def test_requests_basic_exception(self, *_, **__):
with self.assertRaises(Exception):
self.perform_request(self.URL_EXCEPTION)
@@ -393,7 +551,7 @@ def test_no_op_tracer_provider(self):
self.assert_span(num_spans=0)
-class TestRequestsIntegration(RequestsIntegrationTestBase, TestBase):
+class TestURLLibIntegration(URLLibIntegrationTestBase, TestBase):
@staticmethod
def perform_request(url: str, opener: OpenerDirector = None):
if not opener:
diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml b/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml
index 03c9f26fbc..3c1eaaa6d0 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-urllib3/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py
index 4bcd0816fd..1c83f3f447 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py
@@ -103,7 +103,7 @@ def response_hook(
_OpenTelemetryStabilitySignalType,
_report_new,
_report_old,
- _set_http_host,
+ _set_http_host_client,
_set_http_method,
_set_http_net_peer_name_client,
_set_http_network_protocol_version,
@@ -491,7 +491,9 @@ def _set_metric_attributes(
sem_conv_opt_in_mode: _HTTPStabilityMode = _HTTPStabilityMode.DEFAULT,
) -> None:
- _set_http_host(metric_attributes, instance.host, sem_conv_opt_in_mode)
+ _set_http_host_client(
+ metric_attributes, instance.host, sem_conv_opt_in_mode
+ )
_set_http_scheme(metric_attributes, instance.scheme, sem_conv_opt_in_mode)
_set_http_method(
metric_attributes,
diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/version.py b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/version.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt
index 1d6ebc18af..e7392b0c31 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt
+++ b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-0.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
httpretty==1.1.4
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt
index 06df34d16b..21cb3acbe6 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt
+++ b/instrumentation/opentelemetry-instrumentation-urllib3/test-requirements-1.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
httpretty==1.1.4
importlib-metadata==6.11.0
diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_integration.py b/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_integration.py
index 0e6037ed11..69bed0eaee 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_integration.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_integration.py
@@ -36,13 +36,6 @@
suppress_instrumentation,
)
from opentelemetry.propagate import get_global_textmap, set_global_textmap
-from opentelemetry.semconv.attributes.http_attributes import (
- HTTP_REQUEST_METHOD,
- HTTP_REQUEST_METHOD_ORIGINAL,
- HTTP_RESPONSE_STATUS_CODE,
-)
-from opentelemetry.semconv.attributes.url_attributes import URL_FULL
-from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.mock_textmap import MockTextMapPropagator
from opentelemetry.test.test_base import TestBase
from opentelemetry.trace import Span
@@ -123,24 +116,29 @@ def assert_success_span(
self.assertEqual(
span.status.status_code, trace.status.StatusCode.UNSET
)
- attr_old = {
- SpanAttributes.HTTP_METHOD: "GET",
- SpanAttributes.HTTP_URL: url,
- SpanAttributes.HTTP_STATUS_CODE: 200,
+ expected_attr_old = {
+ "http.method": "GET",
+ "http.url": url,
+ "http.status_code": 200,
}
- attr_new = {
- HTTP_REQUEST_METHOD: "GET",
- URL_FULL: url,
- HTTP_RESPONSE_STATUS_CODE: 200,
+ expected_attr_new = {
+ "http.request.method": "GET",
+ "url.full": url,
+ "http.response.status_code": 200,
}
attributes = {
- _HTTPStabilityMode.DEFAULT: attr_old,
- _HTTPStabilityMode.HTTP: attr_new,
- _HTTPStabilityMode.HTTP_DUP: {**attr_new, **attr_old},
+ _HTTPStabilityMode.DEFAULT: expected_attr_old,
+ _HTTPStabilityMode.HTTP: expected_attr_new,
+ _HTTPStabilityMode.HTTP_DUP: {
+ **expected_attr_new,
+ **expected_attr_old,
+ },
}
- self.assertEqual(span.attributes, attributes.get(sem_conv_opt_in_mode))
+ self.assertDictEqual(
+ dict(span.attributes), attributes.get(sem_conv_opt_in_mode)
+ )
def assert_exception_span(
self,
@@ -149,24 +147,29 @@ def assert_exception_span(
):
span = self.assert_span()
- attr_old = {
- SpanAttributes.HTTP_METHOD: "GET",
- SpanAttributes.HTTP_URL: url,
+ expected_attr_old = {
+ "http.method": "GET",
+ "http.url": url,
}
- attr_new = {
- HTTP_REQUEST_METHOD: "GET",
- URL_FULL: url,
+ expected_attr_new = {
+ "http.request.method": "GET",
+ "url.full": url,
# TODO: Add `error.type` attribute when supported
}
attributes = {
- _HTTPStabilityMode.DEFAULT: attr_old,
- _HTTPStabilityMode.HTTP: attr_new,
- _HTTPStabilityMode.HTTP_DUP: {**attr_new, **attr_old},
+ _HTTPStabilityMode.DEFAULT: expected_attr_old,
+ _HTTPStabilityMode.HTTP: expected_attr_new,
+ _HTTPStabilityMode.HTTP_DUP: {
+ **expected_attr_new,
+ **expected_attr_old,
+ },
}
- self.assertEqual(span.attributes, attributes.get(sem_conv_opt_in_mode))
+ self.assertDictEqual(
+ dict(span.attributes), attributes.get(sem_conv_opt_in_mode)
+ )
self.assertEqual(
trace.status.StatusCode.ERROR, span.status.status_code
)
@@ -265,9 +268,7 @@ def test_basic_not_found(self):
self.assertEqual(404, response.status)
span = self.assert_span()
- self.assertEqual(
- 404, span.attributes.get(SpanAttributes.HTTP_STATUS_CODE)
- )
+ self.assertEqual(404, span.attributes.get("http.status_code"))
self.assertIs(trace.status.StatusCode.ERROR, span.status.status_code)
def test_basic_not_found_new_semconv(self):
@@ -278,7 +279,7 @@ def test_basic_not_found_new_semconv(self):
self.assertEqual(404, response.status)
span = self.assert_span()
- self.assertEqual(404, span.attributes.get(HTTP_RESPONSE_STATUS_CODE))
+ self.assertEqual(404, span.attributes.get("http.response.status_code"))
self.assertIs(trace.status.StatusCode.ERROR, span.status.status_code)
def test_basic_not_found_both_semconv(self):
@@ -289,10 +290,8 @@ def test_basic_not_found_both_semconv(self):
self.assertEqual(404, response.status)
span = self.assert_span()
- self.assertEqual(404, span.attributes.get(HTTP_RESPONSE_STATUS_CODE))
- self.assertEqual(
- 404, span.attributes.get(SpanAttributes.HTTP_STATUS_CODE)
- )
+ self.assertEqual(404, span.attributes.get("http.response.status_code"))
+ self.assertEqual(404, span.attributes.get("http.status_code"))
self.assertIs(trace.status.StatusCode.ERROR, span.status.status_code)
@mock.patch("httpretty.http.HttpBaseClass.METHODS", ("NONSTANDARD",))
@@ -303,12 +302,8 @@ def test_nonstandard_http_method(self):
self.perform_request(self.HTTP_URL, method="NONSTANDARD")
span = self.assert_span()
self.assertEqual("HTTP", span.name)
- self.assertEqual(
- span.attributes.get(SpanAttributes.HTTP_METHOD), "_OTHER"
- )
- self.assertEqual(
- span.attributes.get(SpanAttributes.HTTP_STATUS_CODE), 405
- )
+ self.assertEqual(span.attributes.get("http.method"), "_OTHER")
+ self.assertEqual(span.attributes.get("http.status_code"), 405)
@mock.patch("httpretty.http.HttpBaseClass.METHODS", ("NONSTANDARD",))
def test_nonstandard_http_method_new_semconv(self):
@@ -318,11 +313,11 @@ def test_nonstandard_http_method_new_semconv(self):
self.perform_request(self.HTTP_URL, method="NONSTANDARD")
span = self.assert_span()
self.assertEqual("HTTP", span.name)
- self.assertEqual(span.attributes.get(HTTP_REQUEST_METHOD), "_OTHER")
+ self.assertEqual(span.attributes.get("http.request.method"), "_OTHER")
self.assertEqual(
- span.attributes.get(HTTP_REQUEST_METHOD_ORIGINAL), "NONSTANDARD"
+ span.attributes.get("http.request.method_original"), "NONSTANDARD"
)
- self.assertEqual(span.attributes.get(HTTP_RESPONSE_STATUS_CODE), 405)
+ self.assertEqual(span.attributes.get("http.response.status_code"), 405)
@mock.patch("httpretty.http.HttpBaseClass.METHODS", ("NONSTANDARD",))
def test_nonstandard_http_method_both_semconv(self):
@@ -332,17 +327,13 @@ def test_nonstandard_http_method_both_semconv(self):
self.perform_request(self.HTTP_URL, method="NONSTANDARD")
span = self.assert_span()
self.assertEqual("HTTP", span.name)
+ self.assertEqual(span.attributes.get("http.method"), "_OTHER")
+ self.assertEqual(span.attributes.get("http.status_code"), 405)
+ self.assertEqual(span.attributes.get("http.request.method"), "_OTHER")
self.assertEqual(
- span.attributes.get(SpanAttributes.HTTP_METHOD), "_OTHER"
- )
- self.assertEqual(
- span.attributes.get(SpanAttributes.HTTP_STATUS_CODE), 405
- )
- self.assertEqual(span.attributes.get(HTTP_REQUEST_METHOD), "_OTHER")
- self.assertEqual(
- span.attributes.get(HTTP_REQUEST_METHOD_ORIGINAL), "NONSTANDARD"
+ span.attributes.get("http.request.method_original"), "NONSTANDARD"
)
- self.assertEqual(span.attributes.get(HTTP_RESPONSE_STATUS_CODE), 405)
+ self.assertEqual(span.attributes.get("http.response.status_code"), 405)
def test_basic_http_non_default_port(self):
url = "http://mock:666/status/200"
diff --git a/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_metrics.py b/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_metrics.py
index c6e9011351..959f793398 100644
--- a/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_metrics.py
+++ b/instrumentation/opentelemetry-instrumentation-urllib3/tests/test_urllib3_metrics.py
@@ -26,18 +26,6 @@
_OpenTelemetrySemanticConventionStability,
)
from opentelemetry.instrumentation.urllib3 import URLLib3Instrumentor
-from opentelemetry.semconv.attributes.http_attributes import (
- HTTP_REQUEST_METHOD,
- HTTP_RESPONSE_STATUS_CODE,
-)
-from opentelemetry.semconv.attributes.network_attributes import (
- NETWORK_PROTOCOL_VERSION,
-)
-from opentelemetry.semconv.attributes.server_attributes import (
- SERVER_ADDRESS,
- SERVER_PORT,
-)
-from opentelemetry.semconv.trace import SpanAttributes
from opentelemetry.test.httptest import HttpTestBase
from opentelemetry.test.test_base import TestBase
@@ -85,6 +73,7 @@ def test_basic_metrics(self):
response = self.pool.request("GET", self.HTTP_URL)
duration_ms = max(round((default_timer() - start_time) * 1000), 0)
metrics = self.get_sorted_metrics()
+ self.assertEqual(len(metrics), 3)
(
client_duration,
@@ -93,13 +82,13 @@ def test_basic_metrics(self):
) = metrics
attrs_old = {
- SpanAttributes.HTTP_STATUS_CODE: 200,
- SpanAttributes.HTTP_HOST: "mock",
- SpanAttributes.NET_PEER_PORT: 80,
- SpanAttributes.NET_PEER_NAME: "mock",
- SpanAttributes.HTTP_METHOD: "GET",
- SpanAttributes.HTTP_FLAVOR: "1.1",
- SpanAttributes.HTTP_SCHEME: "http",
+ "http.status_code": 200,
+ "http.host": "mock",
+ "net.peer.port": 80,
+ "net.peer.name": "mock",
+ "http.method": "GET",
+ "http.flavor": "1.1",
+ "http.scheme": "http",
}
self.assertEqual(client_duration.name, "http.client.duration")
@@ -154,6 +143,7 @@ def test_basic_metrics_new_semconv(self):
duration_s = max(default_timer() - start_time, 0)
metrics = self.get_sorted_metrics()
+ self.assertEqual(len(metrics), 3)
(
client_request_size,
client_duration,
@@ -161,11 +151,11 @@ def test_basic_metrics_new_semconv(self):
) = metrics
attrs_new = {
- NETWORK_PROTOCOL_VERSION: "1.1",
- SERVER_ADDRESS: "mock",
- SERVER_PORT: 80,
- HTTP_REQUEST_METHOD: "GET",
- HTTP_RESPONSE_STATUS_CODE: 200,
+ "network.protocol.version": "1.1",
+ "server.address": "mock",
+ "server.port": 80,
+ "http.request.method": "GET",
+ "http.response.status_code": 200,
# TODO: add URL_SCHEME to tests when supported in the implementation
}
@@ -217,6 +207,139 @@ def test_basic_metrics_new_semconv(self):
],
)
+ def test_basic_metrics_both_semconv(self):
+ start_time = default_timer()
+ response = self.pool.request("GET", self.HTTP_URL)
+ duration_s = max(default_timer() - start_time, 0)
+ duration = max(round(duration_s * 1000), 0)
+ expected_size = len(response.data)
+
+ metrics = self.get_sorted_metrics()
+ self.assertEqual(len(metrics), 6)
+
+ (
+ client_duration,
+ client_request_body_size,
+ client_request_duration,
+ client_request_size,
+ client_response_body_size,
+ client_response_size,
+ ) = metrics[:6]
+
+ attrs_new = {
+ "network.protocol.version": "1.1",
+ "server.address": "mock",
+ "server.port": 80,
+ "http.request.method": "GET",
+ "http.response.status_code": 200,
+ # TODO: add URL_SCHEME to tests when supported in the implementation
+ }
+
+ attrs_old = {
+ "http.status_code": 200,
+ "http.host": "mock",
+ "net.peer.port": 80,
+ "net.peer.name": "mock",
+ "http.method": "GET",
+ "http.flavor": "1.1",
+ "http.scheme": "http",
+ }
+
+ # assert new semconv metrics
+ self.assertEqual(
+ client_request_duration.name, "http.client.request.duration"
+ )
+ self.assert_metric_expected(
+ client_request_duration,
+ [
+ self.create_histogram_data_point(
+ count=1,
+ sum_data_point=duration_s,
+ max_data_point=duration_s,
+ min_data_point=duration_s,
+ attributes=attrs_new,
+ )
+ ],
+ est_value_delta=40 / 1000,
+ )
+
+ self.assertEqual(
+ client_request_body_size.name, "http.client.request.body.size"
+ )
+ self.assert_metric_expected(
+ client_request_body_size,
+ [
+ self.create_histogram_data_point(
+ count=1,
+ sum_data_point=0,
+ max_data_point=0,
+ min_data_point=0,
+ attributes=attrs_new,
+ )
+ ],
+ )
+
+ self.assertEqual(
+ client_response_body_size.name, "http.client.response.body.size"
+ )
+ self.assert_metric_expected(
+ client_response_body_size,
+ [
+ self.create_histogram_data_point(
+ count=1,
+ sum_data_point=expected_size,
+ max_data_point=expected_size,
+ min_data_point=expected_size,
+ attributes=attrs_new,
+ )
+ ],
+ )
+ # assert old semconv metrics
+ self.assertEqual(client_duration.name, "http.client.duration")
+ self.assert_metric_expected(
+ client_duration,
+ [
+ self.create_histogram_data_point(
+ count=1,
+ sum_data_point=duration,
+ max_data_point=duration,
+ min_data_point=duration,
+ attributes=attrs_old,
+ )
+ ],
+ est_value_delta=40,
+ )
+
+ self.assertEqual(client_request_size.name, "http.client.request.size")
+ self.assert_metric_expected(
+ client_request_size,
+ [
+ self.create_histogram_data_point(
+ count=1,
+ sum_data_point=0,
+ max_data_point=0,
+ min_data_point=0,
+ attributes=attrs_old,
+ )
+ ],
+ )
+
+ self.assertEqual(
+ client_response_size.name, "http.client.response.size"
+ )
+ self.assert_metric_expected(
+ client_response_size,
+ [
+ self.create_histogram_data_point(
+ count=1,
+ sum_data_point=expected_size,
+ max_data_point=expected_size,
+ min_data_point=expected_size,
+ attributes=attrs_old,
+ )
+ ],
+ )
+
@mock.patch("httpretty.http.HttpBaseClass.METHODS", ("NONSTANDARD",))
def test_basic_metrics_nonstandard_http_method(self):
httpretty.register_uri(
@@ -236,13 +359,13 @@ def test_basic_metrics_nonstandard_http_method(self):
) = metrics
attrs_old = {
- SpanAttributes.HTTP_STATUS_CODE: 405,
- SpanAttributes.HTTP_HOST: "mock",
- SpanAttributes.NET_PEER_PORT: 80,
- SpanAttributes.NET_PEER_NAME: "mock",
- SpanAttributes.HTTP_METHOD: "_OTHER",
- SpanAttributes.HTTP_FLAVOR: "1.1",
- SpanAttributes.HTTP_SCHEME: "http",
+ "http.status_code": 405,
+ "http.host": "mock",
+ "net.peer.port": 80,
+ "net.peer.name": "mock",
+ "http.method": "_OTHER",
+ "http.flavor": "1.1",
+ "http.scheme": "http",
}
self.assertEqual(client_duration.name, "http.client.duration")
@@ -309,11 +432,11 @@ def test_basic_metrics_nonstandard_http_method_new_semconv(self):
) = metrics
attrs_new = {
- NETWORK_PROTOCOL_VERSION: "1.1",
- SERVER_ADDRESS: "mock",
- SERVER_PORT: 80,
- HTTP_REQUEST_METHOD: "_OTHER",
- HTTP_RESPONSE_STATUS_CODE: 405,
+ "network.protocol.version": "1.1",
+ "server.address": "mock",
+ "server.port": 80,
+ "http.request.method": "_OTHER",
+ "http.response.status_code": 405,
"error.type": "405",
# TODO: add URL_SCHEME to tests when supported in the implementation
}
diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml b/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml
index b38f1829aa..a5e81ee8e5 100644
--- a/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/pyproject.toml
@@ -26,9 +26,9 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
- "opentelemetry-semantic-conventions == 0.48b0.dev",
- "opentelemetry-util-http == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
+ "opentelemetry-semantic-conventions == 0.49b0.dev",
+ "opentelemetry-util-http == 0.49b0.dev",
]
[project.optional-dependencies]
diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
index 355b1d7458..c0384d594b 100644
--- a/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/__init__.py
@@ -231,7 +231,7 @@ def response_hook(span: Span, environ: WSGIEnvironment, status: str, response_he
_set_http_net_host,
_set_http_net_host_port,
_set_http_net_peer_name_server,
- _set_http_peer_ip,
+ _set_http_peer_ip_server,
_set_http_peer_port_server,
_set_http_scheme,
_set_http_target,
@@ -360,7 +360,7 @@ def collect_request_attributes(
remote_addr = environ.get("REMOTE_ADDR")
if remote_addr:
- _set_http_peer_ip(result, remote_addr, sem_conv_opt_in_mode)
+ _set_http_peer_ip_server(result, remote_addr, sem_conv_opt_in_mode)
peer_port = environ.get("REMOTE_PORT")
if peer_port:
@@ -571,14 +571,14 @@ def __init__(
self.duration_histogram_old = self.meter.create_histogram(
name=MetricInstruments.HTTP_SERVER_DURATION,
unit="ms",
- description="measures the duration of the inbound HTTP request",
+ description="Measures the duration of inbound HTTP requests.",
)
self.duration_histogram_new = None
if _report_new(sem_conv_opt_in_mode):
self.duration_histogram_new = self.meter.create_histogram(
name=HTTP_SERVER_REQUEST_DURATION,
unit="s",
- description="measures the duration of the inbound HTTP request",
+ description="Duration of HTTP server requests.",
)
# We don't need a separate active request counter for old/new semantic conventions
# because the new attributes are a subset of the old attributes
diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/version.py b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/version.py
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/src/opentelemetry/instrumentation/wsgi/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt b/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt
index 0f7c7ced73..d63bd5a637 100644
--- a/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt
+++ b/instrumentation/opentelemetry-instrumentation-wsgi/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/opentelemetry-contrib-instrumentations/pyproject.toml b/opentelemetry-contrib-instrumentations/pyproject.toml
index 6c7716bad2..9c40f9c2a3 100644
--- a/opentelemetry-contrib-instrumentations/pyproject.toml
+++ b/opentelemetry-contrib-instrumentations/pyproject.toml
@@ -29,53 +29,53 @@ classifiers = [
"Programming Language :: Python :: 3.12",
]
dependencies = [
- "opentelemetry-instrumentation-aio-pika==0.48b0.dev",
- "opentelemetry-instrumentation-aiohttp-client==0.48b0.dev",
- "opentelemetry-instrumentation-aiohttp-server==0.48b0.dev",
- "opentelemetry-instrumentation-aiopg==0.48b0.dev",
- "opentelemetry-instrumentation-asgi==0.48b0.dev",
- "opentelemetry-instrumentation-asyncio==0.48b0.dev",
- "opentelemetry-instrumentation-asyncpg==0.48b0.dev",
- "opentelemetry-instrumentation-aws-lambda==0.48b0.dev",
- "opentelemetry-instrumentation-boto==0.48b0.dev",
- "opentelemetry-instrumentation-boto3sqs==0.48b0.dev",
- "opentelemetry-instrumentation-botocore==0.48b0.dev",
- "opentelemetry-instrumentation-cassandra==0.48b0.dev",
- "opentelemetry-instrumentation-celery==0.48b0.dev",
- "opentelemetry-instrumentation-confluent-kafka==0.48b0.dev",
- "opentelemetry-instrumentation-dbapi==0.48b0.dev",
- "opentelemetry-instrumentation-django==0.48b0.dev",
- "opentelemetry-instrumentation-elasticsearch==0.48b0.dev",
- "opentelemetry-instrumentation-falcon==0.48b0.dev",
- "opentelemetry-instrumentation-fastapi==0.48b0.dev",
- "opentelemetry-instrumentation-flask==0.48b0.dev",
- "opentelemetry-instrumentation-grpc==0.48b0.dev",
- "opentelemetry-instrumentation-httpx==0.48b0.dev",
- "opentelemetry-instrumentation-jinja2==0.48b0.dev",
- "opentelemetry-instrumentation-kafka-python==0.48b0.dev",
- "opentelemetry-instrumentation-logging==0.48b0.dev",
- "opentelemetry-instrumentation-mysql==0.48b0.dev",
- "opentelemetry-instrumentation-mysqlclient==0.48b0.dev",
- "opentelemetry-instrumentation-pika==0.48b0.dev",
- "opentelemetry-instrumentation-psycopg==0.48b0.dev",
- "opentelemetry-instrumentation-psycopg2==0.48b0.dev",
- "opentelemetry-instrumentation-pymemcache==0.48b0.dev",
- "opentelemetry-instrumentation-pymongo==0.48b0.dev",
- "opentelemetry-instrumentation-pymysql==0.48b0.dev",
- "opentelemetry-instrumentation-pyramid==0.48b0.dev",
- "opentelemetry-instrumentation-redis==0.48b0.dev",
- "opentelemetry-instrumentation-remoulade==0.48b0.dev",
- "opentelemetry-instrumentation-requests==0.48b0.dev",
- "opentelemetry-instrumentation-sqlalchemy==0.48b0.dev",
- "opentelemetry-instrumentation-sqlite3==0.48b0.dev",
- "opentelemetry-instrumentation-starlette==0.48b0.dev",
- "opentelemetry-instrumentation-system-metrics==0.48b0.dev",
- "opentelemetry-instrumentation-threading==0.48b0.dev",
- "opentelemetry-instrumentation-tornado==0.48b0.dev",
- "opentelemetry-instrumentation-tortoiseorm==0.48b0.dev",
- "opentelemetry-instrumentation-urllib==0.48b0.dev",
- "opentelemetry-instrumentation-urllib3==0.48b0.dev",
- "opentelemetry-instrumentation-wsgi==0.48b0.dev",
+ "opentelemetry-instrumentation-aio-pika==0.49b0.dev",
+ "opentelemetry-instrumentation-aiohttp-client==0.49b0.dev",
+ "opentelemetry-instrumentation-aiohttp-server==0.49b0.dev",
+ "opentelemetry-instrumentation-aiopg==0.49b0.dev",
+ "opentelemetry-instrumentation-asgi==0.49b0.dev",
+ "opentelemetry-instrumentation-asyncio==0.49b0.dev",
+ "opentelemetry-instrumentation-asyncpg==0.49b0.dev",
+ "opentelemetry-instrumentation-aws-lambda==0.49b0.dev",
+ "opentelemetry-instrumentation-boto==0.49b0.dev",
+ "opentelemetry-instrumentation-boto3sqs==0.49b0.dev",
+ "opentelemetry-instrumentation-botocore==0.49b0.dev",
+ "opentelemetry-instrumentation-cassandra==0.49b0.dev",
+ "opentelemetry-instrumentation-celery==0.49b0.dev",
+ "opentelemetry-instrumentation-confluent-kafka==0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi==0.49b0.dev",
+ "opentelemetry-instrumentation-django==0.49b0.dev",
+ "opentelemetry-instrumentation-elasticsearch==0.49b0.dev",
+ "opentelemetry-instrumentation-falcon==0.49b0.dev",
+ "opentelemetry-instrumentation-fastapi==0.49b0.dev",
+ "opentelemetry-instrumentation-flask==0.49b0.dev",
+ "opentelemetry-instrumentation-grpc==0.49b0.dev",
+ "opentelemetry-instrumentation-httpx==0.49b0.dev",
+ "opentelemetry-instrumentation-jinja2==0.49b0.dev",
+ "opentelemetry-instrumentation-kafka-python==0.49b0.dev",
+ "opentelemetry-instrumentation-logging==0.49b0.dev",
+ "opentelemetry-instrumentation-mysql==0.49b0.dev",
+ "opentelemetry-instrumentation-mysqlclient==0.49b0.dev",
+ "opentelemetry-instrumentation-pika==0.49b0.dev",
+ "opentelemetry-instrumentation-psycopg==0.49b0.dev",
+ "opentelemetry-instrumentation-psycopg2==0.49b0.dev",
+ "opentelemetry-instrumentation-pymemcache==0.49b0.dev",
+ "opentelemetry-instrumentation-pymongo==0.49b0.dev",
+ "opentelemetry-instrumentation-pymysql==0.49b0.dev",
+ "opentelemetry-instrumentation-pyramid==0.49b0.dev",
+ "opentelemetry-instrumentation-redis==0.49b0.dev",
+ "opentelemetry-instrumentation-remoulade==0.49b0.dev",
+ "opentelemetry-instrumentation-requests==0.49b0.dev",
+ "opentelemetry-instrumentation-sqlalchemy==0.49b0.dev",
+ "opentelemetry-instrumentation-sqlite3==0.49b0.dev",
+ "opentelemetry-instrumentation-starlette==0.49b0.dev",
+ "opentelemetry-instrumentation-system-metrics==0.49b0.dev",
+ "opentelemetry-instrumentation-threading==0.49b0.dev",
+ "opentelemetry-instrumentation-tornado==0.49b0.dev",
+ "opentelemetry-instrumentation-tortoiseorm==0.49b0.dev",
+ "opentelemetry-instrumentation-urllib==0.49b0.dev",
+ "opentelemetry-instrumentation-urllib3==0.49b0.dev",
+ "opentelemetry-instrumentation-wsgi==0.49b0.dev",
]
[project.urls]
diff --git a/opentelemetry-contrib-instrumentations/src/opentelemetry/contrib-instrumentations/version.py b/opentelemetry-contrib-instrumentations/src/opentelemetry/contrib-instrumentations/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/opentelemetry-contrib-instrumentations/src/opentelemetry/contrib-instrumentations/version.py
+++ b/opentelemetry-contrib-instrumentations/src/opentelemetry/contrib-instrumentations/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/opentelemetry-distro/pyproject.toml b/opentelemetry-distro/pyproject.toml
index 2397e9182a..686eeaba95 100644
--- a/opentelemetry-distro/pyproject.toml
+++ b/opentelemetry-distro/pyproject.toml
@@ -27,13 +27,13 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.12",
- "opentelemetry-instrumentation == 0.48b0.dev",
+ "opentelemetry-instrumentation == 0.49b0.dev",
"opentelemetry-sdk ~= 1.13",
]
[project.optional-dependencies]
otlp = [
- "opentelemetry-exporter-otlp == 1.27.0.dev",
+ "opentelemetry-exporter-otlp == 1.28.0.dev",
]
[project.entry-points.opentelemetry_configurator]
diff --git a/opentelemetry-distro/src/opentelemetry/distro/version.py b/opentelemetry-distro/src/opentelemetry/distro/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/opentelemetry-distro/src/opentelemetry/distro/version.py
+++ b/opentelemetry-distro/src/opentelemetry/distro/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/opentelemetry-distro/test-requirements.txt b/opentelemetry-distro/test-requirements.txt
index d9190daa26..050054c39b 100644
--- a/opentelemetry-distro/test-requirements.txt
+++ b/opentelemetry-distro/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/opentelemetry-instrumentation/README.rst b/opentelemetry-instrumentation/README.rst
index 6f66edb623..3ed88c213f 100644
--- a/opentelemetry-instrumentation/README.rst
+++ b/opentelemetry-instrumentation/README.rst
@@ -40,7 +40,7 @@ to figure out which instrumentation packages the user might want to install. By
prints out a list of the default and detected instrumentation packages that can be added to a
requirements.txt file. It also supports installing the packages when run with
:code:`--action=install` or :code:`-a install` flag. All default and detectable
-instrumentation packages are defined `here `.
+instrumentation packages are defined `here `.
opentelemetry-instrument
diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py
index 33668333ce..c4e720fd04 100644
--- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py
+++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/_semconv.py
@@ -252,16 +252,32 @@ def _set_http_scheme(result, scheme, sem_conv_opt_in_mode):
set_string_attribute(result, URL_SCHEME, scheme)
-def _set_http_host(result, host, sem_conv_opt_in_mode):
+def _set_http_flavor_version(result, version, sem_conv_opt_in_mode):
if _report_old(sem_conv_opt_in_mode):
- set_string_attribute(result, SpanAttributes.HTTP_HOST, host)
+ set_string_attribute(result, SpanAttributes.HTTP_FLAVOR, version)
if _report_new(sem_conv_opt_in_mode):
- set_string_attribute(result, SERVER_ADDRESS, host)
+ set_string_attribute(result, NETWORK_PROTOCOL_VERSION, version)
+
+
+def _set_http_user_agent(result, user_agent, sem_conv_opt_in_mode):
+ if _report_old(sem_conv_opt_in_mode):
+ set_string_attribute(
+ result, SpanAttributes.HTTP_USER_AGENT, user_agent
+ )
+ if _report_new(sem_conv_opt_in_mode):
+ set_string_attribute(result, USER_AGENT_ORIGINAL, user_agent)
# Client
+def _set_http_host_client(result, host, sem_conv_opt_in_mode):
+ if _report_old(sem_conv_opt_in_mode):
+ set_string_attribute(result, SpanAttributes.HTTP_HOST, host)
+ if _report_new(sem_conv_opt_in_mode):
+ set_string_attribute(result, SERVER_ADDRESS, host)
+
+
def _set_http_net_peer_name_client(result, peer_name, sem_conv_opt_in_mode):
if _report_old(sem_conv_opt_in_mode):
set_string_attribute(result, SpanAttributes.NET_PEER_NAME, peer_name)
@@ -310,27 +326,32 @@ def _set_http_target(result, target, path, query, sem_conv_opt_in_mode):
set_string_attribute(result, URL_QUERY, query)
-def _set_http_peer_ip(result, ip, sem_conv_opt_in_mode):
+def _set_http_host_server(result, host, sem_conv_opt_in_mode):
if _report_old(sem_conv_opt_in_mode):
- set_string_attribute(result, SpanAttributes.NET_PEER_IP, ip)
+ set_string_attribute(result, SpanAttributes.HTTP_HOST, host)
if _report_new(sem_conv_opt_in_mode):
- set_string_attribute(result, CLIENT_ADDRESS, ip)
+ set_string_attribute(result, CLIENT_ADDRESS, host)
-def _set_http_peer_port_server(result, port, sem_conv_opt_in_mode):
+# net.peer.ip -> net.sock.peer.addr
+# https://github.com/open-telemetry/semantic-conventions/blob/40db676ca0e735aa84f242b5a0fb14e49438b69b/schemas/1.15.0#L18
+# net.sock.peer.addr -> client.socket.address for server spans (TODO) AND client.address if missing
+# https://github.com/open-telemetry/semantic-conventions/blob/v1.21.0/CHANGELOG.md#v1210-2023-07-13
+# https://github.com/open-telemetry/semantic-conventions/blob/main/docs/non-normative/http-migration.md#common-attributes-across-http-client-and-server-spans
+def _set_http_peer_ip_server(result, ip, sem_conv_opt_in_mode):
if _report_old(sem_conv_opt_in_mode):
- set_int_attribute(result, SpanAttributes.NET_PEER_PORT, port)
+ set_string_attribute(result, SpanAttributes.NET_PEER_IP, ip)
if _report_new(sem_conv_opt_in_mode):
- set_int_attribute(result, CLIENT_PORT, port)
+ # Only populate if not already populated
+ if not result.get(CLIENT_ADDRESS):
+ set_string_attribute(result, CLIENT_ADDRESS, ip)
-def _set_http_user_agent(result, user_agent, sem_conv_opt_in_mode):
+def _set_http_peer_port_server(result, port, sem_conv_opt_in_mode):
if _report_old(sem_conv_opt_in_mode):
- set_string_attribute(
- result, SpanAttributes.HTTP_USER_AGENT, user_agent
- )
+ set_int_attribute(result, SpanAttributes.NET_PEER_PORT, port)
if _report_new(sem_conv_opt_in_mode):
- set_string_attribute(result, USER_AGENT_ORIGINAL, user_agent)
+ set_int_attribute(result, CLIENT_PORT, port)
def _set_http_net_peer_name_server(result, name, sem_conv_opt_in_mode):
@@ -340,13 +361,6 @@ def _set_http_net_peer_name_server(result, name, sem_conv_opt_in_mode):
set_string_attribute(result, CLIENT_ADDRESS, name)
-def _set_http_flavor_version(result, version, sem_conv_opt_in_mode):
- if _report_old(sem_conv_opt_in_mode):
- set_string_attribute(result, SpanAttributes.HTTP_FLAVOR, version)
- if _report_new(sem_conv_opt_in_mode):
- set_string_attribute(result, NETWORK_PROTOCOL_VERSION, version)
-
-
def _set_status(
span,
metrics_attributes: dict,
diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
index 6f86a539b2..1cc28abca4 100644
--- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
+++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap.py
@@ -119,7 +119,7 @@ def _find_installed_libraries():
def _run_requirements():
logger.setLevel(logging.ERROR)
- print("\n".join(_find_installed_libraries()), end="")
+ print("\n".join(_find_installed_libraries()))
def _run_install():
diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py
index 4ad6824281..616675ee80 100644
--- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py
+++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/bootstrap_gen.py
@@ -18,180 +18,179 @@
libraries = [
{
"library": "aio_pika >= 7.2.0, < 10.0.0",
- "instrumentation": "opentelemetry-instrumentation-aio-pika==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-aio-pika==0.49b0.dev",
},
{
"library": "aiohttp ~= 3.0",
- "instrumentation": "opentelemetry-instrumentation-aiohttp-client==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-aiohttp-client==0.49b0.dev",
},
{
"library": "aiohttp ~= 3.0",
- "instrumentation": "opentelemetry-instrumentation-aiohttp-server==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-aiohttp-server==0.49b0.dev",
},
{
"library": "aiopg >= 0.13.0, < 2.0.0",
- "instrumentation": "opentelemetry-instrumentation-aiopg==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-aiopg==0.49b0.dev",
},
{
"library": "asgiref ~= 3.0",
- "instrumentation": "opentelemetry-instrumentation-asgi==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-asgi==0.49b0.dev",
},
{
"library": "asyncpg >= 0.12.0",
- "instrumentation": "opentelemetry-instrumentation-asyncpg==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-asyncpg==0.49b0.dev",
},
{
"library": "boto~=2.0",
- "instrumentation": "opentelemetry-instrumentation-boto==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-boto==0.49b0.dev",
},
{
"library": "boto3 ~= 1.0",
- "instrumentation": "opentelemetry-instrumentation-boto3sqs==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-boto3sqs==0.49b0.dev",
},
{
"library": "botocore ~= 1.0",
- "instrumentation": "opentelemetry-instrumentation-botocore==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-botocore==0.49b0.dev",
},
{
"library": "cassandra-driver ~= 3.25",
- "instrumentation": "opentelemetry-instrumentation-cassandra==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-cassandra==0.49b0.dev",
},
{
"library": "scylla-driver ~= 3.25",
- "instrumentation": "opentelemetry-instrumentation-cassandra==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-cassandra==0.49b0.dev",
},
{
"library": "celery >= 4.0, < 6.0",
- "instrumentation": "opentelemetry-instrumentation-celery==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-celery==0.49b0.dev",
},
{
"library": "confluent-kafka >= 1.8.2, <= 2.4.0",
- "instrumentation": "opentelemetry-instrumentation-confluent-kafka==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-confluent-kafka==0.49b0.dev",
},
{
"library": "django >= 1.10",
- "instrumentation": "opentelemetry-instrumentation-django==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-django==0.49b0.dev",
},
{
"library": "elasticsearch >= 6.0",
- "instrumentation": "opentelemetry-instrumentation-elasticsearch==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-elasticsearch==0.49b0.dev",
},
{
"library": "falcon >= 1.4.1, < 3.1.2",
- "instrumentation": "opentelemetry-instrumentation-falcon==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-falcon==0.49b0.dev",
},
{
"library": "fastapi ~= 0.58",
- "instrumentation": "opentelemetry-instrumentation-fastapi==0.48b0.dev",
- },
- {
- "library": "fastapi-slim ~= 0.111.0",
- "instrumentation": "opentelemetry-instrumentation-fastapi==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-fastapi==0.49b0.dev",
},
{
"library": "flask >= 1.0",
- "instrumentation": "opentelemetry-instrumentation-flask==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-flask==0.49b0.dev",
},
{
- "library": "grpcio ~= 1.27",
- "instrumentation": "opentelemetry-instrumentation-grpc==0.48b0.dev",
+ "library": "grpcio >= 1.42.0",
+ "instrumentation": "opentelemetry-instrumentation-grpc==0.49b0.dev",
},
{
"library": "httpx >= 0.18.0",
- "instrumentation": "opentelemetry-instrumentation-httpx==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-httpx==0.49b0.dev",
},
{
"library": "jinja2 >= 2.7, < 4.0",
- "instrumentation": "opentelemetry-instrumentation-jinja2==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-jinja2==0.49b0.dev",
+ },
+ {
+ "library": "kafka-python >= 2.0, < 3.0",
+ "instrumentation": "opentelemetry-instrumentation-kafka-python==0.49b0.dev",
},
{
- "library": "kafka-python >= 2.0",
- "instrumentation": "opentelemetry-instrumentation-kafka-python==0.48b0.dev",
+ "library": "kafka-python-ng >= 2.0, < 3.0",
+ "instrumentation": "opentelemetry-instrumentation-kafka-python==0.49b0.dev",
},
{
- "library": "mysql-connector-python ~= 8.0",
- "instrumentation": "opentelemetry-instrumentation-mysql==0.48b0.dev",
+ "library": "mysql-connector-python >= 8.0, < 10.0",
+ "instrumentation": "opentelemetry-instrumentation-mysql==0.49b0.dev",
},
{
"library": "mysqlclient < 3",
- "instrumentation": "opentelemetry-instrumentation-mysqlclient==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-mysqlclient==0.49b0.dev",
},
{
"library": "pika >= 0.12.0",
- "instrumentation": "opentelemetry-instrumentation-pika==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-pika==0.49b0.dev",
},
{
"library": "psycopg >= 3.1.0",
- "instrumentation": "opentelemetry-instrumentation-psycopg==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-psycopg==0.49b0.dev",
},
{
"library": "psycopg2 >= 2.7.3.1",
- "instrumentation": "opentelemetry-instrumentation-psycopg2==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-psycopg2==0.49b0.dev",
},
{
"library": "pymemcache >= 1.3.5, < 5",
- "instrumentation": "opentelemetry-instrumentation-pymemcache==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-pymemcache==0.49b0.dev",
},
{
"library": "pymongo >= 3.1, < 5.0",
- "instrumentation": "opentelemetry-instrumentation-pymongo==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-pymongo==0.49b0.dev",
},
{
"library": "PyMySQL < 2",
- "instrumentation": "opentelemetry-instrumentation-pymysql==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-pymysql==0.49b0.dev",
},
{
"library": "pyramid >= 1.7",
- "instrumentation": "opentelemetry-instrumentation-pyramid==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-pyramid==0.49b0.dev",
},
{
"library": "redis >= 2.6",
- "instrumentation": "opentelemetry-instrumentation-redis==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-redis==0.49b0.dev",
},
{
"library": "remoulade >= 0.50",
- "instrumentation": "opentelemetry-instrumentation-remoulade==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-remoulade==0.49b0.dev",
},
{
"library": "requests ~= 2.0",
- "instrumentation": "opentelemetry-instrumentation-requests==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-requests==0.49b0.dev",
},
{
"library": "sqlalchemy",
- "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.49b0.dev",
},
{
"library": "starlette ~= 0.13.0",
- "instrumentation": "opentelemetry-instrumentation-starlette==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-starlette==0.49b0.dev",
},
{
"library": "psutil >= 5",
- "instrumentation": "opentelemetry-instrumentation-system-metrics==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-system-metrics==0.49b0.dev",
},
{
"library": "tornado >= 5.1.1",
- "instrumentation": "opentelemetry-instrumentation-tornado==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-tornado==0.49b0.dev",
},
{
"library": "tortoise-orm >= 0.17.0",
- "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.49b0.dev",
},
{
"library": "pydantic >= 1.10.2",
- "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.49b0.dev",
},
{
"library": "urllib3 >= 1.0.0, < 3.0.0",
- "instrumentation": "opentelemetry-instrumentation-urllib3==0.48b0.dev",
+ "instrumentation": "opentelemetry-instrumentation-urllib3==0.49b0.dev",
},
]
default_instrumentations = [
- "opentelemetry-instrumentation-asyncio==0.48b0.dev",
- "opentelemetry-instrumentation-aws-lambda==0.48b0.dev",
- "opentelemetry-instrumentation-dbapi==0.48b0.dev",
- "opentelemetry-instrumentation-logging==0.48b0.dev",
- "opentelemetry-instrumentation-sqlite3==0.48b0.dev",
- "opentelemetry-instrumentation-threading==0.48b0.dev",
- "opentelemetry-instrumentation-urllib==0.48b0.dev",
- "opentelemetry-instrumentation-wsgi==0.48b0.dev",
+ "opentelemetry-instrumentation-asyncio==0.49b0.dev",
+ "opentelemetry-instrumentation-dbapi==0.49b0.dev",
+ "opentelemetry-instrumentation-logging==0.49b0.dev",
+ "opentelemetry-instrumentation-sqlite3==0.49b0.dev",
+ "opentelemetry-instrumentation-threading==0.49b0.dev",
+ "opentelemetry-instrumentation-urllib==0.49b0.dev",
+ "opentelemetry-instrumentation-wsgi==0.49b0.dev",
]
diff --git a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/version.py b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/opentelemetry-instrumentation/src/opentelemetry/instrumentation/version.py
+++ b/opentelemetry-instrumentation/src/opentelemetry/instrumentation/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/opentelemetry-instrumentation/test-requirements.txt b/opentelemetry-instrumentation/test-requirements.txt
index 6cd12fad24..31f1ef76ab 100644
--- a/opentelemetry-instrumentation/test-requirements.txt
+++ b/opentelemetry-instrumentation/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/opentelemetry-instrumentation/tests/test_bootstrap.py b/opentelemetry-instrumentation/tests/test_bootstrap.py
index bbe2f5623b..4807f0beb7 100644
--- a/opentelemetry-instrumentation/tests/test_bootstrap.py
+++ b/opentelemetry-instrumentation/tests/test_bootstrap.py
@@ -77,7 +77,7 @@ def test_run_cmd_print(self):
bootstrap.run()
self.assertEqual(
fake_out.getvalue(),
- "\n".join(self.installed_libraries),
+ "\n".join(self.installed_libraries) + "\n",
)
@patch("sys.argv", ["bootstrap", "-a", "install"])
diff --git a/processor/opentelemetry-processor-baggage/pyproject.toml b/processor/opentelemetry-processor-baggage/pyproject.toml
index 3fa80e1517..29fc2e8681 100644
--- a/processor/opentelemetry-processor-baggage/pyproject.toml
+++ b/processor/opentelemetry-processor-baggage/pyproject.toml
@@ -26,6 +26,7 @@ classifiers = [
]
dependencies = [
"opentelemetry-api ~= 1.5",
+ "opentelemetry-sdk ~= 1.5",
"wrapt >= 1.0.0, < 2.0.0",
]
diff --git a/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/version.py b/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/version.py
+++ b/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/processor/opentelemetry-processor-baggage/test-requirements.txt b/processor/opentelemetry-processor-baggage/test-requirements.txt
index fa7ad3d793..7e4fefd157 100644
--- a/processor/opentelemetry-processor-baggage/test-requirements.txt
+++ b/processor/opentelemetry-processor-baggage/test-requirements.txt
@@ -1,2 +1,7 @@
-
--e processor/opentelemetry-processor-baggage
\ No newline at end of file
+importlib_metadata==8.0.0
+typing_extensions==4.12.2
+wrapt==1.16.0
+zipp==3.19.2
+pytest==7.4.4
+Deprecated==1.2.14
+-e processor/opentelemetry-processor-baggage
diff --git a/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py b/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py
index 58cce81ce6..1a30b96547 100644
--- a/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py
+++ b/propagator/opentelemetry-propagator-aws-xray/src/opentelemetry/propagators/aws/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "1.0.1"
+__version__ = "1.0.2"
diff --git a/propagator/opentelemetry-propagator-aws-xray/test-requirements.txt b/propagator/opentelemetry-propagator-aws-xray/test-requirements.txt
index 8589a794a4..4587d87629 100644
--- a/propagator/opentelemetry-propagator-aws-xray/test-requirements.txt
+++ b/propagator/opentelemetry-propagator-aws-xray/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
certifi==2024.7.4
charset-normalizer==3.3.2
Deprecated==1.2.14
diff --git a/propagator/opentelemetry-propagator-ot-trace/src/opentelemetry/propagators/ot_trace/version.py b/propagator/opentelemetry-propagator-ot-trace/src/opentelemetry/propagators/ot_trace/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/propagator/opentelemetry-propagator-ot-trace/src/opentelemetry/propagators/ot_trace/version.py
+++ b/propagator/opentelemetry-propagator-ot-trace/src/opentelemetry/propagators/ot_trace/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/propagator/opentelemetry-propagator-ot-trace/test-requirements.txt b/propagator/opentelemetry-propagator-ot-trace/test-requirements.txt
index 0a72c3c823..b556c4f0cc 100644
--- a/propagator/opentelemetry-propagator-ot-trace/test-requirements.txt
+++ b/propagator/opentelemetry-propagator-ot-trace/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/resource/opentelemetry-resource-detector-azure/test-requirements.txt b/resource/opentelemetry-resource-detector-azure/test-requirements.txt
index 028c41e65d..2b29359fbb 100644
--- a/resource/opentelemetry-resource-detector-azure/test-requirements.txt
+++ b/resource/opentelemetry-resource-detector-azure/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/resource/opentelemetry-resource-detector-container/src/opentelemetry/resource/detector/container/version.py b/resource/opentelemetry-resource-detector-container/src/opentelemetry/resource/detector/container/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/resource/opentelemetry-resource-detector-container/src/opentelemetry/resource/detector/container/version.py
+++ b/resource/opentelemetry-resource-detector-container/src/opentelemetry/resource/detector/container/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/resource/opentelemetry-resource-detector-container/test-requirements.txt b/resource/opentelemetry-resource-detector-container/test-requirements.txt
index 8a926fff71..f7b5b71fcf 100644
--- a/resource/opentelemetry-resource-detector-container/test-requirements.txt
+++ b/resource/opentelemetry-resource-detector-container/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/scripts/generate_instrumentation_bootstrap.py b/scripts/generate_instrumentation_bootstrap.py
index 1c0cc30f7b..57af33e303 100755
--- a/scripts/generate_instrumentation_bootstrap.py
+++ b/scripts/generate_instrumentation_bootstrap.py
@@ -53,12 +53,21 @@
"bootstrap_gen.py",
)
+# AWS Lambda instrumentation is excluded from the default list because it often
+# requires specific configurations and dependencies that may not be set up
+# in all environments. Instead, users who need AWS Lambda support can opt-in
+# by manually adding it to their environment.
+# See https://github.com/open-telemetry/opentelemetry-python-contrib/issues/2787
+packages_to_exclude = ["opentelemetry-instrumentation-aws-lambda"]
+
def main():
# pylint: disable=no-member
default_instrumentations = ast.List(elts=[])
libraries = ast.List(elts=[])
for pkg in get_instrumentation_packages():
+ if pkg.get("name") in packages_to_exclude:
+ continue
if not pkg["instruments"]:
default_instrumentations.elts.append(ast.Str(pkg["requirement"]))
for target_pkg in pkg["instruments"]:
diff --git a/scripts/update_sha.py b/scripts/update_sha.py
index 1c913249a2..c63b9eda9b 100644
--- a/scripts/update_sha.py
+++ b/scripts/update_sha.py
@@ -22,7 +22,12 @@
API_URL = (
"https://api.github.com/repos/open-telemetry/opentelemetry-python/commits/"
)
-WORKFLOW_FILE = ".github/workflows/test.yml"
+workflow_files = [
+ ".github/workflows/test_0.yml"
+ ".github/workflows/test_1.yml"
+ ".github/workflows/misc_0.yml"
+ ".github/workflows/lint_0.yml"
+]
def get_sha(branch):
@@ -35,11 +40,12 @@ def get_sha(branch):
def update_sha(sha):
yaml = YAML()
yaml.preserve_quotes = True
- with open(WORKFLOW_FILE, "r") as file:
- workflow = yaml.load(file)
- workflow["env"]["CORE_REPO_SHA"] = sha
- with open(WORKFLOW_FILE, "w") as file:
- yaml.dump(workflow, file)
+ for workflow_file in workflow_files:
+ with open(workflow_file, "r") as file:
+ workflow = yaml.load(file)
+ workflow["env"]["CORE_REPO_SHA"] = sha
+ with open(workflow_file, "w") as file:
+ yaml.dump(workflow, file)
def main():
diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py
index a889da2799..c9cb3877e2 100644
--- a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py
+++ b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "2.0.1"
+__version__ = "2.0.2"
diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/test-requirements.txt b/sdk-extension/opentelemetry-sdk-extension-aws/test-requirements.txt
index 27199627a1..1fa968a8b3 100644
--- a/sdk-extension/opentelemetry-sdk-extension-aws/test-requirements.txt
+++ b/sdk-extension/opentelemetry-sdk-extension-aws/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
diff --git a/tox.ini b/tox.ini
index 4ba434b29b..600929a6ec 100644
--- a/tox.ini
+++ b/tox.ini
@@ -73,11 +73,8 @@ 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
- py3{8,9}-test-instrumentation-django-1
- py3{8,9}-test-instrumentation-django-2
- py3{10,11,12}-test-instrumentation-django-1
- py3{10,11,12}-test-instrumentation-django-3
+ py3{8,9}-test-instrumentation-django-{0,1,2}
+ py3{10,11,12}-test-instrumentation-django-{1,3}
pypy3-test-instrumentation-django-{0,1}
lint-instrumentation-django
@@ -109,16 +106,14 @@ envlist =
; 0: falcon ==1.4.1
; 1: falcon >=2.0.0,<3.0.0
; 2: falcon >=3.0.0,<4.0.0
- py3{8,9}-test-instrumentation-falcon-0
- py3{8,9,10,11,12}-test-instrumentation-falcon-{1,2}
+ py3{8,9}-test-instrumentation-falcon-{0,1,2}
+ py3{10,11,12}-test-instrumentation-falcon-{1,2}
pypy3-test-instrumentation-falcon-{0,1,2}
lint-instrumentation-falcon
; opentelemetry-instrumentation-fastapi
py3{8,9,10,11,12}-test-instrumentation-fastapi
- py3{8,9,10,11,12}-test-instrumentation-fastapi-slim
pypy3-test-instrumentation-fastapi
- pypy3-test-instrumentation-fastapi-slim
lint-instrumentation-fastapi
; opentelemetry-instrumentation-flask
@@ -177,8 +172,12 @@ envlist =
lint-exporter-prometheus-remote-write
; opentelemetry-instrumentation-mysql
- py3{8,9,10,11,12}-test-instrumentation-mysql
- pypy3-test-instrumentation-mysql
+ ; The numbers at the end of the environment names
+ ; 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}-test-instrumentation-mysql-{0,1}
+ pypy3-test-instrumentation-mysql-{0,1}
lint-instrumentation-mysql
; opentelemetry-instrumentation-mysqlclient
@@ -247,8 +246,11 @@ envlist =
lint-instrumentation-wsgi
; opentelemetry-instrumentation-grpc
- py3{8,9,10,11,12}-test-instrumentation-grpc
- pypy3-test-instrumentation-grpc
+ ; The numbers at the end of the environment names
+ ; below mean these dependencies are being used:
+ ; 0: grpcio==1.62.0
+ ; 1: grpcio==1.63.0
+ py3{8,9,10,11,12}-test-instrumentation-grpc-{0,1}
lint-instrumentation-grpc
; opentelemetry-instrumentation-sqlalchemy
@@ -342,12 +344,13 @@ envlist =
; opentelemetry-instrumentation-kafka-python
py3{8,9,10,11}-test-instrumentation-kafka-python
+ py3{8,9,10,11,12}-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}-test-instrumentation-confluent-kafka
- pypy3-test-instrumentation-confluent-kafka
lint-instrumentation-confluent-kafka
; opentelemetry-instrumentation-asyncio
@@ -368,8 +371,9 @@ envlist =
spellcheck
docker-tests
docs
-
generate
+ generate-workflows
+ shellcheck
[testenv]
deps =
@@ -379,7 +383,8 @@ deps =
; FIXME: add coverage testing
; FIXME: add mypy testing
-allowlist_externals = sh
+allowlist_externals =
+ sh
setenv =
; override CORE_REPO_SHA via env variable when testing other branches/commits than main
@@ -435,6 +440,10 @@ commands_pre =
kafka-python: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
kafka-python: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
kafka-python: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements.txt
+ kafka-pythonng: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
+ kafka-pythonng: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
+ kafka-pythonng: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
+ kafka-pythonng: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python/test-requirements-ng.txt
confluent-kafka: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
confluent-kafka: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
@@ -446,7 +455,9 @@ commands_pre =
grpc: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
grpc: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
grpc: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
- grpc: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/test-requirements.txt
+ grpc-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-0.txt
+ grpc-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-1.txt
+ lint-instrumentation-grpc: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-grpc/test-requirements-1.txt
wsgi: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
wsgi: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
@@ -546,17 +557,14 @@ commands_pre =
fastapi: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
fastapi: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
fastapi: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements.txt
- fastapi-slim: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
- fastapi-slim: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
- fastapi-slim: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
- fastapi-slim: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
- fastapi-slim: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-fastapi/test-requirements-slim.txt
mysql: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
mysql: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
mysql: pip install opentelemetry-sdk@{env:CORE_REPO}\#egg=opentelemetry-sdk&subdirectory=opentelemetry-sdk
mysql: pip install opentelemetry-test-utils@{env:CORE_REPO}\#egg=opentelemetry-test-utils&subdirectory=tests/opentelemetry-test-utils
- mysql: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql/test-requirements.txt
+ mysql-0: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-0.txt
+ mysql-1: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-1.txt
+ lint-instrumentation-mysql: pip install -r {toxinidir}/instrumentation/opentelemetry-instrumentation-mysql/test-requirements-1.txt
mysqlclient: pip install opentelemetry-api@{env:CORE_REPO}\#egg=opentelemetry-api&subdirectory=opentelemetry-api
mysqlclient: pip install opentelemetry-semantic-conventions@{env:CORE_REPO}\#egg=opentelemetry-semantic-conventions&subdirectory=opentelemetry-semantic-conventions
@@ -928,6 +936,9 @@ commands =
lint-instrumentation-kafka-python: flake8 --config {toxinidir}/.flake8 {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python
lint-instrumentation-kafka-python: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-kafka-python"
+ ; Test only for kafka-pythonng instrumentation as the only difference between kafka-python and kafka-pythonng is the version of kafka-python
+ test-instrumentation-kafka-pythonng: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-kafka-python/tests {posargs}
+
test-instrumentation-confluent-kafka: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka/tests {posargs}
lint-instrumentation-confluent-kafka: black --diff --check --config {toxinidir}/pyproject.toml {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka
lint-instrumentation-confluent-kafka: isort --diff --check-only --settings-path {toxinidir}/.isort.cfg {toxinidir}/instrumentation/opentelemetry-instrumentation-confluent-kafka
@@ -1179,7 +1190,7 @@ basepython: python3
deps =
aiopg==1.4.0
amqp==5.2.0
- asgiref==3.7.2
+ asgiref==3.8.1
async-timeout==4.0.3
asyncpg==0.29.0
attrs==23.2.0
@@ -1302,3 +1313,19 @@ commands =
{toxinidir}/scripts/generate_instrumentation_bootstrap.py
{toxinidir}/scripts/generate_instrumentation_readme.py
{toxinidir}/scripts/generate_instrumentation_metapackage.py
+
+[testenv:generate-workflows]
+
+commands_pre =
+ pip install {toxinidir}/.github/workflows/generate_workflows_lib
+
+commands =
+ python {toxinidir}/.github/workflows/generate_workflows.py
+
+[testenv:shellcheck]
+
+commands_pre =
+ sh -c "sudo apt update -y && sudo apt install --assume-yes shellcheck"
+
+commands =
+ sh -c "find {toxinidir} -name \*.sh | xargs shellcheck --severity=warning"
diff --git a/util/opentelemetry-util-http/src/opentelemetry/util/http/version.py b/util/opentelemetry-util-http/src/opentelemetry/util/http/version.py
index 4d21fcb843..ee5a6342e7 100644
--- a/util/opentelemetry-util-http/src/opentelemetry/util/http/version.py
+++ b/util/opentelemetry-util-http/src/opentelemetry/util/http/version.py
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.48b0.dev"
+__version__ = "0.49b0.dev"
diff --git a/util/opentelemetry-util-http/test-requirements.txt b/util/opentelemetry-util-http/test-requirements.txt
index cb1ffe135b..1769daa094 100644
--- a/util/opentelemetry-util-http/test-requirements.txt
+++ b/util/opentelemetry-util-http/test-requirements.txt
@@ -1,4 +1,4 @@
-asgiref==3.7.2
+asgiref==3.8.1
Deprecated==1.2.14
importlib-metadata==6.11.0
iniconfig==2.0.0
@@ -8,4 +8,4 @@ py-cpuinfo==9.0.0
pytest==7.4.4
tomli==2.0.1
typing_extensions==4.10.0
--e opentelemetry-instrumentation
\ No newline at end of file
+-e opentelemetry-instrumentation