recordCompletedSpan

open fun recordCompletedSpan(name: String, startTimeMs: Long, endTimeMs: Long): Boolean

Record a span with the given name, start time, and end time (epoch time in milliseconds). The created span will be the root span of a new trace.


open fun recordCompletedSpan(name: String, startTimeMs: Long, endTimeMs: Long, errorCode: ErrorCode?): Boolean

Record a span with the given name, error code, start time, and end time (epoch time in milliseconds). The created span will be the root span of a new trace. A non-null ErrorCode can be passed in to denote the operation the span represents was ended unsuccessfully under the stated circumstances.


open fun recordCompletedSpan(name: String, startTimeMs: Long, endTimeMs: Long, parent: EmbraceSpan?): Boolean

Record a span with the given name, parent, start time, and end time (epoch time in milliseconds). Passing in a parent that is null will result in a new trace with the new span as its root.


open fun recordCompletedSpan(name: String, startTimeMs: Long, endTimeMs: Long, errorCode: ErrorCode?, parent: EmbraceSpan?): Boolean

Record a span with the given name, parent, error code, start time, and end time (epoch time in milliseconds). Passing in a parent that is null will result in a new trace with the new span as its root. A non-null ErrorCode can be passed in to denote the operation the span represents was ended unsuccessfully under the stated circumstances.


open fun recordCompletedSpan(name: String, startTimeMs: Long, endTimeMs: Long, attributes: Map<String, String>?, events: List<EmbraceSpanEvent>?): Boolean

Record a span with the given name, start time, and end time (epoch time in milliseconds). The created span will be the root span of a new trace. You can also pass in a Map with String keys and values to be used as the attributes of the recorded span, or a List of EmbraceSpanEvent to be used as the events of the recorded span.


abstract fun recordCompletedSpan(name: String, startTimeMs: Long, endTimeMs: Long, errorCode: ErrorCode?, parent: EmbraceSpan?, attributes: Map<String, String>?, events: List<EmbraceSpanEvent>?): Boolean

Record a span with the given name, error code, parent, start time, and end time (epoch time in milliseconds). Passing in a parent that is null will result in a new trace with the new span as its root. A non-null ErrorCode can be passed in to denote the operation the span represents was ended unsuccessfully under the stated circumstances. You can also pass in a Map with String keys and values to be used as the attributes of the recorded span, or a List of EmbraceSpanEvent to be used as the events of the recorded span.