Skip to content

Commit eecba04

Browse files
committed
Crash app
1 parent 01a801d commit eecba04

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

demo-app/src/main/java/io/opentelemetry/android/demo/OtelDemoApplication.kt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,27 @@ import io.opentelemetry.api.trace.Tracer
2020
import io.opentelemetry.exporter.otlp.http.logs.OtlpHttpLogRecordExporter
2121
import io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporter
2222
import io.opentelemetry.sdk.logs.internal.SdkEventLoggerProvider
23-
import java.time.Duration
24-
import kotlin.math.log
23+
import kotlinx.coroutines.DelicateCoroutinesApi
24+
import kotlinx.coroutines.Dispatchers
25+
import kotlinx.coroutines.GlobalScope
26+
import kotlinx.coroutines.launch
2527

2628
const val TAG = "otel.demo"
2729

2830
class OtelDemoApplication : Application() {
31+
@OptIn(DelicateCoroutinesApi::class)
2932
@SuppressLint("RestrictedApi")
3033
override fun onCreate() {
3134
super.onCreate()
3235

36+
GlobalScope.launch(Dispatchers.Default) {
37+
while (true) {
38+
val key = "hello${Math.random() * 100}"
39+
System.getProperties()[key] = "test"
40+
System.getProperties().remove(key)
41+
}
42+
}
43+
3344
Log.i(TAG, "Initializing the opentelemetry-android-agent")
3445
val diskBufferingConfig =
3546
DiskBufferingConfiguration.builder()

0 commit comments

Comments
 (0)