public final class TransactionContext extends SpanContext
description, op, status, tags, TYPE
Constructor and Description |
---|
TransactionContext(@NotNull java.lang.String name,
@NotNull java.lang.String operation) |
TransactionContext(@NotNull java.lang.String name,
@NotNull java.lang.String operation,
@Nullable java.lang.Boolean sampled)
Creates
TransactionContext with explicit sampling decision. |
Modifier and Type | Method and Description |
---|---|
static @NotNull TransactionContext |
fromSentryTrace(@NotNull java.lang.String name,
@NotNull java.lang.String operation,
@NotNull SentryTraceHeader sentryTrace)
Creates
TransactionContext from sentry-trace header. |
@NotNull java.lang.String |
getName() |
@Nullable java.lang.Boolean |
getParentSampled() |
void |
setParentSampled(@Nullable java.lang.Boolean parentSampled) |
getDescription, getOperation, getParentSpanId, getSampled, getSpanId, getStatus, getTags, getTraceId, setDescription, setOperation, setStatus, setTag
public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation)
public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation, @Nullable @Nullable java.lang.Boolean sampled)
TransactionContext
with explicit sampling decision.name
- - transaction nameoperation
- - operationsampled
- - sampling decision@NotNull public static @NotNull TransactionContext fromSentryTrace(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation, @NotNull @NotNull SentryTraceHeader sentryTrace)
TransactionContext
from sentry-trace header.name
- - the transaction nameoperation
- - the operationsentryTrace
- - the sentry-trace header@NotNull public @NotNull java.lang.String getName()
@Nullable public @Nullable java.lang.Boolean getParentSampled()
public void setParentSampled(@Nullable @Nullable java.lang.Boolean parentSampled)