-
public final class OtelCrashUploaderPurpose: This reads a local crash report files created by OneSignal's crash handler and sends them to OneSignal on the app's next start.
This is fully platform-agnostic and can be used in KMP projects. All platform-specific values are injected through IOtelPlatformProvider.
Dependencies (all platform-agnostic):
IOtelOpenTelemetryRemote: For network export (created via OtelFactory)
IOtelPlatformProvider: Injects all platform values (Android/iOS)
IOtelLogger: Platform logging interface (Android/iOS)
Usage:
val uploader = OtelFactory.createCrashUploader(platformProvider, logger) coroutineScope.launch { uploader.start() }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classOtelCrashUploader.Companion
-
Constructor Summary
Constructors Constructor Description OtelCrashUploader(IOtelOpenTelemetryRemote openTelemetryRemote, IOtelPlatformProvider platformProvider, IOtelLogger logger)
-
Method Summary
Modifier and Type Method Description final Unitstart()Starts the crash uploader process. final UnitinternalStart()NOTE: sendCrashReports is called twice for the these reasons: We want to send crash reports as soon as possible.
Reports could be delayed until the 2nd start after a crash
-
-
Constructor Detail
-
OtelCrashUploader
OtelCrashUploader(IOtelOpenTelemetryRemote openTelemetryRemote, IOtelPlatformProvider platformProvider, IOtelLogger logger)
-
-
Method Detail
-
start
final Unit start()
Starts the crash uploader process. This will periodically check for crash reports on disk and upload them to OneSignal. If remote logging is disabled (NONE level), this function returns immediately without doing anything.
-
internalStart
final Unit internalStart()
NOTE: sendCrashReports is called twice for the these reasons:
We want to send crash reports as soon as possible.
Reports could be delayed until the 2nd start after a crash
-
-
-