From 59e261784fc2ec0bfa41da894eae855799728655 Mon Sep 17 00:00:00 2001 From: srikaaviya Date: Tue, 24 Feb 2026 15:05:49 -0800 Subject: [PATCH 1/7] Bump pylint to 4.0.5 to fix Python 3.14 concurrent.futures false positives --- .pylintrc | 2 +- CHANGELOG.md | 2 ++ dev-requirements.txt | 2 +- .../tests/test_asyncio_run_coroutine_threadsafe.py | 4 +--- .../tests/test_threading.py | 4 +--- .../src/opentelemetry/util/genai/_upload/completion_hook.py | 2 +- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.pylintrc b/.pylintrc index e51f6f43bd..da93151d56 100644 --- a/.pylintrc +++ b/.pylintrc @@ -39,7 +39,7 @@ persistent=yes # When enabled, pylint would attempt to guess common misconfiguration and emit # user-friendly hints instead of false-positive error messages. -suggestion-mode=yes + # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e01dbe8bc..ee20e911ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#4139](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4139)) ### Fixed +- Bump `pylint` to `4.0.5` to fix false-positive `no-name-in-module` errors for `concurrent.futures` imports on Python 3.14, and remove deprecated `suggestion-mode` option from `.pylintrc`. + ([#4244](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4244)) - `opentelemetry-instrumentation-mysql`: Refactor MySQL integration test mocks to use concrete DBAPI connection attributes, reducing noisy attribute type warnings. ([#4116](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4116)) - `opentelemetry-instrumentation-cassandra`: Use `_instruments_any` instead of `_instruments` for driver dependencies so that having either `cassandra-driver` or `scylla-driver` installed is sufficient diff --git a/dev-requirements.txt b/dev-requirements.txt index b2de8cecfc..8a068a853f 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -1,4 +1,4 @@ -pylint==3.0.2 +pylint==4.0.5 httpretty==1.1.4 pyright==v1.1.404 sphinx==7.1.2 diff --git a/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_run_coroutine_threadsafe.py b/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_run_coroutine_threadsafe.py index d612076dbf..fdf4bcb353 100644 --- a/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_run_coroutine_threadsafe.py +++ b/instrumentation/opentelemetry-instrumentation-asyncio/tests/test_asyncio_run_coroutine_threadsafe.py @@ -13,9 +13,7 @@ # limitations under the License. import asyncio import threading -from concurrent.futures import ( # pylint: disable=no-name-in-module; TODO #4199 - ThreadPoolExecutor, -) +from concurrent.futures import ThreadPoolExecutor from unittest.mock import patch # pylint: disable=no-name-in-module diff --git a/instrumentation/opentelemetry-instrumentation-threading/tests/test_threading.py b/instrumentation/opentelemetry-instrumentation-threading/tests/test_threading.py index ad4bcaf019..0ba5353450 100644 --- a/instrumentation/opentelemetry-instrumentation-threading/tests/test_threading.py +++ b/instrumentation/opentelemetry-instrumentation-threading/tests/test_threading.py @@ -13,9 +13,7 @@ # limitations under the License. import threading -from concurrent.futures import ( # pylint: disable=no-name-in-module; TODO #4199 - ThreadPoolExecutor, -) +from concurrent.futures import ThreadPoolExecutor from typing import List from unittest.mock import MagicMock, patch diff --git a/util/opentelemetry-util-genai/src/opentelemetry/util/genai/_upload/completion_hook.py b/util/opentelemetry-util-genai/src/opentelemetry/util/genai/_upload/completion_hook.py index 4f22861396..4ee1dcdf37 100644 --- a/util/opentelemetry-util-genai/src/opentelemetry/util/genai/_upload/completion_hook.py +++ b/util/opentelemetry-util-genai/src/opentelemetry/util/genai/_upload/completion_hook.py @@ -22,7 +22,7 @@ import posixpath import threading from collections import OrderedDict -from concurrent.futures import ( # pylint: disable=no-name-in-module; TODO #4199 +from concurrent.futures import ( Future, ThreadPoolExecutor, ) From d5bdb2ec26734f564c0eb238ce6bf33c3eaa4880 Mon Sep 17 00:00:00 2001 From: srikaaviya Date: Fri, 13 Mar 2026 04:38:22 -0700 Subject: [PATCH 2/7] Fix too-many-positional-arguments pylint failures - Add max-positional-arguments=10, Add pylint: disable=too-many-positional-arguments to functions that legitimately exceed the limit --- .pylintrc | 3 +++ .../src/opentelemetry/instrumentation/asgi/__init__.py | 2 +- .../tests/bedrock_utils.py | 1 + .../src/opentelemetry/instrumentation/dbapi/__init__.py | 3 +++ .../src/opentelemetry/instrumentation/fastapi/__init__.py | 2 +- .../src/opentelemetry/instrumentation/httpx/__init__.py | 4 ++-- .../src/opentelemetry/instrumentation/tornado/client.py | 2 +- .../src/opentelemetry/instrumentation/urllib3/__init__.py | 3 ++- .../sdk/extension/aws/trace/sampler/_sampling_rule.py | 2 +- 9 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.pylintrc b/.pylintrc index b3d2005c8c..a30c78a199 100644 --- a/.pylintrc +++ b/.pylintrc @@ -463,6 +463,9 @@ valid-metaclass-classmethod-first-arg=cls # Maximum number of arguments for function / method. max-args=5 +# Maximum number of positional arguments for function / method. +max-positional-arguments=10 + # Maximum number of attributes for a class (see R0902). max-attributes=7 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 59c5083ada..963b2cd177 100644 --- a/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-asgi/src/opentelemetry/instrumentation/asgi/__init__.py @@ -583,7 +583,7 @@ class OpenTelemetryMiddleware: exclude_spans: Optionally exclude HTTP `send` and/or `receive` spans from the trace. """ - # pylint: disable=too-many-branches + # pylint: disable=too-many-branches,too-many-positional-arguments def __init__( self, app, diff --git a/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py b/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py index cd357f9597..ce9770859c 100644 --- a/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py +++ b/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py @@ -210,6 +210,7 @@ def assert_equal_or_not_present(value, attribute_name, span): assert attribute_name not in span.attributes, attribute_name +# pylint: disable=too-many-positional-arguments def assert_all_attributes( span: ReadableSpan, request_model: str, diff --git a/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py b/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py index 9eb386b0ea..3a6d9998dd 100644 --- a/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py @@ -259,6 +259,7 @@ def trace_integration( ) +# pylint: disable=too-many-positional-arguments def wrap_connect( name: str, connect_module: Callable[..., Any], @@ -339,6 +340,7 @@ def unwrap_connect( unwrap(connect_module, connect_method_name) +# pylint: disable=too-many-positional-arguments def instrument_connection( name: str, connection: ConnectionT | TracedConnectionProxy[ConnectionT], @@ -420,6 +422,7 @@ def uninstrument_connection( class DatabaseApiIntegration: + # pylint: disable=too-many-positional-arguments def __init__( self, name: str, 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 7de11cab8d..56c62ac02d 100644 --- a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py @@ -244,7 +244,7 @@ def instrument_app( 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, - ): # pylint: disable=too-many-locals + ): # pylint: disable=too-many-locals,too-many-positional-arguments """Instrument an uninstrumented FastAPI application. Args: 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 882552d09b..15894de8a7 100644 --- a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py @@ -1220,7 +1220,7 @@ def _uninstrument(self, **kwargs: typing.Any): unwrap(httpx.AsyncHTTPTransport, "handle_async_request") @staticmethod - def _handle_request_wrapper( # pylint: disable=too-many-locals + def _handle_request_wrapper( # pylint: disable=too-many-locals,too-many-positional-arguments wrapped: typing.Callable[..., typing.Any], instance: httpx.HTTPTransport, args: tuple[typing.Any, ...], @@ -1351,7 +1351,7 @@ def _handle_request_wrapper( # pylint: disable=too-many-locals return response @staticmethod - async def _handle_async_request_wrapper( # pylint: disable=too-many-locals + async def _handle_async_request_wrapper( # pylint: disable=too-many-locals,too-many-positional-arguments wrapped: typing.Callable[..., typing.Awaitable[typing.Any]], instance: httpx.AsyncHTTPTransport, args: tuple[typing.Any, ...], 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 e53a363bf6..b857b90446 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py @@ -59,7 +59,7 @@ def _normalize_request(args, kwargs): return (new_args, new_kwargs) -def fetch_async( # pylint: disable=too-many-locals +def fetch_async( # pylint: disable=too-many-locals,too-many-positional-arguments tracer, request_hook, response_hook, 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 5c833a4720..9429175fd3 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py @@ -424,7 +424,7 @@ def _get_span_name(method: str) -> str: return method -# pylint: disable=too-many-locals +# pylint: disable=too-many-locals,too-many-positional-arguments def _instrument( tracer: Tracer, duration_histogram_old: Histogram, @@ -687,6 +687,7 @@ def _filter_attributes_semconv( return (duration_attrs_old, duration_attrs_new) +# pylint: disable=too-many-positional-arguments def _record_metrics( metric_attributes: dict, duration_histogram_old: Histogram, diff --git a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/trace/sampler/_sampling_rule.py b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/trace/sampler/_sampling_rule.py index fd99b2a87f..0ee531017e 100644 --- a/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/trace/sampler/_sampling_rule.py +++ b/sdk-extension/opentelemetry-sdk-extension-aws/src/opentelemetry/sdk/extension/aws/trace/sampler/_sampling_rule.py @@ -20,7 +20,7 @@ # Disable snake_case naming style so this class can match the sampling rules response from X-Ray -# pylint: disable=invalid-name +# pylint: disable=invalid-name,too-many-positional-arguments class _SamplingRule: def __init__( self, From 09d2f879299ab79d76708a9a7c7acbadc12e148e Mon Sep 17 00:00:00 2001 From: srikaaviya Date: Sat, 14 Mar 2026 05:22:44 -0700 Subject: [PATCH 3/7] Bump max-positional-arguments to 12 and remove unnecessary disable comments --- .pylintrc | 2 +- .../tests/bedrock_utils.py | 1 - .../src/opentelemetry/instrumentation/dbapi/__init__.py | 3 --- .../src/opentelemetry/instrumentation/fastapi/__init__.py | 2 +- .../src/opentelemetry/instrumentation/httpx/__init__.py | 4 ++-- .../src/opentelemetry/instrumentation/tornado/client.py | 2 +- .../src/opentelemetry/instrumentation/urllib3/__init__.py | 1 - 7 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.pylintrc b/.pylintrc index a30c78a199..5d3e4dc8d4 100644 --- a/.pylintrc +++ b/.pylintrc @@ -464,7 +464,7 @@ valid-metaclass-classmethod-first-arg=cls max-args=5 # Maximum number of positional arguments for function / method. -max-positional-arguments=10 +max-positional-arguments=12 # Maximum number of attributes for a class (see R0902). max-attributes=7 diff --git a/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py b/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py index ce9770859c..cd357f9597 100644 --- a/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py +++ b/instrumentation/opentelemetry-instrumentation-botocore/tests/bedrock_utils.py @@ -210,7 +210,6 @@ def assert_equal_or_not_present(value, attribute_name, span): assert attribute_name not in span.attributes, attribute_name -# pylint: disable=too-many-positional-arguments def assert_all_attributes( span: ReadableSpan, request_model: str, diff --git a/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py b/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py index 3a6d9998dd..9eb386b0ea 100644 --- a/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-dbapi/src/opentelemetry/instrumentation/dbapi/__init__.py @@ -259,7 +259,6 @@ def trace_integration( ) -# pylint: disable=too-many-positional-arguments def wrap_connect( name: str, connect_module: Callable[..., Any], @@ -340,7 +339,6 @@ def unwrap_connect( unwrap(connect_module, connect_method_name) -# pylint: disable=too-many-positional-arguments def instrument_connection( name: str, connection: ConnectionT | TracedConnectionProxy[ConnectionT], @@ -422,7 +420,6 @@ def uninstrument_connection( class DatabaseApiIntegration: - # pylint: disable=too-many-positional-arguments def __init__( self, name: str, 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 56c62ac02d..7de11cab8d 100644 --- a/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-fastapi/src/opentelemetry/instrumentation/fastapi/__init__.py @@ -244,7 +244,7 @@ def instrument_app( 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, - ): # pylint: disable=too-many-locals,too-many-positional-arguments + ): # pylint: disable=too-many-locals """Instrument an uninstrumented FastAPI application. Args: 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 15894de8a7..882552d09b 100644 --- a/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-httpx/src/opentelemetry/instrumentation/httpx/__init__.py @@ -1220,7 +1220,7 @@ def _uninstrument(self, **kwargs: typing.Any): unwrap(httpx.AsyncHTTPTransport, "handle_async_request") @staticmethod - def _handle_request_wrapper( # pylint: disable=too-many-locals,too-many-positional-arguments + def _handle_request_wrapper( # pylint: disable=too-many-locals wrapped: typing.Callable[..., typing.Any], instance: httpx.HTTPTransport, args: tuple[typing.Any, ...], @@ -1351,7 +1351,7 @@ def _handle_request_wrapper( # pylint: disable=too-many-locals,too-many-positio return response @staticmethod - async def _handle_async_request_wrapper( # pylint: disable=too-many-locals,too-many-positional-arguments + async def _handle_async_request_wrapper( # pylint: disable=too-many-locals wrapped: typing.Callable[..., typing.Awaitable[typing.Any]], instance: httpx.AsyncHTTPTransport, args: tuple[typing.Any, ...], 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 b857b90446..e53a363bf6 100644 --- a/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py +++ b/instrumentation/opentelemetry-instrumentation-tornado/src/opentelemetry/instrumentation/tornado/client.py @@ -59,7 +59,7 @@ def _normalize_request(args, kwargs): return (new_args, new_kwargs) -def fetch_async( # pylint: disable=too-many-locals,too-many-positional-arguments +def fetch_async( # pylint: disable=too-many-locals tracer, request_hook, response_hook, 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 9429175fd3..0c92b6b6b8 100644 --- a/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py +++ b/instrumentation/opentelemetry-instrumentation-urllib3/src/opentelemetry/instrumentation/urllib3/__init__.py @@ -687,7 +687,6 @@ def _filter_attributes_semconv( return (duration_attrs_old, duration_attrs_new) -# pylint: disable=too-many-positional-arguments def _record_metrics( metric_attributes: dict, duration_histogram_old: Histogram, From 888c80b8da88016149dadaa6d535454c5f9de4ce Mon Sep 17 00:00:00 2001 From: srikaaviya Date: Tue, 17 Mar 2026 16:07:24 -0700 Subject: [PATCH 4/7] Address review comments: fix CHANGELOG, remove stale pylintrc comment, add openai-agents disable --- .pylintrc | 2 -- CHANGELOG.md | 4 ++-- .../instrumentation/openai_agents/span_processor.py | 1 + 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.pylintrc b/.pylintrc index 5d3e4dc8d4..698b24848c 100644 --- a/.pylintrc +++ b/.pylintrc @@ -37,8 +37,6 @@ persistent=yes # Specify a configuration file. #rcfile= -# When enabled, pylint would attempt to guess common misconfiguration and emit -# user-friendly hints instead of false-positive error messages. # Allow loading of arbitrary C extensions. Extensions are imported into the diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f61b7a791..c312dbca86 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#4305](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4305)) - Don't import module in unwrap if not already imported ([#4321](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4321)) +- Bump `pylint` to `4.0.5` to fix false-positive `no-name-in-module` errors for `concurrent.futures` imports on Python 3.14, and remove deprecated `suggestion-mode` option from `.pylintrc`. + ([#4244](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4244)) ### Breaking changes @@ -86,8 +88,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#4220](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4220)) ### Fixed -- Bump `pylint` to `4.0.5` to fix false-positive `no-name-in-module` errors for `concurrent.futures` imports on Python 3.14, and remove deprecated `suggestion-mode` option from `.pylintrc`. - ([#4244](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4244)) - `opentelemetry-instrumentation-flask`: Align `http.server.active_requests` initialization with semantic convention helpers to ensure consistent names, units, and descriptions. ([#4094](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4094)) - `opentelemetry-instrumentation-asyncio`: Fix environment variables not appearing in Read the Docs documentation diff --git a/instrumentation-genai/opentelemetry-instrumentation-openai-agents-v2/src/opentelemetry/instrumentation/openai_agents/span_processor.py b/instrumentation-genai/opentelemetry-instrumentation-openai-agents-v2/src/opentelemetry/instrumentation/openai_agents/span_processor.py index 74be663701..55539a4931 100644 --- a/instrumentation-genai/opentelemetry-instrumentation-openai-agents-v2/src/opentelemetry/instrumentation/openai_agents/span_processor.py +++ b/instrumentation-genai/opentelemetry-instrumentation-openai-agents-v2/src/opentelemetry/instrumentation/openai_agents/span_processor.py @@ -426,6 +426,7 @@ def get_span_name( class GenAISemanticProcessor(TracingProcessor): """Trace processor adding GenAI semantic convention attributes with metrics.""" + # pylint: disable=too-many-positional-arguments def __init__( self, tracer: Optional[Tracer] = None, From 18eaede36cc7a41128582019a3f2b6612d23b0c6 Mon Sep 17 00:00:00 2001 From: srikaaviya Date: Thu, 19 Mar 2026 04:34:05 -0700 Subject: [PATCH 5/7] Fix formatting: restore blank line in CHANGELOG and remove extra blank line in .pylintrc --- .pylintrc | 2 -- CHANGELOG.md | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pylintrc b/.pylintrc index 698b24848c..df3c585923 100644 --- a/.pylintrc +++ b/.pylintrc @@ -37,8 +37,6 @@ persistent=yes # Specify a configuration file. #rcfile= - - # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no diff --git a/CHANGELOG.md b/CHANGELOG.md index c312dbca86..0c2be19183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ([#4220](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4220)) ### Fixed + - `opentelemetry-instrumentation-flask`: Align `http.server.active_requests` initialization with semantic convention helpers to ensure consistent names, units, and descriptions. ([#4094](https://github.com/open-telemetry/opentelemetry-python-contrib/pull/4094)) - `opentelemetry-instrumentation-asyncio`: Fix environment variables not appearing in Read the Docs documentation From 0a0e7fa4ec5b11b68d7c854ff82dfcfa0349f720 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Fri, 10 Apr 2026 10:50:14 +0200 Subject: [PATCH 6/7] Update processor.py --- .../src/opentelemetry/processor/baggage/processor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/processor.py b/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/processor.py index 7e09e591e0..d28cc1e68d 100644 --- a/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/processor.py +++ b/processor/opentelemetry-processor-baggage/src/opentelemetry/processor/baggage/processor.py @@ -23,7 +23,7 @@ BaggageKeyPredicateT = Callable[[str], bool] # A BaggageKeyPredicate that always returns True, allowing all baggage keys to be added to spans -ALLOW_ALL_BAGGAGE_KEYS: BaggageKeyPredicateT = lambda _: True # noqa: E731 +ALLOW_ALL_BAGGAGE_KEYS: BaggageKeyPredicateT = lambda _: True # noqa: E731 # pylint:disable=invalid-name class BaggageSpanProcessor(SpanProcessor): From 98144276ef518ad8db85cc855fdef690c906717a Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Fri, 10 Apr 2026 10:52:35 +0200 Subject: [PATCH 7/7] Update test_botocore_bedrock.py --- .../tests/test_botocore_bedrock.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_bedrock.py b/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_bedrock.py index ef0146314f..bf8a2ac242 100644 --- a/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_bedrock.py +++ b/instrumentation/opentelemetry-instrumentation-botocore/tests/test_botocore_bedrock.py @@ -1487,7 +1487,6 @@ def test_invoke_model_with_content( finish_reason = "length" else: pytest.xfail("model family not handled: {model_family}") - return assert_message_in_logs(logs[0], "gen_ai.user.message", user_content, span) @@ -1628,7 +1627,6 @@ def test_invoke_model_with_content_different_events( choice_content = [{"type": "text", "text": "This is a test"}] else: pytest.xfail("llm_model_value not handled: {llm_model_value}") - return body = get_invoke_model_body( llm_model_value, @@ -2070,7 +2068,6 @@ def test_invoke_model_with_content_tool_call( llm_model_config = AnthropicClaudeModel else: pytest.xfail("model family not handled: {model_family}") - return invoke_model_tool_call( span_exporter, @@ -2156,7 +2153,6 @@ def test_invoke_model_no_content( finish_reason = "length" else: pytest.xfail("model family not handled: {model_family}") - return choice_body = { "index": 0, @@ -2190,7 +2186,6 @@ def test_invoke_model_no_content_different_events( finish_reason = "end_turn" else: pytest.xfail("llm_model_value not handled: {llm_model_value}") - return body = get_invoke_model_body( llm_model_value, @@ -2246,7 +2241,6 @@ def test_invoke_model_no_content_tool_call( llm_model_config = AnthropicClaudeModel else: pytest.xfail("model family not handled: {model_family}") - return invoke_model_tool_call( span_exporter, @@ -2401,7 +2395,6 @@ def test_invoke_model_with_response_stream_with_content( } else: pytest.xfail("model family not handled: {model_family}") - return choice_body = { "index": 0, @@ -2437,7 +2430,6 @@ def test_invoke_model_with_response_stream_with_content_different_events( choice_content = [{"text": "This is a test", "type": "text"}] else: pytest.xfail("llm_model_value not handled: {llm_model_value}") - return max_tokens = 10 body = get_invoke_model_body( @@ -2672,7 +2664,6 @@ def test_invoke_model_with_response_stream_with_content_tool_call( llm_model_config = AnthropicClaudeModel else: pytest.xfail("model family not handled: {model_family}") - return invoke_model_with_response_stream_tool_call( span_exporter, @@ -2801,7 +2792,6 @@ def test_invoke_model_with_response_stream_no_content_different_events( finish_reason = "end_turn" else: pytest.xfail("llm_model_value not handled: {llm_model_value}") - return max_tokens = 10 body = get_invoke_model_body( @@ -2864,7 +2854,6 @@ def test_invoke_model_with_response_stream_no_content_tool_call( llm_model_config = AnthropicClaudeModel else: pytest.xfail("model family not handled: {model_family}") - return invoke_model_with_response_stream_tool_call( span_exporter,