File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
demo-app/src/main/java/io/opentelemetry/android/demo Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,27 @@ import io.opentelemetry.api.trace.Tracer
2020import io.opentelemetry.exporter.otlp.http.logs.OtlpHttpLogRecordExporter
2121import io.opentelemetry.exporter.otlp.http.trace.OtlpHttpSpanExporter
2222import 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
2628const val TAG = " otel.demo"
2729
2830class 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()
You can’t perform that action at this time.
0 commit comments