Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-opentelemetry-instrumentation
for openSUSE:Factory checked in at 2026-04-14 17:48:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-opentelemetry-instrumentation (Old)
and
/work/SRC/openSUSE:Factory/.python-opentelemetry-instrumentation.new.21863 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-opentelemetry-instrumentation"
Tue Apr 14 17:48:48 2026 rev:9 rq:1346226 version:0.62b0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-opentelemetry-instrumentation/python-opentelemetry-instrumentation.changes
2026-03-30 18:33:51.193464572 +0200
+++
/work/SRC/openSUSE:Factory/.python-opentelemetry-instrumentation.new.21863/python-opentelemetry-instrumentation.changes
2026-04-14 17:49:12.865759091 +0200
@@ -1,0 +2,25 @@
+Sun Apr 12 17:53:35 UTC 2026 - Dirk Müller <[email protected]>
+
+- update to 0.62b0:
+ * ### Added
+ * `opentelemetry-instrumentation`: Add support for wrapt 2.x
+ * ### Fixed
+ * `opentelemetry-docker-tests`: Replace deprecated
+ `SpanAttributes` from `opentelemetry.semconv.trace` with
+ `opentelemetry.semconv._incubating.attributes`
+ * `opentelemetry-instrumentation-confluent-kafka`: Skip `recv`
+ span creation when `poll()` returns no message or `consume()`
+ returns an empty list, avoiding empty spans on idle polls
+ * Fix intermittent `Core Contrib Test` CI failures caused by
+ GitHub git CDN SHA propagation lag by installing core
+ packages from the already-checked-out local copy instead of a
+ second git clone
+ * Don't import module in unwrap if not already imported
+ * `opentelemetry-instrumentation-logging`: Map Python
+ `CRITICAL` log level to OTel `FATAL` severity text and
+ `WARNING` to `WARN`
+ * Breaking change: callback class `Callbacks` renamed to
+ `OpAMPCallbacks`
+- drop wrapt2.patch (upstream)
+
+-------------------------------------------------------------------
Old:
----
opentelemetry_instrumentation-0.61b0.tar.gz
wrapt2.patch
New:
----
opentelemetry_instrumentation-0.62b0.tar.gz
----------(Old B)----------
Old: `OpAMPCallbacks`
- drop wrapt2.patch (upstream)
----------(Old E)----------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-opentelemetry-instrumentation.spec ++++++
--- /var/tmp/diff_new_pack.MQtcnx/_old 2026-04-14 17:49:13.593789183 +0200
+++ /var/tmp/diff_new_pack.MQtcnx/_new 2026-04-14 17:49:13.593789183 +0200
@@ -18,14 +18,12 @@
%{?sle15_python_module_pythons}
Name: python-opentelemetry-instrumentation
-Version: 0.61b0
+Version: 0.62b0
Release: 0
Summary: Instrumentation Tools & Auto Instrumentation for OpenTelemetry
Python
License: Apache-2.0
URL:
https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation
Source:
https://files.pythonhosted.org/packages/source/o/opentelemetry-instrumentation/opentelemetry_instrumentation-%{version}.tar.gz
-# PATCH-FIX-UPSTREAM
https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4082 update
opentelemetry-instrumentation to wrapt v2
-Patch: wrapt2.patch
BuildRequires: %{python_module hatchling}
BuildRequires: %{python_module pip}
BuildRequires: python-rpm-macros
++++++ opentelemetry_instrumentation-0.61b0.tar.gz ->
opentelemetry_instrumentation-0.62b0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/opentelemetry_instrumentation-0.61b0/.gitignore
new/opentelemetry_instrumentation-0.62b0/.gitignore
--- old/opentelemetry_instrumentation-0.61b0/.gitignore 2020-02-02
01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation-0.62b0/.gitignore 2020-02-02
01:00:00.000000000 +0100
@@ -61,3 +61,6 @@
# Benchmark result files
*-benchmark.json
+
+# opentelemetry-admin jobs
+opentelemetry-admin-jobs.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/opentelemetry_instrumentation-0.61b0/PKG-INFO
new/opentelemetry_instrumentation-0.62b0/PKG-INFO
--- old/opentelemetry_instrumentation-0.61b0/PKG-INFO 2020-02-02
01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation-0.62b0/PKG-INFO 2020-02-02
01:00:00.000000000 +0100
@@ -1,6 +1,6 @@
Metadata-Version: 2.4
Name: opentelemetry-instrumentation
-Version: 0.61b0
+Version: 0.62b0
Summary: Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python
Project-URL: Homepage,
https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation
Project-URL: Repository,
https://github.com/open-telemetry/opentelemetry-python-contrib
@@ -20,9 +20,9 @@
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.9
Requires-Dist: opentelemetry-api~=1.4
-Requires-Dist: opentelemetry-semantic-conventions==0.61b0
+Requires-Dist: opentelemetry-semantic-conventions==0.62b0
Requires-Dist: packaging>=18.0
-Requires-Dist: wrapt<2.0.0,>=1.0.0
+Requires-Dist: wrapt<3.0.0,>=1.0.0
Description-Content-Type: text/x-rst
OpenTelemetry Instrumentation
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/opentelemetry_instrumentation-0.61b0/pyproject.toml
new/opentelemetry_instrumentation-0.62b0/pyproject.toml
--- old/opentelemetry_instrumentation-0.61b0/pyproject.toml 2020-02-02
01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation-0.62b0/pyproject.toml 2020-02-02
01:00:00.000000000 +0100
@@ -27,8 +27,8 @@
]
dependencies = [
"opentelemetry-api ~= 1.4",
- "opentelemetry-semantic-conventions == 0.61b0",
- "wrapt >= 1.0.0, < 2.0.0",
+ "opentelemetry-semantic-conventions == 0.62b0",
+ "wrapt >= 1.0.0, < 3.0.0",
"packaging >= 18.0",
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/_semconv.py
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/_semconv.py
---
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/_semconv.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/_semconv.py
2020-02-02 01:00:00.000000000 +0100
@@ -18,10 +18,14 @@
import threading
from enum import Enum
from typing import Container, Mapping, MutableMapping
+from urllib.parse import urlparse
+
+from packaging import version as package_version
from opentelemetry.instrumentation.utils import http_status_to_status_code
from opentelemetry.semconv._incubating.attributes.db_attributes import (
DB_NAME,
+ DB_OPERATION,
DB_STATEMENT,
DB_SYSTEM,
DB_USER,
@@ -50,6 +54,7 @@
)
from opentelemetry.semconv.attributes.db_attributes import (
DB_NAMESPACE,
+ DB_OPERATION_NAME,
DB_QUERY_TEXT,
DB_SYSTEM_NAME,
)
@@ -177,6 +182,9 @@
OTEL_SEMCONV_STABILITY_OPT_IN = "OTEL_SEMCONV_STABILITY_OPT_IN"
+# Legacy/default schema version when schema_url was first introduced
+_LEGACY_SCHEMA_VERSION = "1.11.0"
+
class _OpenTelemetryStabilitySignalType(Enum):
HTTP = "http"
@@ -327,7 +335,7 @@
try:
result[key] = int(value)
except ValueError:
- return
+ pass
def _set_http_method(
@@ -590,6 +598,17 @@
# No new attribute - db.user was removed with no replacement
+def _set_db_operation(
+ result: MutableMapping[str, AttributeValue],
+ operation: str,
+ sem_conv_opt_in_mode: _StabilityMode,
+) -> None:
+ if _report_old(sem_conv_opt_in_mode):
+ set_string_attribute(result, DB_OPERATION, operation)
+ if _report_new(sem_conv_opt_in_mode):
+ set_string_attribute(result, DB_OPERATION_NAME, operation)
+
+
# General
@@ -634,8 +653,63 @@
span.set_status(Status(status))
-# Get schema version based off of opt-in mode
def _get_schema_url(mode: _StabilityMode) -> str:
+ """Get schema version URL for a single signal type's opt-in mode
(backwards compatible).
+
+ For new instrumentations using multiple signal types, use
+ _get_schema_url_for_signal_types()
+ """
if mode is _StabilityMode.DEFAULT:
- return "https://opentelemetry.io/schemas/1.11.0"
+ return f"https://opentelemetry.io/schemas/{_LEGACY_SCHEMA_VERSION}"
return Schemas.V1_21_0.value
+
+
+def _get_schema_version_for_opt_in_mode(
+ signal_type: _OpenTelemetryStabilitySignalType,
+ mode: _StabilityMode,
+) -> str:
+ """Get the schema version for a specific signal type and opt-in mode."""
+ if mode == _StabilityMode.DEFAULT:
+ return _LEGACY_SCHEMA_VERSION
+
+ signal_versions = {
+ _OpenTelemetryStabilitySignalType.HTTP: Schemas.V1_21_0.value,
+ _OpenTelemetryStabilitySignalType.DATABASE: Schemas.V1_25_0.value,
+ _OpenTelemetryStabilitySignalType.GEN_AI: Schemas.V1_26_0.value,
+ }
+ schema_url = signal_versions.get(signal_type)
+ if not schema_url:
+ return _LEGACY_SCHEMA_VERSION
+
+ path = urlparse(schema_url).path
+ schema_version = path.rstrip("/").split("/")[-1]
+ return schema_version or _LEGACY_SCHEMA_VERSION
+
+
+def _get_schema_url_for_signal_types(
+ signal_types: list[_OpenTelemetryStabilitySignalType],
+) -> str:
+ """Get the highest applicable schema URL for multiple signal types.
+
+ Note:
+ Instrumentors should call
_OpenTelemetrySemanticConventionStability._initialize()
+ before using this function to ensure proper initialization of
stability modes.
+
+ Args:
+ signal_types: List of signal types used by the instrumentation
+
+ Returns:
+ Schema URL string representing the highest applicable semconv version
+ """
+ highest_schema_version = _LEGACY_SCHEMA_VERSION
+ for signal_type in signal_types:
+ mode =
_OpenTelemetrySemanticConventionStability._get_opentelemetry_stability_opt_in_mode(
+ signal_type
+ )
+ schema_version = _get_schema_version_for_opt_in_mode(signal_type, mode)
+ # Keep the highest for all signals
+ if package_version.Version(schema_version) > package_version.Version(
+ highest_schema_version
+ ):
+ highest_schema_version = schema_version
+ return f"https://opentelemetry.io/schemas/{highest_schema_version}"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/bootstrap.py
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/bootstrap.py
---
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/bootstrap.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/bootstrap.py
2020-02-02 01:00:00.000000000 +0100
@@ -117,8 +117,7 @@
def _find_installed_libraries(default_instrumentations, libraries):
- for lib in default_instrumentations:
- yield lib
+ yield from default_instrumentations
for lib in libraries:
if _is_installed(lib["library"]):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/bootstrap_gen.py
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/bootstrap_gen.py
---
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/bootstrap_gen.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/bootstrap_gen.py
2020-02-02 01:00:00.000000000 +0100
@@ -26,199 +26,199 @@
},
{
"library": "aio_pika >= 7.2.0, < 10.0.0",
- "instrumentation": "opentelemetry-instrumentation-aio-pika==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-aio-pika==0.62b0",
},
{
"library": "aiohttp ~= 3.0",
- "instrumentation":
"opentelemetry-instrumentation-aiohttp-client==0.61b0",
+ "instrumentation":
"opentelemetry-instrumentation-aiohttp-client==0.62b0",
},
{
"library": "aiohttp ~= 3.0",
- "instrumentation":
"opentelemetry-instrumentation-aiohttp-server==0.61b0",
+ "instrumentation":
"opentelemetry-instrumentation-aiohttp-server==0.62b0",
},
{
"library": "aiokafka >= 0.8, < 1.0",
- "instrumentation": "opentelemetry-instrumentation-aiokafka==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-aiokafka==0.62b0",
},
{
"library": "aiopg >= 0.13.0, < 2.0.0",
- "instrumentation": "opentelemetry-instrumentation-aiopg==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-aiopg==0.62b0",
},
{
"library": "asgiref ~= 3.0",
- "instrumentation": "opentelemetry-instrumentation-asgi==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-asgi==0.62b0",
},
{
"library": "asyncclick ~= 8.0",
- "instrumentation": "opentelemetry-instrumentation-asyncclick==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-asyncclick==0.62b0",
},
{
"library": "asyncpg >= 0.12.0",
- "instrumentation": "opentelemetry-instrumentation-asyncpg==0.61b0",
- },
- {
- "library": "boto~=2.0",
- "instrumentation": "opentelemetry-instrumentation-boto==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-asyncpg==0.62b0",
},
{
"library": "boto3 ~= 1.0",
- "instrumentation": "opentelemetry-instrumentation-boto3sqs==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-boto3sqs==0.62b0",
},
{
"library": "botocore ~= 1.0",
- "instrumentation": "opentelemetry-instrumentation-botocore==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-botocore==0.62b0",
+ },
+ {
+ "library": "aiobotocore ~= 2.0",
+ "instrumentation": "opentelemetry-instrumentation-botocore==0.62b0",
},
{
"library": "cassandra-driver ~= 3.25",
- "instrumentation": "opentelemetry-instrumentation-cassandra==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-cassandra==0.62b0",
},
{
"library": "scylla-driver ~= 3.25",
- "instrumentation": "opentelemetry-instrumentation-cassandra==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-cassandra==0.62b0",
},
{
"library": "celery >= 4.0, < 6.0",
- "instrumentation": "opentelemetry-instrumentation-celery==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-celery==0.62b0",
},
{
"library": "click >= 8.1.3, < 9.0.0",
- "instrumentation": "opentelemetry-instrumentation-click==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-click==0.62b0",
},
{
- "library": "confluent-kafka >= 1.8.2, <= 2.13.0",
- "instrumentation":
"opentelemetry-instrumentation-confluent-kafka==0.61b0",
+ "library": "confluent-kafka >= 1.8.2, < 3.0.0",
+ "instrumentation":
"opentelemetry-instrumentation-confluent-kafka==0.62b0",
},
{
"library": "django >= 2.0",
- "instrumentation": "opentelemetry-instrumentation-django==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-django==0.62b0",
},
{
"library": "elasticsearch >= 6.0",
- "instrumentation":
"opentelemetry-instrumentation-elasticsearch==0.61b0",
+ "instrumentation":
"opentelemetry-instrumentation-elasticsearch==0.62b0",
},
{
"library": "falcon >= 1.4.1, < 5.0.0",
- "instrumentation": "opentelemetry-instrumentation-falcon==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-falcon==0.62b0",
},
{
"library": "fastapi ~= 0.92",
- "instrumentation": "opentelemetry-instrumentation-fastapi==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-fastapi==0.62b0",
},
{
"library": "flask >= 1.0",
- "instrumentation": "opentelemetry-instrumentation-flask==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-flask==0.62b0",
},
{
"library": "grpcio >= 1.42.0",
- "instrumentation": "opentelemetry-instrumentation-grpc==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-grpc==0.62b0",
},
{
"library": "httpx >= 0.18.0",
- "instrumentation": "opentelemetry-instrumentation-httpx==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-httpx==0.62b0",
},
{
"library": "jinja2 >= 2.7, < 4.0",
- "instrumentation": "opentelemetry-instrumentation-jinja2==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-jinja2==0.62b0",
},
{
"library": "kafka-python >= 2.0, < 3.0",
- "instrumentation":
"opentelemetry-instrumentation-kafka-python==0.61b0",
+ "instrumentation":
"opentelemetry-instrumentation-kafka-python==0.62b0",
},
{
"library": "kafka-python-ng >= 2.0, < 3.0",
- "instrumentation":
"opentelemetry-instrumentation-kafka-python==0.61b0",
+ "instrumentation":
"opentelemetry-instrumentation-kafka-python==0.62b0",
},
{
"library": "mysql-connector-python >= 8.0, < 10.0",
- "instrumentation": "opentelemetry-instrumentation-mysql==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-mysql==0.62b0",
},
{
"library": "mysqlclient < 3",
- "instrumentation": "opentelemetry-instrumentation-mysqlclient==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-mysqlclient==0.62b0",
},
{
"library": "pika >= 0.12.0",
- "instrumentation": "opentelemetry-instrumentation-pika==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-pika==0.62b0",
},
{
"library": "psycopg >= 3.1.0",
- "instrumentation": "opentelemetry-instrumentation-psycopg==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-psycopg==0.62b0",
},
{
"library": "psycopg2 >= 2.7.3.1",
- "instrumentation": "opentelemetry-instrumentation-psycopg2==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-psycopg2==0.62b0",
},
{
"library": "psycopg2-binary >= 2.7.3.1",
- "instrumentation": "opentelemetry-instrumentation-psycopg2==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-psycopg2==0.62b0",
},
{
"library": "pymemcache >= 1.3.5, < 5",
- "instrumentation": "opentelemetry-instrumentation-pymemcache==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-pymemcache==0.62b0",
},
{
"library": "pymongo >= 3.1, < 5.0",
- "instrumentation": "opentelemetry-instrumentation-pymongo==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-pymongo==0.62b0",
},
{
"library": "pymssql >= 2.1.5, < 3",
- "instrumentation": "opentelemetry-instrumentation-pymssql==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-pymssql==0.62b0",
},
{
"library": "PyMySQL < 2",
- "instrumentation": "opentelemetry-instrumentation-pymysql==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-pymysql==0.62b0",
},
{
"library": "pyramid >= 1.7",
- "instrumentation": "opentelemetry-instrumentation-pyramid==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-pyramid==0.62b0",
},
{
"library": "redis >= 2.6",
- "instrumentation": "opentelemetry-instrumentation-redis==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-redis==0.62b0",
},
{
"library": "remoulade >= 0.50",
- "instrumentation": "opentelemetry-instrumentation-remoulade==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-remoulade==0.62b0",
},
{
"library": "requests ~= 2.0",
- "instrumentation": "opentelemetry-instrumentation-requests==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-requests==0.62b0",
},
{
"library": "sqlalchemy >= 1.0.0, < 2.1.0",
- "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-sqlalchemy==0.62b0",
},
{
"library": "starlette >= 0.13",
- "instrumentation": "opentelemetry-instrumentation-starlette==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-starlette==0.62b0",
},
{
"library": "psutil >= 5",
- "instrumentation":
"opentelemetry-instrumentation-system-metrics==0.61b0",
+ "instrumentation":
"opentelemetry-instrumentation-system-metrics==0.62b0",
},
{
"library": "tornado >= 5.1.1",
- "instrumentation": "opentelemetry-instrumentation-tornado==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-tornado==0.62b0",
},
{
"library": "tortoise-orm >= 0.17.0",
- "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.62b0",
},
{
"library": "pydantic >= 1.10.2",
- "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-tortoiseorm==0.62b0",
},
{
"library": "urllib3 >= 1.0.0, < 3.0.0",
- "instrumentation": "opentelemetry-instrumentation-urllib3==0.61b0",
+ "instrumentation": "opentelemetry-instrumentation-urllib3==0.62b0",
},
]
default_instrumentations = [
- "opentelemetry-instrumentation-asyncio==0.61b0",
- "opentelemetry-instrumentation-dbapi==0.61b0",
- "opentelemetry-instrumentation-logging==0.61b0",
- "opentelemetry-instrumentation-sqlite3==0.61b0",
- "opentelemetry-instrumentation-threading==0.61b0",
- "opentelemetry-instrumentation-urllib==0.61b0",
- "opentelemetry-instrumentation-wsgi==0.61b0",
+ "opentelemetry-instrumentation-asyncio==0.62b0",
+ "opentelemetry-instrumentation-dbapi==0.62b0",
+ "opentelemetry-instrumentation-logging==0.62b0",
+ "opentelemetry-instrumentation-sqlite3==0.62b0",
+ "opentelemetry-instrumentation-threading==0.62b0",
+ "opentelemetry-instrumentation-urllib==0.62b0",
+ "opentelemetry-instrumentation-wsgi==0.62b0",
]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/utils.py
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/utils.py
---
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/utils.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/utils.py
2020-02-02 01:00:00.000000000 +0100
@@ -14,13 +14,18 @@
from __future__ import annotations
+import sys
import urllib.parse
from contextlib import contextmanager
from importlib import import_module
from re import escape, sub
from typing import Any, Dict, Generator, Sequence
-from wrapt import ObjectProxy
+try:
+ # wrapt 2.0.0+
+ from wrapt import BaseObjectProxy # pylint: disable=no-name-in-module
+except ImportError:
+ from wrapt import ObjectProxy as BaseObjectProxy
from opentelemetry import context, trace
@@ -99,6 +104,9 @@
raise ImportError(
f"Cannot parse '{obj}' as dotted import path"
) from exc
+ if module_path not in sys.modules:
+ # Was never imported, meaning it could never have been wrapped
+ return
module = import_module(module_path)
try:
obj = getattr(module, class_name)
@@ -108,7 +116,11 @@
) from exc
func = getattr(obj, attr, None)
- if func and isinstance(func, ObjectProxy) and hasattr(func, "__wrapped__"):
+ if (
+ func
+ and isinstance(func, BaseObjectProxy)
+ and hasattr(func, "__wrapped__")
+ ):
setattr(obj, attr, func.__wrapped__)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/version.py
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/version.py
---
old/opentelemetry_instrumentation-0.61b0/src/opentelemetry/instrumentation/version.py
2020-02-02 01:00:00.000000000 +0100
+++
new/opentelemetry_instrumentation-0.62b0/src/opentelemetry/instrumentation/version.py
2020-02-02 01:00:00.000000000 +0100
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.61b0"
+__version__ = "0.62b0"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_instrumentation-0.61b0/tests/test_semconv.py
new/opentelemetry_instrumentation-0.62b0/tests/test_semconv.py
--- old/opentelemetry_instrumentation-0.61b0/tests/test_semconv.py
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation-0.62b0/tests/test_semconv.py
2020-02-02 01:00:00.000000000 +0100
@@ -17,10 +17,14 @@
from unittest.mock import Mock, patch
from opentelemetry.instrumentation._semconv import (
+ _LEGACY_SCHEMA_VERSION,
OTEL_SEMCONV_STABILITY_OPT_IN,
+ _get_schema_url_for_signal_types,
+ _get_schema_version_for_opt_in_mode,
_OpenTelemetrySemanticConventionStability,
_OpenTelemetryStabilitySignalType,
_set_db_name,
+ _set_db_operation,
_set_db_statement,
_set_db_system,
_set_db_user,
@@ -29,12 +33,14 @@
)
from opentelemetry.semconv._incubating.attributes.db_attributes import (
DB_NAME,
+ DB_OPERATION,
DB_STATEMENT,
DB_SYSTEM,
DB_USER,
)
from opentelemetry.semconv.attributes.db_attributes import (
DB_NAMESPACE,
+ DB_OPERATION_NAME,
DB_QUERY_TEXT,
DB_SYSTEM_NAME,
)
@@ -188,6 +194,134 @@
)
+class TestOpenTelemetrySemConvSchemaUrl(TestCase):
+ @stability_mode("")
+ def test_get_schema_version_for_opt_in_mode_default(self):
+ version = _get_schema_version_for_opt_in_mode(
+ _OpenTelemetryStabilitySignalType.HTTP, _StabilityMode.DEFAULT
+ )
+ self.assertEqual(version, _LEGACY_SCHEMA_VERSION)
+
+ version = _get_schema_version_for_opt_in_mode(
+ _OpenTelemetryStabilitySignalType.DATABASE, _StabilityMode.DEFAULT
+ )
+ self.assertEqual(version, _LEGACY_SCHEMA_VERSION)
+
+ version = _get_schema_version_for_opt_in_mode(
+ _OpenTelemetryStabilitySignalType.GEN_AI, _StabilityMode.DEFAULT
+ )
+ self.assertEqual(version, _LEGACY_SCHEMA_VERSION)
+
+ @stability_mode("")
+ def test_get_schema_version_for_opt_in_mode_http_stable(self):
+ version = _get_schema_version_for_opt_in_mode(
+ _OpenTelemetryStabilitySignalType.HTTP, _StabilityMode.HTTP
+ )
+ self.assertEqual(version, "1.21.0")
+
+ @stability_mode("")
+ def test_get_schema_version_for_opt_in_mode_database_stable(self):
+ version = _get_schema_version_for_opt_in_mode(
+ _OpenTelemetryStabilitySignalType.DATABASE, _StabilityMode.DATABASE
+ )
+ self.assertEqual(version, "1.25.0")
+
+ @stability_mode("")
+ def test_get_schema_version_for_opt_in_mode_gen_ai_stable(self):
+ version = _get_schema_version_for_opt_in_mode(
+ _OpenTelemetryStabilitySignalType.GEN_AI,
+ _StabilityMode.GEN_AI_LATEST_EXPERIMENTAL,
+ )
+ self.assertEqual(version, "1.26.0")
+
+ @stability_mode("")
+ def test_get_schema_url_for_signal_types_single_http_default(self):
+ url = _get_schema_url_for_signal_types(
+ [_OpenTelemetryStabilitySignalType.HTTP]
+ )
+ self.assertEqual(
+ url, f"https://opentelemetry.io/schemas/{_LEGACY_SCHEMA_VERSION}"
+ )
+
+ @stability_mode("http")
+ def test_get_schema_url_for_signal_types_single_http_stable(self):
+ url = _get_schema_url_for_signal_types(
+ [_OpenTelemetryStabilitySignalType.HTTP]
+ )
+ self.assertEqual(url, "https://opentelemetry.io/schemas/1.21.0")
+
+ @stability_mode("database")
+ def test_get_schema_url_for_signal_types_single_database_stable(self):
+ url = _get_schema_url_for_signal_types(
+ [_OpenTelemetryStabilitySignalType.DATABASE]
+ )
+ self.assertEqual(url, "https://opentelemetry.io/schemas/1.25.0")
+
+ @stability_mode("http,database")
+ def test_get_schema_url_for_signal_types_multiple_both_stable(self):
+ # DATABASE has higher version (1.25.0) than HTTP (1.21.0)
+ url = _get_schema_url_for_signal_types(
+ [
+ _OpenTelemetryStabilitySignalType.HTTP,
+ _OpenTelemetryStabilitySignalType.DATABASE,
+ ]
+ )
+ self.assertEqual(url, "https://opentelemetry.io/schemas/1.25.0")
+
+ @stability_mode("http")
+ def test_get_schema_url_for_signal_types_mixed_modes(self):
+ # HTTP is stable (1.21.0), DATABASE is default (1.11.0)
+ # Should return HTTP version as it's higher
+ url = _get_schema_url_for_signal_types(
+ [
+ _OpenTelemetryStabilitySignalType.HTTP,
+ _OpenTelemetryStabilitySignalType.DATABASE,
+ ]
+ )
+ self.assertEqual(url, "https://opentelemetry.io/schemas/1.21.0")
+
+ @stability_mode("database")
+ def test_get_schema_url_for_signal_types_database_only_stable(self):
+ # DATABASE is stable (1.25.0), HTTP is default (1.11.0)
+ # Should return DATABASE version as it's highest
+ url = _get_schema_url_for_signal_types(
+ [
+ _OpenTelemetryStabilitySignalType.HTTP,
+ _OpenTelemetryStabilitySignalType.DATABASE,
+ ]
+ )
+ self.assertEqual(url, "https://opentelemetry.io/schemas/1.25.0")
+
+ @stability_mode("")
+ def test_get_schema_url_for_signal_types_empty_list(self):
+ url = _get_schema_url_for_signal_types([])
+ self.assertEqual(
+ url, f"https://opentelemetry.io/schemas/{_LEGACY_SCHEMA_VERSION}"
+ )
+
+ @stability_mode("http/dup,database/dup")
+ def test_get_schema_url_for_signal_types_dup_modes(self):
+ url = _get_schema_url_for_signal_types(
+ [
+ _OpenTelemetryStabilitySignalType.HTTP,
+ _OpenTelemetryStabilitySignalType.DATABASE,
+ ]
+ )
+ self.assertEqual(url, "https://opentelemetry.io/schemas/1.25.0")
+
+ @stability_mode("http,database,gen_ai_latest_experimental")
+ def test_get_schema_url_for_signal_types_with_gen_ai(self):
+ # GEN_AI should be highest at 1.26.0
+ url = _get_schema_url_for_signal_types(
+ [
+ _OpenTelemetryStabilitySignalType.HTTP,
+ _OpenTelemetryStabilitySignalType.DATABASE,
+ _OpenTelemetryStabilitySignalType.GEN_AI,
+ ]
+ )
+ self.assertEqual(url, "https://opentelemetry.io/schemas/1.26.0")
+
+
class TestOpenTelemetrySemConvStabilityHTTP(TestCase):
def test_set_status_for_non_http_code_with_recording_span(self):
span = Mock()
@@ -443,3 +577,45 @@
result = {}
_set_db_user(result, None, sem_conv_opt_in_mode=_StabilityMode.DEFAULT)
self.assertNotIn(DB_USER, result)
+
+ def test_db_operation_default(self):
+ result = {}
+ _set_db_operation(
+ result,
+ "SELECT",
+ sem_conv_opt_in_mode=_StabilityMode.DEFAULT,
+ )
+ self.assertIn(DB_OPERATION, result)
+ self.assertEqual(result[DB_OPERATION], "SELECT")
+ self.assertNotIn(DB_OPERATION_NAME, result)
+
+ def test_db_operation_database_stable(self):
+ result = {}
+ _set_db_operation(
+ result,
+ "SELECT",
+ sem_conv_opt_in_mode=_StabilityMode.DATABASE,
+ )
+ self.assertNotIn(DB_OPERATION, result)
+ self.assertIn(DB_OPERATION_NAME, result)
+ self.assertEqual(result[DB_OPERATION_NAME], "SELECT")
+
+ def test_db_operation_database_dup(self):
+ result = {}
+ _set_db_operation(
+ result,
+ "SELECT",
+ sem_conv_opt_in_mode=_StabilityMode.DATABASE_DUP,
+ )
+ self.assertIn(DB_OPERATION, result)
+ self.assertEqual(result[DB_OPERATION], "SELECT")
+ self.assertIn(DB_OPERATION_NAME, result)
+ self.assertEqual(result[DB_OPERATION_NAME], "SELECT")
+
+ def test_db_operation_none_value(self):
+ result = {}
+ _set_db_operation(
+ result, None, sem_conv_opt_in_mode=_StabilityMode.DEFAULT
+ )
+ self.assertNotIn(DB_OPERATION, result)
+ self.assertNotIn(DB_OPERATION_NAME, result)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/opentelemetry_instrumentation-0.61b0/tests/test_utils.py
new/opentelemetry_instrumentation-0.62b0/tests/test_utils.py
--- old/opentelemetry_instrumentation-0.61b0/tests/test_utils.py
2020-02-02 01:00:00.000000000 +0100
+++ new/opentelemetry_instrumentation-0.62b0/tests/test_utils.py
2020-02-02 01:00:00.000000000 +0100
@@ -12,10 +12,17 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+import sys
import unittest
from http import HTTPStatus
-from wrapt import ObjectProxy, wrap_function_wrapper
+from wrapt import wrap_function_wrapper
+
+try:
+ # wrapt 2.0.0+
+ from wrapt import BaseObjectProxy # pylint: disable=no-name-in-module
+except ImportError:
+ from wrapt import ObjectProxy as BaseObjectProxy
from opentelemetry.context import (
_SUPPRESS_HTTP_INSTRUMENTATION_KEY,
@@ -263,23 +270,23 @@
def test_can_unwrap_object_attribute(self):
self._wrap_method()
instance = WrappedClass()
- self.assertTrue(isinstance(instance.method, ObjectProxy))
+ self.assertTrue(isinstance(instance.method, BaseObjectProxy))
unwrap(WrappedClass, "method")
- self.assertFalse(isinstance(instance.method, ObjectProxy))
+ self.assertFalse(isinstance(instance.method, BaseObjectProxy))
def test_can_unwrap_object_attribute_as_string(self):
self._wrap_method()
instance = WrappedClass()
- self.assertTrue(isinstance(instance.method, ObjectProxy))
+ self.assertTrue(isinstance(instance.method, BaseObjectProxy))
unwrap("tests.test_utils.WrappedClass", "method")
- self.assertFalse(isinstance(instance.method, ObjectProxy))
+ self.assertFalse(isinstance(instance.method, BaseObjectProxy))
def test_raises_import_error_if_path_not_well_formed(self):
self._wrap_method()
instance = WrappedClass()
- self.assertTrue(isinstance(instance.method, ObjectProxy))
+ self.assertTrue(isinstance(instance.method, BaseObjectProxy))
with self.assertRaisesRegex(
ImportError, "Cannot parse '' as dotted import path"
@@ -287,23 +294,31 @@
unwrap("", "method")
unwrap(WrappedClass, "method")
- self.assertFalse(isinstance(instance.method, ObjectProxy))
+ self.assertFalse(isinstance(instance.method, BaseObjectProxy))
+
+ def test_noop_if_module_not_imported(self):
+ # A module that exists but hasn't been imported, treated
+ # as no-op.
+ self.assertNotIn("email.generator", sys.modules)
+ unwrap("email.generator.BytesGenerator", "flatten")
+ self.assertNotIn("email.generator", sys.modules)
- def test_raises_import_error_if_cannot_find_module(self):
+ def test_noop_if_cannot_find_module(self):
self._wrap_method()
instance = WrappedClass()
- self.assertTrue(isinstance(instance.method, ObjectProxy))
+ self.assertTrue(isinstance(instance.method, BaseObjectProxy))
- with self.assertRaisesRegex(ImportError, "No module named 'does'"):
- unwrap("does.not.exist.WrappedClass", "method")
+ # Treated same as an existing module that hasn't been imported,
+ # as a no-op.
+ unwrap("does.not.exist.WrappedClass", "method")
unwrap(WrappedClass, "method")
- self.assertFalse(isinstance(instance.method, ObjectProxy))
+ self.assertFalse(isinstance(instance.method, BaseObjectProxy))
def test_raises_import_error_if_cannot_find_object(self):
self._wrap_method()
instance = WrappedClass()
- self.assertTrue(isinstance(instance.method, ObjectProxy))
+ self.assertTrue(isinstance(instance.method, BaseObjectProxy))
with self.assertRaisesRegex(
ImportError, "Cannot import 'NotWrappedClass' from"
@@ -311,7 +326,7 @@
unwrap("tests.test_utils.NotWrappedClass", "method")
unwrap(WrappedClass, "method")
- self.assertFalse(isinstance(instance.method, ObjectProxy))
+ self.assertFalse(isinstance(instance.method, BaseObjectProxy))
# pylint: disable=no-self-use
def test_does_nothing_if_cannot_find_attribute(self):
@@ -320,6 +335,6 @@
def test_does_nothing_if_attribute_is_not_from_wrapt(self):
instance = WrappedClass()
- self.assertFalse(isinstance(instance.method, ObjectProxy))
+ self.assertFalse(isinstance(instance.method, BaseObjectProxy))
unwrap(WrappedClass, "method")
- self.assertFalse(isinstance(instance.method, ObjectProxy))
+ self.assertFalse(isinstance(instance.method, BaseObjectProxy))