{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
interface Tracer.Span : Closeable
Span is a helper object denoting an ongoing time span and providing a way for the caller to close and end the span to record the end of the action being traced.
The Span interface implements Closeable to encourage its use in a try-resource block and ensure that the close method is always properly called.
Public functions |
|
|---|---|
Tracer.Span! |
beginChildSpan(name: String!)Starts a new time span nested in a parent span, to track progression of some inner action. |
Unit |
close()Closes and ends this span. |
fun beginChildSpan(name: String!): Tracer.Span!
Starts a new time span nested in a parent span, to track progression of some inner action.
The implementation must return a Span object which the caller must use later to close and end the span.
Multiple child spans can be created for the same parent span. It is expected that the child spans do not overlap.
| Parameters | |
|---|---|
name: String! |
A name describing the inner action performed. |
| Returns | |
|---|---|
Tracer.Span! |
A new span object that the caller must invoke later to close the span. |