Skip to content

Commit 5d86ce2

Browse files
dyladancarlosalberto
authored andcommitted
Add flush interface to span processor (open-telemetry#370)
1 parent 4d9720e commit 5d86ce2

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

specification/sdk-tracing.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,10 +218,18 @@ Shuts down the processor. Called when SDK is shut down. This is an opportunity
218218
for processor to do any cleanup required.
219219

220220
Shutdown should be called only once for each `Processor` instance. After the
221-
call to shutdown subsequent calls to `onStart` or `onEnd` are not allowed.
221+
call to shutdown subsequent calls to `onStart`, `onEnd`, or `forceFlush` are not allowed.
222222

223223
Shutdown should not block indefinitely. Language library authors can decide if
224-
they want to make the shutdown timeout to be configurable.
224+
they want to make the shutdown timeout configurable.
225+
226+
##### ForceFlush()
227+
228+
Export all ended spans to the configured `Exporter` that have not yet been exported.
229+
230+
`ForceFlush` should only be called in cases where it is absolutely necessary, such as when using some FaaS providers that may suspend the process after an invocation, but before the `Processor` exports the completed spans.
231+
232+
`ForceFlush` should not block indefinitely. Language library authors can decide if they want to make the flush timeout configurable.
225233

226234
#### Built-in span processors
227235

@@ -328,7 +336,7 @@ return FailedNotRetryable error.
328336

329337
`Shutdown` should not block indefinitely (e.g. if it attempts to flush the data
330338
and the destination is unavailable). Language library authors can decide if they
331-
want to make the shutdown timeout to be configurable.
339+
want to make the shutdown timeout configurable.
332340

333341
#### Further Language Specialization
334342

0 commit comments

Comments
 (0)