File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
opentelemetry-sdk/src/opentelemetry/sdk Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -192,7 +192,7 @@ def emit(self, log_data: LogData) -> None:
192192 def shutdown (self ):
193193 return self ._batch_processor .shutdown ()
194194
195- def force_flush (self , timeout_millis : Optional [int ] = None ):
195+ def force_flush (self , timeout_millis : Optional [int ] = None ) -> bool :
196196 return self ._batch_processor .force_flush (timeout_millis )
197197
198198 @staticmethod
Original file line number Diff line number Diff line change @@ -191,8 +191,10 @@ def shutdown(self):
191191 self ._worker_thread .join ()
192192 self ._exporter .shutdown ()
193193
194- def force_flush (self , timeout_millis : Optional [int ] = None ):
194+ # TODO: Fix force flush so the timeout is used https://github.com/open-telemetry/opentelemetry-python/issues/4568.
195+ def force_flush (self , timeout_millis : Optional [int ] = None ) -> bool :
195196 if self ._shutdown :
196- return
197+ return False
197198 # Blocking call to export.
198199 self ._export (BatchExportStrategy .EXPORT_ALL )
200+ return True
Original file line number Diff line number Diff line change @@ -169,7 +169,7 @@ def __init__(
169169 )
170170
171171 self ._batch_processor = BatchProcessor (
172- span_exporter ,
172+ span_exporter , # type: ignore [reportArgumentType]
173173 schedule_delay_millis ,
174174 max_export_batch_size ,
175175 export_timeout_millis ,
@@ -190,7 +190,7 @@ def on_end(self, span: ReadableSpan) -> None:
190190 def shutdown (self ):
191191 return self ._batch_processor .shutdown ()
192192
193- def force_flush (self , timeout_millis : typing .Optional [int ] = None ):
193+ def force_flush (self , timeout_millis : typing .Optional [int ] = None ) -> bool :
194194 return self ._batch_processor .force_flush (timeout_millis )
195195
196196 @staticmethod
You can’t perform that action at this time.
0 commit comments