createSpan

abstract fun createSpan(name: String, initialAttributes: <Error class: unknown class> = emptyAttributes(), spanKind: SpanKind = SpanKind.INTERNAL, parentContext: Context? = null): TraceSpan

Creates a new span and makes it active in the current Context.

Parameters

name

the name of the span

parentContext

the parent context to use for this span, if not set it is implementation defined.