startSpan

open fun startSpan(name: String): EmbraceSpan?

Create, start, and return a new EmbraceSpan with the given name that will be the root span of a new trace. Returns null if the EmbraceSpan cannot be created or started.


open fun startSpan(name: String, parent: EmbraceSpan?): EmbraceSpan?

Create, start, and return a new EmbraceSpan with the given name and parent. Returns null if the EmbraceSpan cannot be created or started, like if the parent has been started.


abstract fun startSpan(name: String, parent: EmbraceSpan?, startTimeMs: Long?): EmbraceSpan?

Create, start, and return a new EmbraceSpan with the given name, parent, and start time (epoch time in milliseconds). Returns null if the EmbraceSpan cannot be created or started, like if the parent has been started.