Skip to content

Span processor's ShutDown() and ForceFlush() do not match spec #400

@kxyr

Description

@kxyr

Is your feature request related to a problem?
Currently, the SpanProcessor's ForceFlush() and Shutdown() methods return void instead of, as required by the spec, "let[ting] the caller know whether it succeeded, failed or timed out”.

Furthermore, the default timeout for ForceFlush and ShutDown for the simple and batch span processors is set to 0, which according to the comments indicates no timeout is enforced so the methods could hang indefinitely. They should, according to the spec, “complete or abort within some timeout”.

Describe the solution you'd like
The void return type from the ForceFlush and Shutdown methods should be changed to an enum to return either success, failure, or timeout. Furthermore, the processor should abort from ForceFlush and Shutdown if they take longer than the specified timeout. A reasonable default timeout is also needed.

--cc @alolita @MarkSeufert

Metadata

Metadata

Assignees

Labels

area:sdkbugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions