-
Notifications
You must be signed in to change notification settings - Fork 718
Interrupt exporter retry backoff sleeps when shutdown is called. Update BatchSpan/LogRecordProcessor.shutdown to complete in 30 seconds #4638
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
base: main
Are you sure you want to change the base?
Conversation
...pentelemetry-exporter-otlp-proto-grpc/src/opentelemetry/exporter/otlp/proto/grpc/exporter.py
Outdated
Show resolved
Hide resolved
Also im not sure if this fixes #4623, since it's still not configurable |
Ok. Removed 4623 from the list of fixed |
...xporter-otlp-proto-http/src/opentelemetry/exporter/otlp/proto/http/_log_exporter/__init__.py
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure on the Exporter.shutdown comment, I'll think on it a little
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One bug but otherwise LGTM
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/_shared_internal/__init__.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
Co-authored-by: Emídio Neto <9735060+emdneto@users.noreply.github.com>
…etry-python into shutdown_refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
discussed offline to rename the shutdown event variable to _shutdown_in_progress
.
Description
This PR updates the HTTP/gRPC OTLP Exporters, so that the retry backoff sleep in
export
gets immediately interrupted (and failure returned) whenshutdown
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
Type of change
How Has This Been Tested?
Does This PR Require a Contrib Repo Change?
Checklist: