public final class Span extends SpanContext implements ISpan
description, op, status, tags, TYPE| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Sets span timestamp marking this span as finished.
|
void |
finish(@Nullable SpanStatus status)
Sets span timestamp marking this span as finished.
|
@NotNull SpanContext |
getSpanContext()
Gets the span context.
|
@NotNull java.util.Date |
getStartTimestamp() |
@Nullable java.lang.Throwable |
getThrowable()
Gets the throwable that was thrown during the execution of the span.
|
@Nullable java.util.Date |
getTimestamp() |
boolean |
isFinished()
Returns if span has finished.
|
void |
setThrowable(@Nullable java.lang.Throwable throwable)
Sets the throwable that was thrown during the execution of the span.
|
@NotNull ISpan |
startChild(@NotNull java.lang.String operation)
Starts a child Span.
|
@NotNull ISpan |
startChild(@NotNull java.lang.String operation,
@Nullable java.lang.String description)
Starts a child Span.
|
@NotNull SentryTraceHeader |
toSentryTrace()
Returns a string that could be sent as a sentry-trace header.
|
clone, getDescription, getOperation, getParentSpanId, getSampled, getSpanId, getStatus, getTags, getTraceId, setDescription, setOperation, setStatus, setTagequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDescription, getOperation, getStatus, setDescription, setOperation, setStatus, setTag@NotNull public @NotNull java.util.Date getStartTimestamp()
@Nullable public @Nullable java.util.Date getTimestamp()
@NotNull public @NotNull ISpan startChild(@NotNull @NotNull java.lang.String operation)
ISpanstartChild in interface ISpanoperation - - new span operation name@NotNull public @NotNull ISpan startChild(@NotNull @NotNull java.lang.String operation, @Nullable @Nullable java.lang.String description)
ISpanstartChild in interface ISpanoperation - - new span operation namedescription - - new span description name@NotNull public @NotNull SentryTraceHeader toSentryTrace()
ISpantoSentryTrace in interface ISpanpublic void finish()
ISpanpublic void finish(@Nullable
@Nullable SpanStatus status)
ISpan@NotNull public @NotNull SpanContext getSpanContext()
ISpangetSpanContext in interface ISpanpublic boolean isFinished()
ISpanisFinished in interface ISpanpublic void setThrowable(@Nullable
@Nullable java.lang.Throwable throwable)
ISpansetThrowable in interface ISpanthrowable - - the throwable.@Nullable public @Nullable java.lang.Throwable getThrowable()
ISpangetThrowable in interface ISpannull if none