Package io.sentry
Class TransactionContext
- java.lang.Object
-
- io.sentry.SpanContext
-
- io.sentry.TransactionContext
-
public final class TransactionContext extends SpanContext
-
-
Field Summary
-
Fields inherited from class io.sentry.SpanContext
description, op, status, tags, TYPE
-
-
Constructor Summary
Constructors Constructor 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)CreatesTransactionContextwith explicit sampling decision.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static @NotNull TransactionContextfromSentryTrace(@NotNull java.lang.String name, @NotNull java.lang.String operation, @NotNull SentryTraceHeader sentryTrace)CreatesTransactionContextfrom sentry-trace header.@NotNull java.lang.StringgetName()@Nullable java.lang.BooleangetParentSampled()voidsetParentSampled(@Nullable java.lang.Boolean parentSampled)-
Methods inherited from class io.sentry.SpanContext
getDescription, getOperation, getParentSpanId, getSampled, getSpanId, getStatus, getTags, getTraceId, setDescription, setOperation, setSampled, setStatus, setTag
-
-
-
-
Constructor Detail
-
TransactionContext
public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation)
-
TransactionContext
public TransactionContext(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation, @Nullable @Nullable java.lang.Boolean sampled)CreatesTransactionContextwith explicit sampling decision.- Parameters:
name- - transaction nameoperation- - operationsampled- - sampling decision
-
-
Method Detail
-
fromSentryTrace
@NotNull public static @NotNull TransactionContext fromSentryTrace(@NotNull @NotNull java.lang.String name, @NotNull @NotNull java.lang.String operation, @NotNull @NotNull SentryTraceHeader sentryTrace)
CreatesTransactionContextfrom sentry-trace header.- Parameters:
name- - the transaction nameoperation- - the operationsentryTrace- - the sentry-trace header- Returns:
- the transaction contexts
-
getName
@NotNull public @NotNull java.lang.String getName()
-
getParentSampled
@Nullable public @Nullable java.lang.Boolean getParentSampled()
-
setParentSampled
public void setParentSampled(@Nullable @Nullable java.lang.Boolean parentSampled)
-
-