You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(telemetry): wait for background exporter threads on client shutdown #2273
OTelTelemetryClient shutdown does not wait for background worker threads to exit.
The executor calls shutdown with wait=False.
The worker threads continue to run after client shutdown and after tracer reset.
In test runs, the remaining threads make HTTP requests to the loopback OpenTelemetry port 4318 during subsequent tests.
The test harness loopback guard detects these unexpected connections and fails innocent tests.
Reproduction Steps
Create an OTelTelemetryClient instance with enabled=True.
Submit an asynchronous export task with _send_payload.
Call client.shutdown() while the export runs.
Observe that devops-otel threads remain alive after shutdown() returns.
In tests, the next test fails when the background thread connects to port 4318.
Expected vs Actual Behavior
Expected behavior: OTelTelemetryClient.shutdown() waits for all executor worker threads to terminate and marks the client disabled.
Actual behavior: client.shutdown() returns immediately with wait=False, leaving active worker threads running in the background.
Environment Diagnostics
DevOps CLI Version: 0.5.1
Python Version: 3.14.7
OS & Architecture: Linux x86_64
Execution Environment: GitHub Actions CI
Logs, Traces, or Terminal Output
ERROR tests/test_finding_repetition_compression.py::test_finding_collapses_consecutive_duplicate_lines - Failed: network edge reached without a fake — Connected to a loopback port no socket in this test process binds or reached an unfaked edge: ::1:4318 (devops-otel_0), 127.0.0.1:4318 (devops-otel_0), ::1:4318 (devops-otel_0), ::1:4318 (devops-otel_1), 127.0.0.1:4318 (devops-otel_1), 127.0.0.1:4318 (devops-otel_0). Fake the service at its edge, or refuse it through `refusing_port`.
Activity
dan-petty commentedon Oct 26, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.
The candidate describes a bug where client shutdown does not wait for background threads.The issue causes test failures due to unexpected network connections after shutdown.Fixing this improves test reliability and prevents false negatives in CI.Requires modifying the shutdown method to wait for threads, which is a moderate change.Both items deal with background threads and test stability, but the candidate focuses on client shutdown and the shortlist item on thread waiting in tests.chore(main): release 0.6.0 (#2212)