opentelemetry-python
opentelemetry-python copied to clipboard
Interrupt exporter retry backoff sleeps when shutdown is called. Update BatchSpan/LogRecordProcessor.shutdown to complete in 30 seconds
Description
This PR updates the HTTP/gRPC OTLP Exporters, so that the retry backoff sleep in export gets immediately interrupted (and failure returned) when shutdown is called, instead of sleeping / retrying to completion.
This PR also updates the BatchSpan/LogRecordProcessor's shutdown method to complete after 30 seconds instead of continuing to run until all telemetry was flushed from the queue.
Fixes an issue where shutdown would hang or stall indefinitely, especially when export was failing inside a retry loop.
Fixes: #3309, #4043, #2663, #4623
Type of change
- [ x] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
- Lots of unit tests.
Does This PR Require a Contrib Repo Change?
- [ ] Yes. - Link to PR:
- [ x] No.
Checklist:
- [x ] Followed the style guidelines of this project
- [ x] Changelogs have been updated
- [ x] Unit tests have been added
- [ x] Documentation has been updated