Return result in OpenTelemeterySdk.forceFlush (#1639)

This commit is contained in:
Anuraag Agrawal 2020-09-15 01:45:54 +09:00 committed by GitHub
parent f2dab17fe5
commit a4cd21ff49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -17,6 +17,7 @@
package io.opentelemetry.sdk.trace;
import io.opentelemetry.sdk.common.Clock;
import io.opentelemetry.sdk.common.CompletableResultCode;
import io.opentelemetry.sdk.common.InstrumentationLibraryInfo;
import io.opentelemetry.sdk.internal.ComponentRegistry;
import io.opentelemetry.sdk.internal.MillisClock;
@ -119,12 +120,13 @@ public class TracerSdkProvider implements TracerProvider {
}
/**
* Requests the active span processor to process all span events that have not yet been processed.
* Requests the active span processor to process all span events that have not yet been processed
* and returns a {@link CompletableResultCode} which is completed when the flush is finished.
*
* @see SpanProcessor#forceFlush()
*/
public void forceFlush() {
sharedState.getActiveSpanProcessor().forceFlush();
public CompletableResultCode forceFlush() {
return sharedState.getActiveSpanProcessor().forceFlush();
}
/**