public final class NoOpTransaction extends java.lang.Object implements ITransaction
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 Contexts |
getContexts() |
@Nullable java.lang.String |
getDescription()
Returns the span description.
|
@Nullable SentryId |
getEventId()
Returns transaction's event id.
|
static NoOpTransaction |
getInstance() |
@Nullable Span |
getLatestActiveSpan()
Returns the latest span that is not finished.
|
@NotNull java.lang.String |
getName()
Returns transaction name.
|
@Nullable java.lang.String |
getOperation()
Returns the span operation.
|
@Nullable Request |
getRequest()
Returns the request information from the transaction
|
@NotNull SpanContext |
getSpanContext()
Gets the span context.
|
@NotNull java.util.List<Span> |
getSpans() |
@Nullable SpanStatus |
getStatus()
Returns the span status
|
@Nullable java.lang.Throwable |
getThrowable()
Gets the throwable that was thrown during the execution of the span.
|
@Nullable java.lang.String |
getTransaction() |
boolean |
isFinished()
Returns if span has finished.
|
@Nullable java.lang.Boolean |
isSampled()
Returns if transaction is sampled.
|
void |
setDescription(@Nullable java.lang.String description)
Sets span description.
|
void |
setName(@NotNull java.lang.String name)
Sets transaction name.
|
void |
setOperation(@Nullable java.lang.String operation)
Sets span operation.
|
void |
setRequest(@Nullable Request request)
Attaches request information to the transaction.
|
void |
setStatus(@Nullable SpanStatus status)
Sets span status.
|
void |
setTag(@NotNull java.lang.String key,
@NotNull java.lang.String value)
Sets the tag on span or transaction.
|
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.
|
public static NoOpTransaction getInstance()
public void setName(@NotNull @NotNull java.lang.String name)
ITransaction
setName
in interface ITransaction
name
- - transaction name@NotNull public @NotNull java.lang.String getName()
ITransaction
getName
in interface ITransaction
@NotNull public @NotNull ISpan startChild(@NotNull @NotNull java.lang.String operation)
ISpan
startChild
in interface ISpan
operation
- - new span operation name@NotNull public @NotNull ISpan startChild(@NotNull @NotNull java.lang.String operation, @Nullable @Nullable java.lang.String description)
ISpan
startChild
in interface ISpan
operation
- - new span operation namedescription
- - new span description namepublic void setRequest(@Nullable @Nullable Request request)
ITransaction
setRequest
in interface ITransaction
request
- the request@Nullable public @Nullable Request getRequest()
ITransaction
getRequest
in interface ITransaction
null
if not set@NotNull public @NotNull Contexts getContexts()
getContexts
in interface ITransaction
@Nullable public @Nullable java.lang.String getDescription()
ISpan
getDescription
in interface ISpan
@NotNull public @NotNull java.util.List<Span> getSpans()
getSpans
in interface ITransaction
@Nullable public @Nullable java.lang.Boolean isSampled()
ITransaction
isSampled
in interface ITransaction
@Nullable public @Nullable Span getLatestActiveSpan()
ITransaction
getLatestActiveSpan
in interface ITransaction
@Nullable public @Nullable SentryId getEventId()
ITransaction
getEventId
in interface ITransaction
@Nullable public @Nullable java.lang.String getTransaction()
getTransaction
in interface ITransaction
public boolean isFinished()
ISpan
isFinished
in interface ISpan
@NotNull public @NotNull SentryTraceHeader toSentryTrace()
ISpan
toSentryTrace
in interface ISpan
public void finish()
ISpan
public void finish(@Nullable @Nullable SpanStatus status)
ISpan
public void setOperation(@Nullable @Nullable java.lang.String operation)
ISpan
setOperation
in interface ISpan
operation
- - the operation@Nullable public @Nullable java.lang.String getOperation()
ISpan
getOperation
in interface ISpan
public void setDescription(@Nullable @Nullable java.lang.String description)
ISpan
setDescription
in interface ISpan
description
- - the description.public void setStatus(@Nullable @Nullable SpanStatus status)
ISpan
@Nullable public @Nullable SpanStatus getStatus()
ISpan
public void setThrowable(@Nullable @Nullable java.lang.Throwable throwable)
ISpan
setThrowable
in interface ISpan
throwable
- - the throwable.@Nullable public @Nullable java.lang.Throwable getThrowable()
ISpan
getThrowable
in interface ISpan
null
if none@NotNull public @NotNull SpanContext getSpanContext()
ISpan
getSpanContext
in interface ISpan