Skip to content
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

Add flush interface to span processor #370

Merged
Merged
Changes from 2 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
14 changes: 11 additions & 3 deletions specification/sdk-tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,18 @@ Shuts down the processor. Called when SDK is shut down. This is an opportunity
for processor to do any cleanup required.

Shutdown should be called only once for each `Processor` instance. After the
call to shutdown subsequent calls to `onStart` or `onEnd` are not allowed.
call to shutdown subsequent calls to `onStart`, `onEnd`, or `flush` are not allowed.

Shutdown should not block indefinitely. Language library authors can decide if
they want to make the shutdown timeout to be configurable.
they want to make the shutdown timeout configurable.

##### Flush()

Export all ended spans to the configured `Exporter` that have not yet been exported.

`Flush` 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.

`Flush` should not block indefinitely. Language library authors can decide if they want to make the flush timeout configurable.
jmacd marked this conversation as resolved.
Show resolved Hide resolved

#### Built-in span processors

Expand Down Expand Up @@ -328,7 +336,7 @@ return FailedNotRetryable error.

`Shutdown` should not block indefinitely (e.g. if it attempts to flush the data
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe make flush a link to the newly added flush method?

and the destination is unavailable). Language library authors can decide if they
want to make the shutdown timeout to be configurable.
want to make the shutdown timeout configurable.

#### Further Language Specialization

Expand Down