You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-06-27 00:21:15 +02:00
Add ForceFlush() method to SpanProcessor interface (#1166)
* Add ForceFlush() method to SpanProcessor interface * Add a stub implementation to SimpleSpanProcessor * Add a working implementation to BatchSpanProcessor * add CHANGELOG.md entry * Eliminate sleep from BatchSpanProcessor.ForceFlush() test * Generating test spans serially should reduce test flakiness
This commit is contained in:
committed by
GitHub
parent
a12224a454
commit
995be31f42
@ -35,6 +35,12 @@ type SpanProcessor interface {
|
||||
// data. No calls to OnStart and OnEnd method is invoked after Shutdown call is
|
||||
// made. It should not be blocked indefinitely.
|
||||
Shutdown()
|
||||
|
||||
// ForceFlush exports all ended spans to the configured Exporter that have not yet
|
||||
// been exported. It should only be called when absolutely necessary, such as when
|
||||
// using a FaaS provider that may suspend the process after an invocation, but before
|
||||
// the Processor can export the completed spans.
|
||||
ForceFlush()
|
||||
}
|
||||
|
||||
type spanProcessorMap map[SpanProcessor]*sync.Once
|
||||
|
Reference in New Issue
Block a user