-
Notifications
You must be signed in to change notification settings - Fork 694
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ConcurrentMultiSpanProcessor: cannot schedule new futures after shutdown #4461
Comments
This avoids open-telemetry/opentelemetry-python#4461 until open-telemetry/opentelemetry-python#4462 is released. Signed-off-by: Helder Correia <[email protected]>
This avoids open-telemetry/opentelemetry-python#4461 until open-telemetry/opentelemetry-python#4462 is released. Signed-off-by: Helder Correia <[email protected]>
This avoids open-telemetry/opentelemetry-python#4461 until open-telemetry/opentelemetry-python#4462 is released. Signed-off-by: Helder Correia <[email protected]> Signed-off-by: kpenfound <[email protected]>
I'll try the reproducer out myself next week, but it seems like an issue with the atexit handler since you're not calling shutdown on your own. I don't see that obviously in your stack trace though. Possibly related to python/cpython#86813 |
I'm not sure exactly when this broke, but it works on 3.8. Details
Ultimately, it seems like python considers atexit a finalizer and we need a different hook for shutting down the SDK if using multiple threads. |
Describe your environment
OS: macOS 15.2
Python version: 3.13.0
Dependencies from
pip install opentelemetry-sdk
:What happened?
I tried to use the
opentelemetry.sdk.trace.ConcurrentMultiSpanProcessor
for a library but get an error on shutdown.Steps to Reproduce
Based on the basic_trace.py example:
Running with:
Expected Result
Actual Result
Additional context
I can avoid the error by manually shutting down in the end of the script:
But since the tracer provider already calls shutdown on exit, can't this be handled automatically without the manual shutdown?
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: