Skip to content

Commit 4d21ac7

Browse files
committed
Flushing from the rum api
1 parent e8f0384 commit 4d21ac7

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

agent-api/src/main/java/io/opentelemetry/android/OpenTelemetryRum.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ package io.opentelemetry.android
77

88
import io.opentelemetry.api.OpenTelemetry
99
import io.opentelemetry.api.common.Attributes
10+
import io.opentelemetry.sdk.common.CompletableResultCode
1011

1112
/**
1213
* Entrypoint for the OpenTelemetry Real User Monitoring library for Android.
@@ -44,6 +45,8 @@ interface OpenTelemetryRum {
4445
attributes: Attributes = Attributes.empty(),
4546
)
4647

48+
fun flushLogRecords(): CompletableResultCode
49+
4750
/**
4851
* Initiates orderly shutdown of this OpenTelemetryRum instance. After this method completes,
4952
* the instance should be considered invalid and no longer used.

instrumentation/crash/src/main/java/io/opentelemetry/android/instrumentation/crash/CrashReporter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ internal class CrashReporter(
7070
}
7171

7272
private fun waitForCrashFlush(openTelemetry: OpenTelemetryRum) {
73-
val flushResult = openTelemetry.sdkLoggerProvider.forceFlush()
73+
val flushResult = openTelemetry.flushLogRecords()
7474
flushResult.join(10, TimeUnit.SECONDS)
7575
}
7676
}

0 commit comments

Comments
 (0)