From 06b0414fab52e9771182ffbc7ff93c572f920515 Mon Sep 17 00:00:00 2001 From: Matthew Wimpelberg <120263653+mwimpelberg28@users.noreply.github.com> Date: Mon, 15 Jun 2026 06:33:14 -0400 Subject: [PATCH 1/4] opentelemetry-test-utils: skip weaver tests on PyPy (#5176) The weaver binary's gRPC C core crashes with SIGABRT (exit code -6) on PyPy due to an epoll_wait EBADF error in ev_epoll1_linux.cc. This is a known incompatibility between gRPC's epoll1 event engine and PyPy subprocesses that cannot be fixed from the Python side. Skip both weaver test classes on PyPy, consistent with how other gRPC-dependent tests are excluded from PyPy in this repo. Assisted-by: Claude Sonnet 4.6 --- .../tests/test_weaver_live_check.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py b/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py index 8275d281ee..792654dec3 100644 --- a/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py +++ b/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py @@ -8,6 +8,7 @@ """ import os +import platform import shutil import unittest @@ -41,6 +42,11 @@ def _make_provider(otlp_endpoint: str) -> TracerProvider: return provider +@unittest.skipIf( + platform.python_implementation() == "PyPy", + "weaver tests are skipped on PyPy: the weaver binary's gRPC C core crashes with " + "epoll_wait EBADF under PyPy subprocesses (see issue #5176)", +) @unittest.skipUnless( _HAS_GRPC, "grpc exporter not installed", @@ -164,6 +170,11 @@ def test_report_span_statistics(self): ) +@unittest.skipIf( + platform.python_implementation() == "PyPy", + "weaver tests are skipped on PyPy: the weaver binary's gRPC C core crashes with " + "epoll_wait EBADF under PyPy subprocesses (see issue #5176)", +) @unittest.skipUnless( _HAS_GRPC, "grpc exporter not installed", From 4c9f24e7cf855519f1152f9bb4349ed3722f9c43 Mon Sep 17 00:00:00 2001 From: Matthew Wimpelberg <120263653+mwimpelberg28@users.noreply.github.com> Date: Mon, 15 Jun 2026 07:59:21 -0400 Subject: [PATCH 2/4] opentelemetry-test-utils: enable weaver tests on PyPy (#5176) Weaver switched from gRPC C core to tonic (pure Rust) for its OTLP server, so the epoll_wait EBADF crash that caused test flakiness on PyPy no longer occurs. Verified by running the full weaver test suite on PyPy 3.10 with grpcio compiled from source. Remove the `platform_python_implementation != 'PyPy'` exclusions from test-requirements.txt and the PyPy skip decorators added as a workaround, so the weaver integration tests now run on PyPy as well. Assisted-by: Claude Sonnet 4.6 --- tests/opentelemetry-test-utils/test-requirements.txt | 9 ++++----- .../tests/test_weaver_live_check.py | 11 ----------- tox.ini | 1 + 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/tests/opentelemetry-test-utils/test-requirements.txt b/tests/opentelemetry-test-utils/test-requirements.txt index 7cb9414f47..9717472923 100644 --- a/tests/opentelemetry-test-utils/test-requirements.txt +++ b/tests/opentelemetry-test-utils/test-requirements.txt @@ -11,8 +11,7 @@ wrapt==1.16.0 -e opentelemetry-sdk -e opentelemetry-semantic-conventions -e tests/opentelemetry-test-utils -# these are required for weaver integration tests, we're running that only on linux / CPython -# because of lack of support for gRPC wheels on some platforms -./opentelemetry-proto ; platform_python_implementation != 'PyPy' -./exporter/opentelemetry-exporter-otlp-proto-common ; platform_python_implementation != 'PyPy' -./exporter/opentelemetry-exporter-otlp-proto-grpc ; platform_python_implementation != 'PyPy' +# these are required for weaver integration tests +./opentelemetry-proto +./exporter/opentelemetry-exporter-otlp-proto-common +./exporter/opentelemetry-exporter-otlp-proto-grpc diff --git a/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py b/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py index 792654dec3..8275d281ee 100644 --- a/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py +++ b/tests/opentelemetry-test-utils/tests/test_weaver_live_check.py @@ -8,7 +8,6 @@ """ import os -import platform import shutil import unittest @@ -42,11 +41,6 @@ def _make_provider(otlp_endpoint: str) -> TracerProvider: return provider -@unittest.skipIf( - platform.python_implementation() == "PyPy", - "weaver tests are skipped on PyPy: the weaver binary's gRPC C core crashes with " - "epoll_wait EBADF under PyPy subprocesses (see issue #5176)", -) @unittest.skipUnless( _HAS_GRPC, "grpc exporter not installed", @@ -170,11 +164,6 @@ def test_report_span_statistics(self): ) -@unittest.skipIf( - platform.python_implementation() == "PyPy", - "weaver tests are skipped on PyPy: the weaver binary's gRPC C core crashes with " - "epoll_wait EBADF under PyPy subprocesses (see issue #5176)", -) @unittest.skipUnless( _HAS_GRPC, "grpc exporter not installed", diff --git a/tox.ini b/tox.ini index 5ebf34c3f3..2f82c2e3a1 100644 --- a/tox.ini +++ b/tox.ini @@ -98,6 +98,7 @@ envlist = lint-opentelemetry-propagator-jaeger ; skip py314t until grpc gets wheels for it or we stop using grpc exporter in weaver tests + ; pypy3 works: weaver now uses tonic (pure Rust), no grpc C core crash (see issue #5176) py3{10,11,12,13,14}-test-opentelemetry-test-utils pypy3-test-opentelemetry-test-utils lint-opentelemetry-test-utils From a359daad77a5a0c46ddc38cd0d799534dafef18f Mon Sep 17 00:00:00 2001 From: Matthew Wimpelberg <120263653+mwimpelberg28@users.noreply.github.com> Date: Tue, 16 Jun 2026 15:07:14 -0400 Subject: [PATCH 3/4] opentelemetry-test-utils: scope PyPy weaver tests to Linux only grpcio has no PyPy wheel and the gRPC C core fails to build from source with MSVC on Windows PyPy, so the previous "remove all PyPy exclusions" change broke the Windows PyPy job. Gate the grpc deps off on PyPy+Windows only; the weaver tests skip there via the existing _HAS_GRPC guard while still running on Linux PyPy. Assisted-by: Claude Opus 4.8 (1M context) --- tests/opentelemetry-test-utils/test-requirements.txt | 8 +++++--- tox.ini | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/opentelemetry-test-utils/test-requirements.txt b/tests/opentelemetry-test-utils/test-requirements.txt index 9717472923..d7a3264c49 100644 --- a/tests/opentelemetry-test-utils/test-requirements.txt +++ b/tests/opentelemetry-test-utils/test-requirements.txt @@ -12,6 +12,8 @@ wrapt==1.16.0 -e opentelemetry-semantic-conventions -e tests/opentelemetry-test-utils # these are required for weaver integration tests -./opentelemetry-proto -./exporter/opentelemetry-exporter-otlp-proto-common -./exporter/opentelemetry-exporter-otlp-proto-grpc +# excluded on PyPy + Windows: there's no grpcio PyPy wheel and the gRPC C core +# fails to build from source with MSVC (test skips via _HAS_GRPC guard) +./opentelemetry-proto ; platform_python_implementation != 'PyPy' or platform_system != 'Windows' +./exporter/opentelemetry-exporter-otlp-proto-common ; platform_python_implementation != 'PyPy' or platform_system != 'Windows' +./exporter/opentelemetry-exporter-otlp-proto-grpc ; platform_python_implementation != 'PyPy' or platform_system != 'Windows' diff --git a/tox.ini b/tox.ini index 91258b97e2..857bb82120 100644 --- a/tox.ini +++ b/tox.ini @@ -106,7 +106,9 @@ envlist = lint-opentelemetry-propagator-jaeger ; skip py314t until grpc gets wheels for it or we stop using grpc exporter in weaver tests - ; pypy3 works: weaver now uses tonic (pure Rust), no grpc C core crash (see issue #5176) + ; pypy3 runs the weaver tests on Linux only: weaver now uses tonic (pure Rust), so the + ; grpc C core crash is gone (see issue #5176), but grpcio still has no PyPy wheel and won't + ; build from source on Windows — there the weaver tests skip via the _HAS_GRPC guard py3{10,11,12,13,14}-test-opentelemetry-test-utils pypy3-test-opentelemetry-test-utils lint-opentelemetry-test-utils From 6254e798a7794fb8498ce19214acc622f42d1d2a Mon Sep 17 00:00:00 2001 From: Matthew Wimpelberg <120263653+mwimpelberg28@users.noreply.github.com> Date: Thu, 18 Jun 2026 14:20:10 -0400 Subject: [PATCH 4/4] opentelemetry-sdk: expose SynchronousMultiLogRecordProcessor and ConcurrentMultiLogRecordProcessor publicly Fixes #5312 Assisted-by: Claude Sonnet 4.6 --- .../src/opentelemetry/sdk/_logs/__init__.py | 4 ++++ .../tests/logs/test_multi_log_processor.py | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py index 37d47045c1..c0798cc2cc 100644 --- a/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py +++ b/opentelemetry-sdk/src/opentelemetry/sdk/_logs/__init__.py @@ -2,6 +2,7 @@ # SPDX-License-Identifier: Apache-2.0 from opentelemetry.sdk._logs._internal import ( + ConcurrentMultiLogRecordProcessor, LogDroppedAttributesWarning, Logger, LoggerProvider, @@ -12,9 +13,11 @@ LogRecordProcessor, ReadableLogRecord, ReadWriteLogRecord, + SynchronousMultiLogRecordProcessor, ) __all__ = [ + "ConcurrentMultiLogRecordProcessor", "Logger", "LoggerProvider", "LoggingHandler", @@ -25,4 +28,5 @@ "LogRecordDroppedAttributesWarning", "ReadableLogRecord", "ReadWriteLogRecord", + "SynchronousMultiLogRecordProcessor", ] diff --git a/opentelemetry-sdk/tests/logs/test_multi_log_processor.py b/opentelemetry-sdk/tests/logs/test_multi_log_processor.py index 1bc1d4faae..f0a8e6e6fa 100644 --- a/opentelemetry-sdk/tests/logs/test_multi_log_processor.py +++ b/opentelemetry-sdk/tests/logs/test_multi_log_processor.py @@ -46,6 +46,18 @@ def force_flush(self, timeout_millis=30000): return True +class TestPublicApi(unittest.TestCase): + def test_synchronous_multi_log_record_processor_is_public(self): + from opentelemetry.sdk._logs import ( # noqa: F401 + SynchronousMultiLogRecordProcessor, + ) + + def test_concurrent_multi_log_record_processor_is_public(self): + from opentelemetry.sdk._logs import ( # noqa: F401 + ConcurrentMultiLogRecordProcessor, + ) + + class TestLogRecordProcessor(unittest.TestCase): def test_log_record_processor(self): provider = LoggerProvider()