Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changelog/5438.changed
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`opentelemetry-sdk`: unify logging force_flush timeout defaults to 30000ms
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def shutdown(self):
"""

@abc.abstractmethod
def force_flush(self, timeout_millis: int = 10_000) -> bool:
def force_flush(self, timeout_millis: int = 30000) -> bool:
"""Hint to ensure that the export of any ``ReadableLogRecord`` objects
the exporter has received prior to the call to ``force_flush`` SHOULD be
completed as soon as possible, preferably before returning from this method.
Expand Down Expand Up @@ -161,7 +161,7 @@ def export(self, batch: Sequence[ReadableLogRecord]):
def shutdown(self):
pass

def force_flush(self, timeout_millis: int = 10_000) -> bool:
def force_flush(self, timeout_millis: int = 30000) -> bool:
return True


Expand Down Expand Up @@ -321,7 +321,7 @@ def on_emit(self, log_record: ReadWriteLogRecord) -> None:
def shutdown(self):
return self._batch_processor.shutdown()

def force_flush(self, timeout_millis: int | None = None) -> bool:
def force_flush(self, timeout_millis: int = 30000) -> bool:
return self._batch_processor.force_flush(timeout_millis)

@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def export(self, batch: collections.abc.Sequence[ReadableLogRecord]) -> LogRecor
def shutdown(self) -> None:
self._stopped = True

def force_flush(self, timeout_millis: int = 10_000) -> bool:
def force_flush(self, timeout_millis: int = 30000) -> bool:
return True


Expand Down
Loading