Back to Pinpoint

Kotlin Corutines

agent-module/plugins/kotlin-coroutines/README.md

3.0.52.0 KB
Original Source

Kotlin Corutines

Pinpoint Configuration

pinpoint.config

Trace options

###########################################################
# Kotlin Corutines
# v1.0.1 ~
###########################################################
profiler.kotlin.coroutines.enable=false

#Trace the name of the thread.
#This is important information to check whether the developer's intention and the behavior of the coroutine match.
#Recommend that you use it in the development environment and not in the production environment.
profiler.kotlin.coroutines.record.threadName=false

#Track cancellations and the propagation of cancellations.
#This is important information to check whether the developer's intention and the behavior of the coroutine match.
#Recommend that you use it in the development environment and not in the production environment.
profiler.kotlin.coroutines.record.cancel=false

Coroutines Lifecycle

           Before                   Run                  After

         +-----------+
         | Start     | -------------+
         +-----------+              |
               |                    |      +---------+
               +------------------- | -----| Executor|-------+
               |                    |      +---------+       |
               |                    |                        |
               V                    V                        |
         +-----------+       +--------------+       +------------+
         | Scheduler | ----> | Continuation | ----> | Dispatcher |
         | Ldispatch |       + L resumeWith |       + Ldispatch  |
         +-----------+       +--------------+       +------------+
                                    |                       |
                                    |                       V
                                    |               +------------+
                                    + ------------> |  Finish    |
                                                    +------------+