-
- All Implemented Interfaces:
-
com.bugsnag.android.performance.HasAttributes,com.bugsnag.android.performance.SpanContext,java.io.Closeable,java.lang.AutoCloseable
public interface Span implements SpanContext, Closeable, HasAttributes
Represents an ongoing or complete performance measurement and the associated attributes.
Spans are typically used in a try-with-resources in Java, or with theuseextension function in Kotlin to ensure they are closed.Spans may not be changed once they have been closed.
The Span interface is not intended for third-party implementation.
-
-
Method Summary
Modifier and Type Method Description abstract Unitend(Long endTime)End this with a specified timestamp relative to SystemClock.elapsedRealtimeNanos. abstract Unitend()End this span now. Unitclose()Convenience function to call end, implementing the Closeable interface and allowing Spanto be used with try-with-resources in Java.abstract BooleanisEnded()Returns trueif this span has been closed / ended.abstract StringgetName()The name of this span. abstract LonggetSpanId()abstract UUIDgetTraceId()-
Methods inherited from class com.bugsnag.android.performance.Span
setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, wrap, wrap -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
end
abstract Unit end(Long endTime)
End this with a specified timestamp relative to SystemClock.elapsedRealtimeNanos. If this span has already been closed this will have no effect.
-
end
abstract Unit end()
End this span now. This is the same as
end(SystemClock.elapsedRealtimeNanos()).
-
isEnded
abstract Boolean isEnded()
Returns
trueif this span has been closed / ended. If this returnstruethe span cannot be modified further.
-
getTraceId
abstract UUID getTraceId()
-
-
-
-